Skip to content

Commit c06d470

Browse files
authored
ensure clean imagify state before tagged smoke scenarios (#374)
* ensure clean imagify state before tagged smoke scenarios * remove redundant Imagify install check before uninstall * remove smoke tag from the hook expression * update comment
1 parent b284bde commit c06d470

7 files changed

Lines changed: 15 additions & 4 deletions

src/features/broken-links.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@setup @smoke @brokenlinks
1+
@setup @smoke @brokenlinks @requires-clean-imagify
22
Feature: Broken links in WP Rocket settings UI
33

44
Scenario: WP Rocket settings links are not broken

src/features/delete-plugin.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Feature: C4466 - Should successfully delete the plugin
1010
Then plugin should delete successfully
1111
But I must not see any error in debug.log
1212

13+
@requires-clean-imagify
1314
Scenario: WP Rocket is installed and activated
1415
Given plugin is installed 'new_release'
1516
And plugin is activated

src/features/enable-all-features.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@smoke @local @setup
1+
@smoke @local @setup @requires-clean-imagify
22
Feature: C1205 - Enabling all WP Rocket features should not throw any fatal errors
33

44
Background:

src/features/roll-back.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@smoke @local @setup
1+
@smoke @local @setup @requires-clean-imagify
22
Feature: C11856 - Should roll back to the last previous major version when using the roll back functionality
33

44
Background:

src/features/self-host-google-fonts.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@smoke @selfhostgooglefonts @setup
1+
@smoke @selfhostgooglefonts @setup @requires-clean-imagify
22

33
Feature: Google Fonts are self-hosted
44

src/features/settings-export-import.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Feature: C2148 - Should not change the content of existing fields
44
Background:
55
Given I am logged in
66

7+
@requires-clean-imagify
78
Scenario: Data imported correctly
89
Given plugin is installed 'previous_stable'
910
And plugin is activated
@@ -39,6 +40,7 @@ Feature: C2148 - Should not change the content of existing fields
3940
And I am logged in
4041
Then I must not see any error in debug.log
4142

43+
@requires-clean-imagify
4244
Scenario: Should not change enabled fields with update
4345
Given plugin is installed 'previous_stable'
4446
And plugin is activated

src/support/hooks.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ BeforeAll(async function (this: ICustomWorld) {
9090
}
9191
});
9292

93+
/**
94+
* Before each scenario tagged with @requires-clean-imagify, except those also tagged with
95+
* @imagify-compatibility, ensures Imagify is not installed.
96+
*/
97+
Before({ tags: '@requires-clean-imagify and not @imagify-compatibility' }, async function (this: ICustomWorld): Promise<void> {
98+
await uninstallPlugin('imagify');
99+
});
100+
93101
/**
94102
* Before each test scenario without the @setup tag, performs setup tasks.
95103
*/

0 commit comments

Comments
 (0)