veza/tests/e2e/audit/functional/04-admin.spec.ts

21 lines
765 B
TypeScript
Raw Normal View History

import { test, expect } from '@chromatic-com/playwright';
import { loginViaAPI, navigateTo, assertNotBroken, assertNoDebugText } from '../helpers';
import { TEST_USERS, ROUTES } from '../design-tokens';
test.describe('FONCTIONNEL — Pages Admin', () => {
test.beforeEach(async ({ page }) => {
await loginViaAPI(page, TEST_USERS.admin.email, TEST_USERS.admin.password);
});
for (const route of ROUTES.admin) {
test(`${route.name} (${route.path}) — se charge sans crash`, async ({ page }) => {
await navigateTo(page, route.path);
await assertNotBroken(page);
await assertNoDebugText(page);
const main = page.locator('main, [role="main"]').first();
await expect(main).toBeVisible({ timeout: 15_000 });
});
}
});