test(e2e): cover admin thumbnail generation card + a11y
- admin.spec: click 'Thumbnails erzeugen', wait for status DONE within 30s, screenshot the success message - accessibility.spec: /admin/system joins the page list so the thumbnail card is checked in light, system-dark, and manual-dark axe-core runs Refs #307 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,8 @@ const AUTHENTICATED_PAGES = [
|
||||
{ name: 'home', path: '/' },
|
||||
{ name: 'persons', path: '/persons' },
|
||||
{ name: 'aktivitaeten', path: '/aktivitaeten' },
|
||||
{ name: 'admin', path: '/admin' }
|
||||
{ name: 'admin', path: '/admin' },
|
||||
{ name: 'admin-system', path: '/admin/system' }
|
||||
];
|
||||
|
||||
function buildAxe(page: Parameters<typeof AxeBuilder>[0]['page']) {
|
||||
|
||||
@@ -248,3 +248,28 @@ test.describe('Admin system tab — backfill file hashes', () => {
|
||||
await page.screenshot({ path: 'test-results/e2e/admin-backfill-hashes.png' });
|
||||
});
|
||||
});
|
||||
|
||||
// ─── System tab — generate thumbnails ─────────────────────────────────────────
|
||||
|
||||
test.describe('Admin system tab — generate thumbnails', () => {
|
||||
test('admin triggers thumbnail generation and sees DONE within 30s', async ({ page }) => {
|
||||
test.setTimeout(45_000);
|
||||
|
||||
await page.goto('/admin');
|
||||
await page.waitForSelector('[data-hydrated]');
|
||||
|
||||
// Navigate to System tab
|
||||
await page.getByRole('button', { name: /system/i }).click();
|
||||
|
||||
const btn = page
|
||||
.locator('[data-thumbnails-trigger]')
|
||||
.or(page.getByRole('button', { name: /thumbnails erzeugen/i }));
|
||||
await expect(btn.first()).toBeVisible();
|
||||
await btn.first().click();
|
||||
|
||||
// Status transitions RUNNING → DONE; poll message shows the final summary
|
||||
await expect(page.getByTestId('thumbnails-status-done')).toBeVisible({ timeout: 30_000 });
|
||||
|
||||
await page.screenshot({ path: 'test-results/e2e/admin-generate-thumbnails.png' });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user