Skip to content

Commit

Permalink
Merge pull request #42 from newfold-labs/fix/onboarding-tests
Browse files Browse the repository at this point in the history
Unistall Woo and its exts after running tests
  • Loading branch information
wpalani authored Nov 24, 2024
2 parents d1a8025 + 9957710 commit e922c0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions tests/cypress/integration/coming-soon-woo.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ describe( 'Coming Soon with WooCommerce', function () {
} );

after( () => {
// Deactivate WooCommerce
cy.exec( `npx wp-env run cli wp plugin deactivate woocommerce`, {
timeout: 40000,
} );
// Uninstall WooCommerce and extensions
cy.exec(
'npx wp-env run cli wp plugin uninstall --all --deactivate --exclude=bluehost-wordpress-plugin,wp-plugin-hostgator,wp-plugin-crazy-domains,wp-plugin-web,wp-plugin-mojo',
{
timeout: 60000,
log: true,
}
);
} );

it( 'Replace our admin bar site status badge with WooCommerce\'s when active', () => {
Expand Down
4 changes: 3 additions & 1 deletion tests/cypress/integration/coming-soon.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ describe( 'Coming Soon', function () {
cy.exec( `npx wp-env run cli wp option update mm_coming_soon true` );
cy.exec( `npx wp-env run cli wp option update nfd_coming_soon true` );

// Deactivate WooCommerce
// Deactivate WooCommerce if it's active
cy.exec( `npx wp-env run cli wp plugin deactivate woocommerce`, {
timeout: 40000,
log: true,
failOnNonZeroExit: false,
} );
} );

Expand Down

0 comments on commit e922c0a

Please sign in to comment.