diff --git a/apps/web/e2e/legal.spec.ts b/apps/web/e2e/legal.spec.ts index c12eae7..519bc81 100644 --- a/apps/web/e2e/legal.spec.ts +++ b/apps/web/e2e/legal.spec.ts @@ -63,7 +63,11 @@ test('the admin form previews and publishes the privacy policy', async ({ browse await expect(editor.locator('.legal-editor__preview strong')).toHaveText('only what is needed'); await page.getByRole('button', { name: /save legal pages|rechtsseiten speichern/i }).click(); - await expect(page.getByRole('status')).toBeVisible(); + // Auf den Abschnitt gescopet: seit der Schriftverwaltung (#304) hat /admin + // weitere Live-Regionen (Upload-Fortschritt), und ein seitenweites + // getByRole('status') wäre mehrdeutig. Gemeint war immer die + // Erfolgsmeldung DIESES Formulars. + await expect(page.locator('.legal-settings').getByRole('status')).toBeVisible(); await admin.close(); const anonymous = await browser.newContext({ baseURL: BASE_URL }); diff --git a/apps/web/src/pages/AdminSettingsPage.tsx b/apps/web/src/pages/AdminSettingsPage.tsx index df30922..206992f 100644 --- a/apps/web/src/pages/AdminSettingsPage.tsx +++ b/apps/web/src/pages/AdminSettingsPage.tsx @@ -459,7 +459,10 @@ function LegalSettingsForm({ settings }: { settings: InstanceSettings }): React. } return ( -
+ // Named class so the e2e can scope its success-message assertion to this + // form: /admin has more than one live region since #304 (upload progress), + // and a page-wide getByRole('status') became ambiguous. +

{t('admin.title')}

{t('admin.hint')}

void onSubmit(event)} noValidate>