Bump playkit to v0.3 and use Zod API schemas
Adopt assertSchema via ApiClient, playkitFailureArtifacts in Playwright config, and keep e2e login on e2e@levkine.ca credentials from CI secrets.
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
import { z } from 'zod';
|
||||
import { test, expect } from '../fixtures';
|
||||
|
||||
const HealthSchema = z.object({ status: z.literal('ok') });
|
||||
|
||||
test.describe('api @smoke', () => {
|
||||
test('backend /health returns ok', async ({ api, timings }) => {
|
||||
const res = await timings.measure('api_health', () =>
|
||||
api.get<{ status: string }>('/health', { expectedStatus: 200 }),
|
||||
api.get('/health', { expectedStatus: 200, schema: HealthSchema }),
|
||||
);
|
||||
expect(res.data).toMatchObject({ status: 'ok' });
|
||||
expect(res.data).toEqual({ status: 'ok' });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user