test(news): respect sandboxed preview focus and browser isolation
CI / check (push) Successful in 4m10s
CI / deploy (push) Failing after 1m49s
CI / publish-container (push) Skipped

This commit is contained in:
Simo committed 2026-09-13 20:48:26 +02:00
1 parent 46f7ad6571
commit 043c763484
3 files changed
+7 -3

No files matched your search

+5 -2
View File
@@ -51,7 +51,6 @@ test("staff signs in, saves a draft, previews it and publishes to anonymous read
baseURL,
locale: "en-US",
ignoreHTTPSErrors: true,
serviceWorkers: "block",
});
const reader = await anonymous.newPage();
const errors: string[] = [];
@@ -199,7 +198,11 @@ test("staff signs in, saves a draft, previews it and publishes to anonymous read
expect(
await rows("SELECT id FROM website_article_revisions"),
).toHaveLength(0);
await page.keyboard.press("Escape");
// Preview autofocus enters its sandboxed iframe, whose Escape event cannot reach the dialog.
await page
.getByRole("dialog")
.getByRole("button", { name: "Close", exact: true })
.click();
await expect(page.getByRole("dialog")).toHaveCount(0);
});
await test.step("publish once and persist revision, audit and delivery intent", async () => {
-1
View File
@@ -25,7 +25,6 @@ export default defineConfig({
baseURL: process.env.NEWS_E2E_BASE_URL,
locale: "en-US",
ignoreHTTPSErrors: true,
serviceWorkers: "block",
trace: "retain-on-failure",
screenshot: "only-on-failure",
video: "off",