Skip to content

Commit 44c1fe3

Browse files
committed
Fix scenarios and given in feature tests
1 parent 93b5c83 commit 44c1fe3

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

features/theme-delete.feature

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ Feature: Delete WordPress themes
22

33
Background:
44
Given a WP install
5-
And I run `wp theme install twentytwelve --force`
5+
And I run `wp theme delete --all --force`
6+
And I run `wp theme install twentytwelve`
7+
And I run `wp theme install twentyeleven --activate`
68

79
Scenario: Delete an installed theme
810
When I run `wp theme delete twentytwelve`

features/theme-install.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Feature: Install WordPress themes
22

33
Background:
44
Given a WP install
5-
And I try `wp theme delete twentytwelve --force`
5+
And I run `wp theme delete --all --force`
66

77
Scenario: Return code is 1 when one or more theme installations fail
88
When I try `wp theme install twentytwelve twentytwelve-not-a-theme`

features/theme-update.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Feature: Update WordPress themes
1919

2020
Scenario: Install a theme, then update to a specific version of that theme
2121
Given a WP install
22-
And I run `wp theme delete twentytwelve --force`
22+
And I run `wp theme delete --all --force`
2323

2424
When I run `wp theme install twentytwelve --version=3.0`
2525
Then STDOUT should not be empty

features/theme.feature

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ Feature: Manage WordPress themes
22

33
Scenario: Installing and deleting theme
44
Given a WP install
5-
And I run `wp theme delete twentytwelve --force`
5+
And I run `wp theme delete --all --force`
6+
And I run `wp theme install twentyeleven --activate`
67

78
When I run `wp theme install twentytwelve`
89
Then STDOUT should not be empty
@@ -74,7 +75,8 @@ Feature: Manage WordPress themes
7475

7576
Scenario: Install a theme, activate, then force install an older version of the theme
7677
Given a WP install
77-
And I run `wp theme delete twentytwelve --force`
78+
And I run `wp theme delete --all --force`
79+
And I run `wp theme install twentyeleven --activate`
7880

7981
When I run `wp theme install twentytwelve --version=1.4`
8082
Then STDOUT should not be empty
@@ -130,7 +132,8 @@ Feature: Manage WordPress themes
130132

131133
Scenario: Exclude theme from bulk updates.
132134
Given a WP install
133-
And I run `wp theme delete twentytwelve --force`
135+
And I run `wp theme delete --all --force`
136+
And I run `wp theme install twentyeleven --activate`
134137

135138
When I run `wp theme install twentytwelve --version=1.4 --force`
136139
Then STDOUT should contain:
@@ -172,7 +175,7 @@ Feature: Manage WordPress themes
172175

173176
Scenario: Get the path of an installed theme
174177
Given a WP install
175-
And I run `wp theme delete twentytwelve --force`
178+
And I run `wp theme delete --all --force`
176179

177180
When I run `wp theme install twentytwelve`
178181
Then STDOUT should not be empty
@@ -185,7 +188,7 @@ Feature: Manage WordPress themes
185188

186189
Scenario: Activate an already active theme
187190
Given a WP install
188-
And I run `wp theme delete twentytwelve --force`
191+
And I run `wp theme delete --all --force`
189192

190193
When I run `wp theme install twentytwelve`
191194
Then STDOUT should not be empty
@@ -231,6 +234,7 @@ Feature: Manage WordPress themes
231234

232235
Scenario: Install a theme when the theme directory doesn't yet exist
233236
Given a WP install
237+
And I run `wp theme delete --all --force`
234238

235239
When I run `rm -rf wp-content/themes`
236240
And I run `if test -d wp-content/themes; then echo "fail"; fi`
@@ -402,6 +406,7 @@ Feature: Manage WordPress themes
402406

403407
Scenario: When updating a theme --format should be the same when using --dry-run
404408
Given a WP install
409+
And I run `wp theme delete --all --force`
405410

406411
When I run `wp theme install --force twentytwelve --version=1.0`
407412
Then STDOUT should not be empty
@@ -441,6 +446,7 @@ Feature: Manage WordPress themes
441446

442447
Scenario: Check json and csv formats when updating a theme
443448
Given a WP install
449+
And I run `wp theme delete --all --force`
444450

445451
When I run `wp theme install --force twentytwelve --version=1.0`
446452
Then STDOUT should not be empty
@@ -490,7 +496,7 @@ Feature: Manage WordPress themes
490496

491497
Scenario: Get status field in theme detail
492498
Given a WP install
493-
And I run `wp theme delete twentytwelve --force`
499+
And I run `wp theme delete --all --force`
494500

495501
When I run `wp theme install twentytwelve`
496502
Then STDOUT should not be empty
@@ -517,7 +523,7 @@ Feature: Manage WordPress themes
517523

518524
Scenario: Theme activation fails when slug does not match exactly
519525
Given a WP install
520-
And I run `wp theme delete twentytwelve --force`
526+
And I run `wp theme delete --all --force`
521527

522528
When I run `wp theme install twentytwelve`
523529
Then the return code should be 0
@@ -576,8 +582,7 @@ Feature: Manage WordPress themes
576582

577583
Scenario: Parent theme is active when its child is active
578584
Given a WP install
579-
And I run `wp theme delete twentytwelve --force`
580-
585+
And I run `wp theme delete --all --force`
581586
And I run `wp theme install twentytwelve`
582587
And I run `wp theme install moina-blog --activate`
583588

features/upgradables.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,5 +208,5 @@ Feature: Manage WordPress themes and plugins
208208

209209
Examples:
210210
| type | type_name | item | item_title | version | zip_file | file_to_check |
211-
| theme | Theme | p2 | P2 | 1.0.1 | https://wordpress.org/themes/download/p2.1.0.1.zip | {CONTENT_DIR}/p2/style.css |
211+
| theme | Theme | moina | Moina | 1.1.2 | https://wordpress.org/themes/download/moina.1.1.2.zip | {CONTENT_DIR}/moina/style.css |
212212
| plugin | Plugin | category-checklist-tree | Category Checklist Tree | 1.2 | https://downloads.wordpress.org/plugin/category-checklist-tree.1.2.zip | {CONTENT_DIR}/category-checklist-tree/category-checklist-tree.php |

0 commit comments

Comments
 (0)