WorkTracker/tests/playwright/health.spec.ts
Marco 08e573d63c
All checks were successful
Publish Container / publish (push) Successful in 5m35s
Removed auth
2026-04-20 14:11:18 +02:00

21 lines
No EOL
692 B
TypeScript

import { expect, test } from '@playwright/test';
test('health endpoint reports healthy zero-trust mode', async ({ request }) => {
const response = await request.get('/healthz');
expect(response.ok()).toBeTruthy();
const payload = await response.json();
expect(payload.status).toBe('Healthy');
expect(payload.authenticationEnabled).toBe(false);
expect(payload.storage.appSettingsReady).toBe(true);
expect(payload.storage.usersReady).toBe(true);
expect(payload.storage.workDaysReady).toBe(true);
});
test('authenticated identity is the default admin user', async ({ page }) => {
await page.goto('/auth');
await expect(page.getByText('Hello Admin!')).toBeVisible();
});