Skip to content

Commit

Permalink
failOnNonZeroExit condition
Browse files Browse the repository at this point in the history
  • Loading branch information
sangeetha-nayak committed Oct 30, 2023
1 parent eb105c9 commit ffc29ee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ Cypress.Commands.add('logout', () => {
*/
Cypress.Commands.add('activatePlugin', (pluginName) => {
if (pluginName.toLowerCase() !== 'all') {
cy.exec(`npx wp-env run cli wp plugin activate ${pluginName}`);
cy.exec(`npx wp-env run cli wp plugin activate ${pluginName}`, {
failOnNonZeroExit: false,
});
} else {
cy.exec('npx wp-env run cli wp plugin activate --all');
cy.exec('npx wp-env run cli wp plugin activate --all', {
failOnNonZeroExit: false,
});
}
});

0 comments on commit ffc29ee

Please sign in to comment.