From 170a38c0bae050c752d99aed150f2dfd9605b86d Mon Sep 17 00:00:00 2001 From: Timo K Date: Thu, 11 Dec 2025 11:30:14 +0100 Subject: [PATCH] fix playwright incompatible browser toast --- playwright/fixtures/widget-user.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/playwright/fixtures/widget-user.ts b/playwright/fixtures/widget-user.ts index 433c960b..b0c46788 100644 --- a/playwright/fixtures/widget-user.ts +++ b/playwright/fixtures/widget-user.ts @@ -113,7 +113,8 @@ async function registerUser( await page.getByRole("button", { name: "Register" }).click(); const continueButton = page.getByRole("button", { name: "Continue" }); try { - await expect(continueButton).toBeVisible({ timeout: 5000 }); + await expect(continueButton).toBeVisible({ timeout: 700 }); + // why do we need to put in the passwor if there is a continue button? await page .getByRole("textbox", { name: "Password", exact: true }) .fill(PASSWORD); @@ -124,6 +125,16 @@ async function registerUser( await expect( page.getByRole("heading", { name: `Welcome ${username}` }), ).toBeVisible(); + + // Dismiss incompatible browser toast + const dismissButton = page.getByRole("button", { name: "Dismiss" }); + try { + await expect(dismissButton).toBeVisible({ timeout: 700 }); + await dismissButton.click(); + } catch { + // dismissButton not visible, continue as normal + } + await setDevToolElementCallDevUrl(page); const clientHandle = await page.evaluateHandle(() =>