Files
kochwas/tests/e2e/remote/admin.spec.ts

21 lines
689 B
TypeScript
Raw Normal View History

import { test, expect } from '@playwright/test';
test.describe('Admin-Routen', () => {
const SUBROUTES = ['domains', 'profiles', 'backup', 'app'] as const;
for (const sub of SUBROUTES) {
test(`/admin/${sub} laedt mit Nav-Tabs`, async ({ page }) => {
await page.goto(`/admin/${sub}`);
// Alle Admin-Subseiten haben dieselbe Tab-Leiste.
for (const label of ['Domains', 'Profile', 'Backup', 'App']) {
await expect(page.getByRole('link', { name: label })).toBeVisible();
}
});
}
test('/admin redirected auf /admin/domains', async ({ page }) => {
await page.goto('/admin');
await expect(page).toHaveURL(/\/admin\/domains$/);
});
});