Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more tests for activate-feature command #2802

Merged
merged 1 commit into from
May 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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