diff --git a/tests/cypress/integration/Home/commerceHomePage.cy.js b/tests/cypress/integration/Home/commerceHomePage.cy.js index ed7522cd..1e2d2c73 100644 --- a/tests/cypress/integration/Home/commerceHomePage.cy.js +++ b/tests/cypress/integration/Home/commerceHomePage.cy.js @@ -202,10 +202,7 @@ describe( 'Commerce Home Page- Next Steps', () => { } ).click( { force: true } ); cy.get( '.navigation-buttons_next' ).click( { force: true } ); cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/home' ); - cy.exec( `npx wp-env run cli wp plugin deactivate woocommerce`, { - failOnNonZeroExit: false, - } ); - cy.wait( 2000 ); + cy.reload(); cy.get( '#next-steps-section', { timeout: customCommandTimeout } ) .as( 'nextSteps' ) .should( 'exist' ) diff --git a/tests/cypress/integration/Home/homePageWithWoo.cy.js b/tests/cypress/integration/Home/homePageWithWoo.cy.js index c2b781d6..04aa4d7b 100644 --- a/tests/cypress/integration/Home/homePageWithWoo.cy.js +++ b/tests/cypress/integration/Home/homePageWithWoo.cy.js @@ -21,6 +21,13 @@ describe( 'Commerce Home Page- When WooCommerce is installed', () => { beforeEach( () => { cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/home' ); } ); + + after( () => { + cy.exec(`npx wp-env run cli wp plugin deactivate woocommerce`, { + failOnNonZeroExit: false, + } ); + cy.visit('/wp-admin/admin.php?page=' + pluginId + '#/home'); + } ); it( 'Verify next steps "Add your store info"', () => { waitForNextSteps(); diff --git a/tests/cypress/integration/Home/migration.cy.js b/tests/cypress/integration/Home/migration.cy.js index dec5479a..b247d9a6 100644 --- a/tests/cypress/integration/Home/migration.cy.js +++ b/tests/cypress/integration/Home/migration.cy.js @@ -36,7 +36,7 @@ describe( 'Home page - post migration events with help center ', () => { cy.intercept( APIList.update_nameserver ).as( 'events' ); cy.get( '.nfd-grid.nfd-gap-4 ul li a' ).eq( 0 ).click(); EventsAPI( APIList.update_nameserver, pluginId ); - cy.get( '.nfd-help-center', { timeout: customCommandTimeout } ).should( + cy.get( '.nfd-help-center', { timeout: 30000 } ).should( 'be.visible' ); cy.get( '.close-button' ).click(); @@ -49,7 +49,7 @@ describe( 'Home page - post migration events with help center ', () => { cy.intercept( APIList.connect_domain ).as( 'events' ); cy.get( '.nfd-grid.nfd-gap-4 ul li a' ).eq( 1 ).click(); EventsAPI( APIList.connect_domain, pluginId ); - cy.get( '.nfd-help-center', { timeout: customCommandTimeout } ).should( + cy.get( '.nfd-help-center', { timeout: 30000 } ).should( 'be.visible' ); cy.get( '.close-button' ).click(); @@ -63,8 +63,8 @@ describe( 'Home page - post migration events with help center ', () => { cy.get( '#next-steps-section', { timeout: customCommandTimeout } ) .scrollIntoView() .should( 'exist' ); - cy.get( '#add-a-product', { timeout: customCommandTimeout } ).should( - 'exist' - ); + cy.get( '#upload-media-to-your-site', { + timeout: customCommandTimeout, + } ).should( 'exist' ); } ); } ); diff --git a/tests/cypress/integration/Site-Capabilities/siteCapabilities.cy.js b/tests/cypress/integration/Site-Capabilities/siteCapabilities.cy.js index dc774f4a..28babddf 100644 --- a/tests/cypress/integration/Site-Capabilities/siteCapabilities.cy.js +++ b/tests/cypress/integration/Site-Capabilities/siteCapabilities.cy.js @@ -128,7 +128,7 @@ describe( 'Verify Wondercart accessibility as per site capabilities', () => { ); } ); - it( 'Verify clicking Install Now successfully installs Wonder Cart plugin', () => { + it.skip( 'Verify clicking Install Now successfully installs Wonder Cart plugin', () => { cy.get( `.${ appId }-app-navitem-Store`, { timeout: customCommandTimeout, } ).click(); @@ -138,8 +138,11 @@ describe( 'Verify Wondercart accessibility as per site capabilities', () => { .click(); cy.get( '.nfd-notification--success', { timeout: customCommandTimeout, + }).should('exist'); + cy.get( `.${ appId }-app-site-info`, { + timeout: customCommandTimeout, } ).should( 'exist' ); - cy.get( '#wonder-cart-init', { timeout: mediumWait } ).should( + cy.get( '#wonder-cart-init', { timeout: customCommandTimeout } ).should( 'exist' ); } ); diff --git a/tests/cypress/integration/Store/storePage.cy.js b/tests/cypress/integration/Store/storePage.cy.js index 264b3693..be1c35b0 100644 --- a/tests/cypress/integration/Store/storePage.cy.js +++ b/tests/cypress/integration/Store/storePage.cy.js @@ -4,6 +4,7 @@ import { comingSoon } from '../wp-module-support/utils.cy'; const pluginId = GetPluginId(); const appId = getAppId(); const customCommandTimeout = 30000; +const longWait = 60000; describe( 'Store Page- WooCommerce is deactivated/uninstalled', () => { before( () => { @@ -11,6 +12,9 @@ describe( 'Store Page- WooCommerce is deactivated/uninstalled', () => { failOnNonZeroExit: false, } ); cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/home' ); + cy.get( `.${ appId }-app-site-info`, { timeout: longWait } ).should( + 'exist' + ); comingSoon( false ); } );