From 26bfe92ea459baed9a0d6e7f3f1de45076e7d99f Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Thu, 10 Oct 2024 19:26:49 +0200 Subject: [PATCH] fix e2e --- .../react/e2e-tests/component-testing.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts index 9a919e235e69..c8c40c82ba34 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts @@ -45,8 +45,6 @@ test.describe("component testing", () => { browserName, }) => { test.skip(browserName !== "chromium", `Skipping tests for ${browserName}`); - await setForceFailureFlag(true); - const sbPage = new SbPage(page, expect); await sbPage.navigateToStory("addons/test", "Mismatch Failure"); @@ -70,6 +68,10 @@ test.describe("component testing", () => { // TODO: This is just temporary, the UI will be different await page.locator("#addons").getByRole("button").nth(2).click(); + + // Wait for test results to appear + const errorFilter = page.getByLabel("Show errors"); + await expect(errorFilter).toBeVisible({ timeout: 30000 }); // Assert discrepancy: CLI pass + Browser fail const failingStoryElement = page.locator(