Skip to content

Commit 5e230ca

Browse files
Fix failing tests (#347)
* Switch to 'User Switching' to fix test failures * Remove Akismet because it can cause this test to be flaky
1 parent 34a6cce commit 5e230ca

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

features/plugin-activate.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ Feature: Activate WordPress plugins
3535
And the return code should be 1
3636

3737
Scenario: Activate all when one plugin is hidden by "all_plugins" filter
38-
Given I run `wp plugin install query-monitor`
39-
And a wp-content/mu-plugins/hide-qm-plugin.php file:
38+
Given I run `wp plugin install user-switching`
39+
And a wp-content/mu-plugins/hide-us-plugin.php file:
4040
"""
4141
<?php
4242
/**
43-
* Plugin Name: Hide Query Monitor on Production
44-
* Description: Hides the Query Monitor plugin on production sites
43+
* Plugin Name: Hide User Switching on Production
44+
* Description: Hides the User Switching plugin on production sites
4545
* Author: WP-CLI tests
4646
*/
4747
4848
add_filter( 'all_plugins', function( $all_plugins ) {
49-
unset( $all_plugins['query-monitor/query-monitor.php'] );
49+
unset( $all_plugins['user-switching/user-switching.php'] );
5050
return $all_plugins;
5151
} );
5252
"""
@@ -59,7 +59,7 @@ Feature: Activate WordPress plugins
5959
"""
6060
And STDOUT should not contain:
6161
"""
62-
Plugin 'query-monitor' activated.
62+
Plugin 'user-switching' activated.
6363
"""
6464

6565
Scenario: Not giving a slug on activate should throw an error unless --all given

features/plugin-update.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ Feature: Update WordPress plugins
236236
@require-wp-5.2
237237
Scenario: Updating all plugins with some of them having an invalid version shouldn't report an error
238238
Given a WP install
239+
And I run `wp plugin delete akismet`
239240

240241
When I run `wp plugin install health-check --version=1.5.0`
241242
Then STDOUT should not be empty

features/plugin.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,27 +572,27 @@ Feature: Manage WordPress plugins
572572
"""
573573
akismet
574574
jetpack
575-
query-monitor
575+
user-switching
576576
"""
577-
And a wp-content/mu-plugins/hide-qm-plugin.php file:
577+
And a wp-content/mu-plugins/hide-us-plugin.php file:
578578
"""
579579
<?php
580580
/**
581-
* Plugin Name: Hide Query Monitor on Production
582-
* Description: Hides the Query Monitor plugin on production sites
581+
* Plugin Name: Hide User Switchign on Production
582+
* Description: Hides the User Switching plugin on production sites
583583
* Author: WP-CLI tests
584584
*/
585585
586586
add_filter( 'all_plugins', function( $all_plugins ) {
587-
unset( $all_plugins['query-monitor/query-monitor.php'] );
587+
unset( $all_plugins['user-switching/user-switching.php'] );
588588
return $all_plugins;
589589
} );
590590
"""
591591

592592
When I run `wp plugin list --fields=name`
593593
Then STDOUT should not contain:
594594
"""
595-
query-monitor
595+
user-switching
596596
"""
597597

598598
Scenario: Show dropins plugin list

0 commit comments

Comments
 (0)