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
Valentin Brandl 20920586e0
All checks were successful
/ Misc Linters (pull_request) Successful in 23s
/ Build App (pull_request) Successful in 1m21s
Formatting
2024-08-18 15:38:03 +02:00

14 lines
496 B
TypeScript

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);
await expect(response.headers()).toHaveProperty('healthy');
await expect(response.headers()['healthy']).toBe('true');
const body = await response.json();
await expect(body).toHaveProperty('status');
await expect(body['status']).toBe('OK');
});