Skip to content

Commit

Permalink
Merge pull request #2802 from 10up/burhan/enhance-tests-coverage
Browse files Browse the repository at this point in the history
Add more tests for activate-feature command
  • Loading branch information
felipeelia authored May 31, 2022
2 parents 49082f5 + de47da4 commit 199bd5f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/cypress/integration/wp-cli.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,19 @@ describe('WP-CLI Commands', () => {
cy.wpCli('wp elasticpress activate-feature search')
.its('stdout')
.should('contain', 'Feature activated');

cy.wpCli('wp elasticpress activate-feature invalid', true)
.its('stderr')
.should('contain', 'No feature with that slug is registered');

cy.wpCli('wp elasticpress activate-feature woocommerce', true)
.its('stderr')
.should('contain', 'Feature requirements are not met');

cy.wpCli('wp elasticpress activate-feature protected_content', true)
.its('stderr')
.should('contain', 'This feature requires a re-index')
.should('contain', 'Feature is usable but there are warnings');
});

it('Can list all the active features if user runs wp elasticpress list-features command', () => {
Expand Down

0 comments on commit 199bd5f

Please sign in to comment.