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 56f568634e
Some checks failed
/ Misc Linters (pull_request) Successful in 28s
/ Build App (pull_request) Failing after 27s
Implement first integration tests
2024-08-18 15:34:36 +02:00

13 lines
510 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');
});