Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion features/check-plugin-active-count.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Feature: Check whether a high number of plugins are activated
| name | status | message |
| plugin-active-count | success | Number of active plugins (2) is less than threshold (80). |

# WordPress Importer requirement.
@require-wp-5.2
Scenario: Greater than threshold plugins are active
Given a WP install
And a config.yml file:
Expand All @@ -26,7 +28,7 @@ Feature: Check whether a high number of plugins are activated
options:
threshold_count: 3
"""
And I run `wp plugin install debug-bar wp-author-widget`
And I run `wp plugin install debug-bar wordpress-importer`
And I run `wp plugin activate --all`

When I run `wp doctor check plugin-active-count --config=config.yml`
Expand Down
12 changes: 9 additions & 3 deletions features/check-plugin-deactivated.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,31 @@ Feature: Check whether a high percentage of plugins are deactivated
| name | description |
| plugin-deactivated | Warns when greater than 40% of plugins are deactivated. |

# WordPress Importer requirement.
@require-wp-5.2
Scenario: All plugins are activated
Given a WP install
And I run `wp plugin install debug-bar wp-author-widget`
And I run `wp plugin install debug-bar wordpress-importer`
And I run `wp plugin activate --all`

When I run `wp doctor check plugin-deactivated`
Then STDOUT should be a table containing rows:
| name | status | message |
| plugin-deactivated | success | Less than 40 percent of plugins are deactivated. |

# WordPress Importer requirement.
@require-wp-5.2
Scenario: Too many plugins are deactivated
Given a WP install
And I run `wp plugin install debug-bar wp-author-widget`
And I run `wp plugin install debug-bar wordpress-importer`

When I run `wp doctor check plugin-deactivated`
Then STDOUT should be a table containing rows:
| name | status | message |
| plugin-deactivated | warning | Greater than 40 percent of plugins are deactivated. |

# WordPress Importer requirement.
@require-wp-5.2
Scenario: Custom percentage of deactivated plugins
Given a WP install
And a custom.yml file:
Expand All @@ -36,7 +42,7 @@ Feature: Check whether a high percentage of plugins are deactivated
options:
threshold_percentage: 60
"""
And I run `wp plugin install debug-bar wp-author-widget`
And I run `wp plugin install debug-bar wordpress-importer`

When I run `wp doctor check plugin-deactivated --config=custom.yml`
Then STDOUT should be a table containing rows:
Expand Down