E2e/fix obw industry spec (#36260)

* Fix 'can save industry changes' test

* Add changelog

* Wait store details contents to load
This commit is contained in:
rodelgc 2023-01-03 20:42:47 +00:00 committed by GitHub
parent df0ddb2dff
commit 7ecdd50365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix flakiness of the `can save industry changes when navigating back to "Store Details"` E2E test.

View File

@ -27,6 +27,10 @@ test.describe( 'Store owner can complete onboarding wizard', () => {
storeDetails.us.expectedIndustries
);
await page.click( 'button >> text=Continue' );
await expect( page ).toHaveURL( /.*step=product-types/ );
await expect(
page.locator( '.product-types button >> text=Continue' )
).toBeVisible();
} );
// eslint-disable-next-line jest/expect-expect
@ -41,8 +45,8 @@ test.describe( 'Store owner can complete onboarding wizard', () => {
// Navigate back to "Store Details" section
await page.click( 'button >> text=Store Details' );
await onboarding.handleSaveChangesModal( page, { saveChanges: true } );
await page.locator( 'text="Welcome to WooCommerce"' ).waitFor();
// Navigate back to "Industry" section
await page.click( 'button >> text=Industry' );