This repository has been archived on 2024-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
fotochallenge/tests/health.test.ts

14 lines
496 B
TypeScript
Raw Permalink Normal View History

2024-08-18 15:34:36 +02:00
import { expect, test } from '@playwright/test';
test('healthy test', async ({ playwright }) => {
const context = await playwright.request.newContext();
const response = await context.get('health');
await expect(response.status()).toBe(200);
2024-08-18 15:38:03 +02:00
await expect(response.headers()).toHaveProperty('healthy');
await expect(response.headers()['healthy']).toBe('true');
2024-08-18 15:34:36 +02:00
2024-08-18 15:38:03 +02:00
const body = await response.json();
await expect(body).toHaveProperty('status');
await expect(body['status']).toBe('OK');
});