From 7619492516a2e8c7279a87c4b9b927c9a8663406 Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Sun, 9 Aug 2026 00:14:10 +0200 Subject: [PATCH] test(v2): make board tour dismissal optional --- e2e/custom-widgets-custom-jsx-v2.spec.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/e2e/custom-widgets-custom-jsx-v2.spec.ts b/e2e/custom-widgets-custom-jsx-v2.spec.ts index 9de595362..a88ca1944 100644 --- a/e2e/custom-widgets-custom-jsx-v2.spec.ts +++ b/e2e/custom-widgets-custom-jsx-v2.spec.ts @@ -76,8 +76,15 @@ describe("Custom JSX v2 workbench", () => { await expect(page.getByText('Widget "E2E Custom JSX v2" updated successfully.')).toBeVisible({ timeout: 15_000 }); await page.goto(baseUrl); - await page.getByRole("button", { name: "Skip tour", exact: true }).click(); - await expect(page.locator('[data-onboarding-tour-overlay="true"]')).toHaveCount(0); + const tourOverlay = page.locator('[data-onboarding-tour-overlay="true"]'); + const skipTour = page.getByRole("button", { name: "Skip tour", exact: true }); + try { + await skipTour.waitFor({ state: "visible", timeout: 5_000 }); + await skipTour.click(); + await expect(tourOverlay).toHaveCount(0); + } catch (error) { + if ((await tourOverlay.count()) > 0) throw error; + } const editToggle = page.getByTestId("board-edit-mode-toggle"); await editToggle.click(); await expect(editToggle).toHaveAttribute("aria-pressed", "true", { timeout: 15_000 });