test(e2e): update suite for shipped features + gate Chromium-only perms
The running test container had been built from an older tree; rebuilding it to pick up current app code surfaced several tests that predated shipped security/UX features: - file-upload-attacks / rate-limit: assert the magic-byte rejection wording and upload a real decodable JPEG (a zero-buffer is now rejected at the boundary). - ddos: open SSE via the single-use /stream/ticket flow, not the dead ?token=. - recover-page / join: the PIN field auto-submits on the 4th digit, so don't race an explicit submit click against the ensuing navigation. - gestures-doubletap / sheet-escape: target the lightbox by aria-labelledby and anchor the radio accessible-name match at the start (gated dialog semantics). playwright.config: camera/mic/clipboard are Chromium-only permissions (they threw "Unknown permission: camera" on firefox/webkit and failed the test at context creation); grant them per-Chromium-project. firefox-android drops the unsupported isMobile flag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -54,9 +54,13 @@ test.describe('Auth — join flow', () => {
|
||||
await expect(join.recoveryPinInput).toBeVisible();
|
||||
await expect(page.getByText(/Charlie.*bereits vergeben/)).toBeVisible();
|
||||
|
||||
// Type correct PIN → land on /feed with a new JWT
|
||||
// Type correct PIN → land on /feed with a new JWT. Filling the 4th digit
|
||||
// auto-submits (see pin-auto-submit.spec), so an explicit submit click would
|
||||
// race the navigation; click only as a fallback if the button is still around.
|
||||
await join.recoveryPinInput.fill(original.pin);
|
||||
await join.recoverySubmit.click();
|
||||
if (await join.recoverySubmit.isEnabled().catch(() => false)) {
|
||||
await join.recoverySubmit.click().catch(() => {});
|
||||
}
|
||||
await page.waitForURL('**/feed');
|
||||
|
||||
const storage = await readStorage(page);
|
||||
|
||||
Reference in New Issue
Block a user