From eeb7b005ef01f6d71878108d6db7e17425c73716 Mon Sep 17 00:00:00 2001 From: Pedro Almeida Date: Wed, 5 Aug 2026 08:55:19 +0100 Subject: [PATCH] fix: stabilize e2e auth setup for CI - Wait for login form or username indicator after goto('/') to avoid 'Execution context was destroyed' during OAuth redirects - Use evaluate click for skip tour button to bypass PF6 modal backdrop intercepting pointer events Signed-off-by: Pedro Almeida --- e2e/auth.setup.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/e2e/auth.setup.ts b/e2e/auth.setup.ts index 08876cea..f52e7d91 100644 --- a/e2e/auth.setup.ts +++ b/e2e/auth.setup.ts @@ -9,6 +9,11 @@ setup('authenticate', async ({ page }) => { await page.goto('/'); + await page + .locator('[data-test-id="login"], [data-test="username"]') + .first() + .waitFor({ timeout: 30_000 }); + const authDisabled = await page.evaluate(() => window.SERVER_FLAGS?.authDisabled); if (!authDisabled) { @@ -25,7 +30,7 @@ setup('authenticate', async ({ page }) => { const skipTour = page.locator('[data-test="tour-step-footer-secondary"]'); if (await skipTour.isVisible().catch(() => false)) { - await skipTour.click(); + await skipTour.evaluate((el: HTMLElement) => el.click()); } await page.context().storageState({ path: authFile });