Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(Playwright): header response
Browse files Browse the repository at this point in the history
  • Loading branch information
webrooster committed Jun 26, 2023
1 parent a6cb577 commit 806d749
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions __e2e__/checks/HealthCheck.test.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
import { test, expect } from '@playwright/test';
import * as dotenv from 'dotenv';
dotenv.config();

test.use({ storageState: './__e2e__/data/noAuth.json' });

test.describe('@healthcheck', () => {
test('health check - mumble app', async ({ page }) => {
test('health check - endpoint mumble app', async ({ page }) => {
const response = await page.request.get('https://app-yeahyeahyeah-cbvb5d3h6a-oa.a.run.app');
const result = response.status();
expect(result, 'should be 200').toBe(200);
});

test('health check - qwacker API', async ({ page }) => {
test('health check - endpoint qwacker API', async ({ page }) => {
const response = await page.request.get('https://qwacker-api-http-prod-4cxdci3drq-oa.a.run.app');
const result = response.status();
expect(result, 'should be 404').toBe(404);
});

test('health check - zitadel', async ({ page }) => {
test('health check - endpoint zitadel', async ({ page }) => {
const response = await page.request.get('https://cas-fee-advanced-ocvdad.zitadel.cloud');
const result = response.status();
expect(result, 'should be 200').toBe(200);
Expand All @@ -29,8 +25,10 @@ test.describe('@healthcheck', () => {
);

const apiResponse = await response.json();
const headerResponse = response.statusText();

expect(response.status()).toBe(200);
expect(headerResponse).toBe('OK');
expect(apiResponse.data[0].id).not.toBe('');
expect(apiResponse.data[0].creator).toBe('201161756305785089');
expect(apiResponse.data[0].text).not.toBe('');
Expand Down

0 comments on commit 806d749

Please sign in to comment.