Adjusted the OBW test for changes in WC-Admin 1.4.0

This commit is contained in:
Christopher Allford 2020-07-27 14:38:43 -07:00
parent cc118c0c10
commit edf1932ee9
1 changed files with 5 additions and 10 deletions

View File

@ -139,22 +139,17 @@ const completeOnboardingWizard = async () => {
// Fill the number of products you plan to sell
await selectControls[0].click();
await page.waitForSelector( '.woocommerce-select-control__listbox' );
await page.waitForSelector( '.woocommerce-select-control__control' );
await expect( page ).toClick( '.woocommerce-select-control__option', { text: config.get( 'onboardingwizard.numberofproducts' ) } );
// Fill currently selling elsewhere
await selectControls[1].click();
await page.waitForSelector( '.woocommerce-select-control__listbox' );
await page.waitForSelector( '.woocommerce-select-control__control' );
await expect( page ).toClick( '.woocommerce-select-control__option', { text: config.get( 'onboardingwizard.sellingelsewhere' ) } );
// Query for the plugin upload toggles
const pluginToggles = await page.$$( '.components-form-toggle__input' );
expect( pluginToggles ).toHaveLength( 3 );
// Disable Market on Facebook, Mailchimp and Google Shopping download
for ( let i = 0; i < 3; i++ ) {
await pluginToggles[i].click();
}
// Disable business extension downloads
const pluginToggle = await page.$( '.woocommerce-business-extensions .components-checkbox-control__input-container' );
pluginToggle.click();
// Wait for "Continue" button to become active
await page.waitForSelector( 'button.is-primary:not(:disabled)' );