From 97d143b762455570dc26e9c19ebaa64b5c557ae9 Mon Sep 17 00:00:00 2001 From: Sam Seay Date: Thu, 15 Apr 2021 09:20:44 +1200 Subject: [PATCH] Add in missing awaits that could have been causing tests to be flaky. (https://github.com/woocommerce/woocommerce-admin/pull/6800) --- plugins/woocommerce-admin/tests/e2e/pages/OnboardingWizard.ts | 2 +- .../tests/e2e/sections/onboarding/StoreDetailsSection.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce-admin/tests/e2e/pages/OnboardingWizard.ts b/plugins/woocommerce-admin/tests/e2e/pages/OnboardingWizard.ts index 3ac68d27095..6935acef38a 100644 --- a/plugins/woocommerce-admin/tests/e2e/pages/OnboardingWizard.ts +++ b/plugins/woocommerce-admin/tests/e2e/pages/OnboardingWizard.ts @@ -63,7 +63,7 @@ export class OnboardingWizard extends BasePage { await this.clickButtonWithText( 'No thanks' ); } - this.page.waitForNavigation( { + await this.page.waitForNavigation( { waitUntil: 'networkidle0', timeout: 2000, } ); diff --git a/plugins/woocommerce-admin/tests/e2e/sections/onboarding/StoreDetailsSection.ts b/plugins/woocommerce-admin/tests/e2e/sections/onboarding/StoreDetailsSection.ts index dcfd0394b15..22ba42b4077 100644 --- a/plugins/woocommerce-admin/tests/e2e/sections/onboarding/StoreDetailsSection.ts +++ b/plugins/woocommerce-admin/tests/e2e/sections/onboarding/StoreDetailsSection.ts @@ -90,7 +90,7 @@ export class StoreDetailsSection extends BasePage { } async selectSetupForClient() { - setCheckbox( '.components-checkbox-control__input' ); + await setCheckbox( '.components-checkbox-control__input' ); } async checkClientSetupCheckbox( selected: boolean ) {