From bf61b602c11d95e3953b975c858a3422c29e7732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrija=20Vu=C4=8Dini=C4=87?= Date: Thu, 12 Dec 2024 13:15:40 +0100 Subject: [PATCH] E2E: Fix the LOHP theme test (#97346) Some back-and-forth to try and unflaky this test... Mix of race condition abort/goto and not being able to hover->click. --------- Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com> --- test/e2e/specs/onboarding/signup__with-theme-LOHP.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/e2e/specs/onboarding/signup__with-theme-LOHP.ts b/test/e2e/specs/onboarding/signup__with-theme-LOHP.ts index 67cbd17a3507e7..bad37d8a6ec7a0 100644 --- a/test/e2e/specs/onboarding/signup__with-theme-LOHP.ts +++ b/test/e2e/specs/onboarding/signup__with-theme-LOHP.ts @@ -78,7 +78,8 @@ describe( 'Lifecyle: Logged Out Home Page, signup, onboard, launch and cancel su themeButtonUrl.protocol = calypsoUrl.protocol; await route.abort(); - await page.goto( themeButtonUrl.href ); + await page.unrouteAll( { behavior: 'ignoreErrors' } ); + await page.goto( themeButtonUrl.href, { waitUntil: 'load' } ); } ); } // Get theme slug @@ -86,8 +87,8 @@ describe( 'Lifecyle: Logged Out Home Page, signup, onboard, launch and cancel su themeSlug = pageMatch?.[ 1 ] || null; // Hover, otherwise the element isn't considered stable, and is out of the viewport. - await themeCard.hover(); - await themeCard.getByText( 'Start with this theme' ).click(); + await themeCard.hover( { force: true } ); + await themeCard.getByText( 'Start with this theme' ).click( { force: true } ); } ); it( 'Sign up as new user', async function () {