Skip to content

Commit 84f9ccb

Browse files
authored
Fix failing theme tests (#540)
1 parent c54ca95 commit 84f9ccb

5 files changed

Lines changed: 59 additions & 59 deletions

File tree

‎features/theme-delete.feature‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ Feature: Delete WordPress themes
5858

5959
Scenario: Delete all installed themes when active theme has a parent
6060
Given a WP install
61-
And I run `wp theme install moina-blog --activate`
61+
And I run `wp theme install oceanly-green --activate`
6262

6363
When I run `wp theme list --field=name`
6464
Then STDOUT should contain:
6565
"""
66-
moina-blog
67-
moina
66+
oceanly-green
67+
oceanly
6868
"""
6969

70-
When I try `wp theme delete moina-blog`
70+
When I try `wp theme delete oceanly-green`
7171
Then STDERR should contain:
7272
"""
7373
Can't delete the currently active theme
@@ -77,7 +77,7 @@ Feature: Delete WordPress themes
7777
Error: No themes deleted.
7878
"""
7979

80-
When I try `wp theme delete moina`
80+
When I try `wp theme delete oceanly`
8181
Then STDERR should contain:
8282
"""
8383
Can't delete the parent of the currently active theme
@@ -96,8 +96,8 @@ Feature: Delete WordPress themes
9696
When I run `wp theme list --field=name`
9797
Then STDOUT should contain:
9898
"""
99-
moina-blog
100-
moina
99+
oceanly-green
100+
oceanly
101101
"""
102102

103103
When I run `wp theme delete --all --force`

‎features/theme-install.feature‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Feature: Install WordPress themes
5959
Given a WP install
6060
And an empty cache
6161

62-
When I run `wp theme install moina`
62+
When I run `wp theme install oceanly`
6363
Then STDOUT should contain:
6464
"""
6565
Success: Installed 1 of 1 themes.
@@ -69,13 +69,13 @@ Feature: Install WordPress themes
6969
Using cached file
7070
"""
7171

72-
When I run `wp theme uninstall moina`
72+
When I run `wp theme uninstall oceanly`
7373
Then STDOUT should contain:
7474
"""
7575
Success: Deleted 1 of 1 themes.
7676
"""
7777

78-
When I run `wp theme install moina-blog`
78+
When I run `wp theme install oceanly-green`
7979
Then STDOUT should contain:
8080
"""
8181
Success: Installed 1 of 1 themes.

‎features/theme-update.feature‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Feature: Update WordPress themes
5050
"""
5151

5252
# One theme installed.
53-
Given I run `wp theme install moina --version=1.0.2`
53+
Given I run `wp theme install storefront --version=1.0.0`
5454

5555
When I try `wp theme update`
5656
Then the return code should be 1
@@ -241,7 +241,7 @@ Feature: Update WordPress themes
241241
Given a WP install
242242
And I run `wp theme delete --all --force`
243243

244-
When I run `wp theme install moina --version=1.0.2`
244+
When I run `wp theme install storefront --version=1.0.0`
245245
Then STDOUT should not be empty
246246

247247
When I run `wp theme install twentytwelve --version=1.0`
@@ -250,7 +250,7 @@ Feature: Update WordPress themes
250250
When I try `wp theme update --all`
251251
Then STDOUT should contain:
252252
"""
253-
Updating Moina...
253+
Updating Storefront...
254254
"""
255255

256256
And STDOUT should contain:

‎features/theme.feature‎

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -330,78 +330,78 @@ Feature: Manage WordPress themes
330330
@require-wp-5.7
331331
Scenario: Enabling and disabling a theme
332332
Given a WP multisite install
333-
And I run `wp theme install moina`
334-
And I run `wp theme install moina-blog`
333+
And I run `wp theme install oceanly`
334+
And I run `wp theme install oceanly-green`
335335

336336
When I try `wp option get allowedthemes`
337337
Then the return code should be 1
338338
# STDERR may or may not be empty, depending on WP-CLI version.
339339
And STDOUT should be empty
340340

341-
When I run `wp theme enable moina-blog`
341+
When I run `wp theme enable oceanly-green`
342342
Then STDOUT should contain:
343343
"""
344-
Success: Enabled the 'Moina Blog' theme.
344+
Success: Enabled the 'Oceanly Green' theme.
345345
"""
346346

347347
When I run `wp option get allowedthemes`
348348
Then STDOUT should contain:
349349
"""
350-
'moina-blog' => true
350+
'oceanly-green' => true
351351
"""
352352

353-
When I run `wp theme disable moina-blog`
353+
When I run `wp theme disable oceanly-green`
354354
Then STDOUT should contain:
355355
"""
356-
Success: Disabled the 'Moina Blog' theme.
356+
Success: Disabled the 'Oceanly Green' theme.
357357
"""
358358

359359
When I run `wp option get allowedthemes`
360360
Then STDOUT should not contain:
361361
"""
362-
'moina-blog' => true
362+
'oceanly-green' => true
363363
"""
364364

365-
When I run `wp theme enable moina-blog --activate`
365+
When I run `wp theme enable oceanly-green --activate`
366366
Then STDOUT should contain:
367367
"""
368-
Success: Enabled the 'Moina Blog' theme.
369-
Success: Switched to 'Moina Blog' theme.
368+
Success: Enabled the 'Oceanly Green' theme.
369+
Success: Switched to 'Oceanly Green' theme.
370370
"""
371371

372372
# Hybrid_Registry throws warning for PHP 8+.
373373
When I try `wp network meta get 1 allowedthemes`
374374
Then STDOUT should not contain:
375375
"""
376-
'moina-blog' => true
376+
'oceanly-green' => true
377377
"""
378378

379379
# Hybrid_Registry throws warning for PHP 8+.
380-
When I try `wp theme enable moina-blog --network`
380+
When I try `wp theme enable oceanly-green --network`
381381
Then STDOUT should contain:
382382
"""
383-
Success: Network enabled the 'Moina Blog' theme.
383+
Success: Network enabled the 'Oceanly Green' theme.
384384
"""
385385

386386
# Hybrid_Registry throws warning for PHP 8+.
387387
When I try `wp network meta get 1 allowedthemes`
388388
Then STDOUT should contain:
389389
"""
390-
'moina-blog' => true
390+
'oceanly-green' => true
391391
"""
392392

393393
# Hybrid_Registry throws warning for PHP 8+.
394-
When I try `wp theme disable moina-blog --network`
394+
When I try `wp theme disable oceanly-green --network`
395395
Then STDOUT should contain:
396396
"""
397-
Success: Network disabled the 'Moina Blog' theme.
397+
Success: Network disabled the 'Oceanly Green' theme.
398398
"""
399399

400400
# Hybrid_Registry throws warning for PHP 8+.
401401
When I try `wp network meta get 1 allowedthemes`
402402
Then STDOUT should not contain:
403403
"""
404-
'moina-blog' => true
404+
'oceanly-green' => true
405405
"""
406406

407407
Scenario: Enabling and disabling a theme without multisite
@@ -426,63 +426,63 @@ Feature: Manage WordPress themes
426426
@require-wp-5.7
427427
Scenario: Install and attempt to activate a child theme without its parent
428428
Given a WP install
429-
And I run `wp theme install moina-blog`
430-
And I run `rm -rf wp-content/themes/moina`
429+
And I run `wp theme install oceanly-green`
430+
And I run `rm -rf wp-content/themes/oceanly`
431431

432-
When I try `wp theme activate moina-blog`
432+
When I try `wp theme activate oceanly-green`
433433
Then STDERR should contain:
434434
"""
435-
Error: The parent theme is missing. Please install the "moina" parent theme.
435+
Error: The parent theme is missing. Please install the "oceanly" parent theme.
436436
"""
437437
And STDOUT should be empty
438438
And the return code should be 1
439439

440440
@require-wp-5.7
441441
Scenario: List an active theme with its parent
442442
Given a WP install
443-
And I run `wp theme install moina`
444-
And I run `wp theme install --activate moina-blog`
443+
And I run `wp theme install oceanly`
444+
And I run `wp theme install --activate oceanly-green`
445445

446446
# Hybrid_Registry throws warning for PHP 8+.
447447
When I try `wp theme list --fields=name,status`
448448
Then STDOUT should be a table containing rows:
449449
| name | status |
450-
| moina-blog | active |
451-
| moina | parent |
450+
| oceanly-green | active |
451+
| oceanly | parent |
452452

453453
@require-wp-5.7
454454
Scenario: List broken themes (child theme without parent)
455455
Given a WP install
456-
And I run `wp theme install moina`
457-
And I run `wp theme install moina-blog`
456+
And I run `wp theme install oceanly`
457+
And I run `wp theme install oceanly-green`
458458

459459
When I run `wp theme list --fields=name,status`
460460
Then STDOUT should be a table containing rows:
461461
| name | status |
462-
| moina-blog | inactive |
463-
| moina | inactive |
462+
| oceanly-green | inactive |
463+
| oceanly | inactive |
464464

465-
When I run `wp theme delete moina`
465+
When I run `wp theme delete oceanly`
466466
Then STDOUT should contain:
467467
"""
468-
Deleted 'moina' theme.
468+
Deleted 'oceanly' theme.
469469
"""
470470

471471
When I run `wp theme list --fields=name,status`
472472
Then STDOUT should be a table containing rows:
473473
| name | status |
474-
| moina-blog | inactive |
474+
| oceanly-green | inactive |
475475

476-
When I try `wp theme activate moina-blog`
476+
When I try `wp theme activate oceanly-green`
477477
Then STDERR should contain:
478478
"""
479-
Error: The parent theme is missing. Please install the "moina" parent theme.
479+
Error: The parent theme is missing. Please install the "oceanly" parent theme.
480480
"""
481481

482-
When I try `wp theme install moina-blog`
482+
When I try `wp theme install oceanly-green`
483483
Then STDERR should contain:
484484
"""
485-
Warning: moina-blog: Theme already installed.
485+
Warning: oceanly-green: Theme already installed.
486486
"""
487487

488488
Scenario: When updating a theme --format should be the same when using --dry-run
@@ -555,24 +555,24 @@ Feature: Manage WordPress themes
555555
Scenario: Automatically install parent theme for a child theme
556556
Given a WP install
557557

558-
When I try `wp theme status moina`
558+
When I try `wp theme status oceanly`
559559
Then STDERR should contain:
560560
"""
561-
Error: The 'moina' theme could not be found.
561+
Error: The 'oceanly' theme could not be found.
562562
"""
563563
And STDOUT should be empty
564564
And the return code should be 1
565565

566-
When I run `wp theme install moina-blog`
566+
When I run `wp theme install oceanly-green`
567567
Then STDOUT should contain:
568568
"""
569569
This theme requires a parent theme. Checking if it is installed
570570
"""
571571

572-
When I try `wp theme status moina`
572+
When I try `wp theme status oceanly`
573573
Then STDOUT should contain:
574574
"""
575-
Theme moina details:
575+
Theme oceanly details:
576576
"""
577577
And STDERR should contain:
578578
"""
@@ -669,12 +669,12 @@ Feature: Manage WordPress themes
669669
Given a WP install
670670
And I run `wp theme delete --all --force`
671671
And I run `wp theme install twentytwelve`
672-
And I run `wp theme install moina-blog --activate`
672+
And I run `wp theme install oceanly-green --activate`
673673

674-
When I run `wp theme is-active moina-blog`
674+
When I run `wp theme is-active oceanly-green`
675675
Then the return code should be 0
676676

677-
When I run `wp theme is-active moina`
677+
When I run `wp theme is-active oceanly`
678678
Then the return code should be 0
679679

680680
When I try `wp theme is-active twentytwelve`

‎features/upgradables.feature‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Feature: Manage WordPress themes and plugins
210210

211211
Examples:
212212
| type | type_name | item | item_title | version | zip_file | file_to_check |
213-
| theme | Theme | moina | Moina | 1.1.2 | https://wordpress.org/themes/download/moina.1.1.2.zip | {CONTENT_DIR}/moina/style.css |
213+
| theme | Theme | storefront | Storefront | 1.0.0 | https://wordpress.org/themes/download/storefront.1.0.0.zip | {CONTENT_DIR}/storefront/style.css |
214214
| 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 |
215215

216216
@require-wp-4.5 @github-api

0 commit comments

Comments
 (0)