Merge pull request #27581 from woocommerce/fix/obw-e2e-test-wc-4-5

Fix OBW e2e test to reflect changes in WooCommerce 4.5 release
This commit is contained in:
jonathansadowski 2020-09-04 11:44:52 -05:00 committed by GitHub
commit 802a31e0d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -93,7 +93,7 @@ const completeOnboardingWizard = async () => {
expect( industryCheckboxes ).toHaveLength( 9 );
// Select all industries including "Other"
for ( let i = 0; i < 10; i++ ) {
for ( let i = 0; i < 9; i++ ) {
await industryCheckboxes[i].click();
}
@ -149,9 +149,14 @@ const completeOnboardingWizard = async () => {
await page.waitForSelector( '.woocommerce-select-control__control' );
await expect( page ).toClick( '.woocommerce-select-control__option', { text: config.get( 'onboardingwizard.sellingelsewhere' ) } );
// Disable business extension downloads
const pluginToggle = await page.$( '.woocommerce-business-extensions .components-checkbox-control__input-container' );
pluginToggle.click();
// Query for the extensions toggles
const extensionsToggles = await page.$$( '.components-form-toggle__input' );
expect( extensionsToggles ).toHaveLength( 3 );
// Disable download of the 3 extensions
for ( let i = 0; i < 3; i++ ) {
await extensionsToggles[i].click();
}
// Wait for "Continue" button to become active
await page.waitForSelector( 'button.is-primary:not(:disabled)' );