diff --git a/src/features/broken-links.feature b/src/features/broken-links.feature index 99d6d05..83a229c 100644 --- a/src/features/broken-links.feature +++ b/src/features/broken-links.feature @@ -1,4 +1,4 @@ -@setup @smoke @brokenlinks +@setup @smoke @brokenlinks @requires-clean-imagify Feature: Broken links in WP Rocket settings UI Scenario: WP Rocket settings links are not broken diff --git a/src/features/delete-plugin.feature b/src/features/delete-plugin.feature index 4b1f3ac..c778475 100644 --- a/src/features/delete-plugin.feature +++ b/src/features/delete-plugin.feature @@ -10,6 +10,7 @@ Feature: C4466 - Should successfully delete the plugin Then plugin should delete successfully But I must not see any error in debug.log + @requires-clean-imagify Scenario: WP Rocket is installed and activated Given plugin is installed 'new_release' And plugin is activated diff --git a/src/features/enable-all-features.feature b/src/features/enable-all-features.feature index 436c7c2..1a4187b 100644 --- a/src/features/enable-all-features.feature +++ b/src/features/enable-all-features.feature @@ -1,4 +1,4 @@ -@smoke @local @setup +@smoke @local @setup @requires-clean-imagify Feature: C1205 - Enabling all WP Rocket features should not throw any fatal errors Background: diff --git a/src/features/roll-back.feature b/src/features/roll-back.feature index 1a6e557..af0f105 100644 --- a/src/features/roll-back.feature +++ b/src/features/roll-back.feature @@ -1,4 +1,4 @@ -@smoke @local @setup +@smoke @local @setup @requires-clean-imagify Feature: C11856 - Should roll back to the last previous major version when using the roll back functionality Background: diff --git a/src/features/self-host-google-fonts.feature b/src/features/self-host-google-fonts.feature index df38a94..bf9d2d1 100644 --- a/src/features/self-host-google-fonts.feature +++ b/src/features/self-host-google-fonts.feature @@ -1,4 +1,4 @@ -@smoke @selfhostgooglefonts @setup +@smoke @selfhostgooglefonts @setup @requires-clean-imagify Feature: Google Fonts are self-hosted diff --git a/src/features/settings-export-import.feature b/src/features/settings-export-import.feature index 25b09f8..8b42b2e 100644 --- a/src/features/settings-export-import.feature +++ b/src/features/settings-export-import.feature @@ -4,6 +4,7 @@ Feature: C2148 - Should not change the content of existing fields Background: Given I am logged in + @requires-clean-imagify Scenario: Data imported correctly Given plugin is installed 'previous_stable' And plugin is activated @@ -39,6 +40,7 @@ Feature: C2148 - Should not change the content of existing fields And I am logged in Then I must not see any error in debug.log + @requires-clean-imagify Scenario: Should not change enabled fields with update Given plugin is installed 'previous_stable' And plugin is activated diff --git a/src/support/hooks.ts b/src/support/hooks.ts index 76430cb..2f4a039 100644 --- a/src/support/hooks.ts +++ b/src/support/hooks.ts @@ -90,6 +90,14 @@ BeforeAll(async function (this: ICustomWorld) { } }); +/** + * Before each scenario tagged with @requires-clean-imagify, except those also tagged with + * @imagify-compatibility, ensures Imagify is not installed. + */ +Before({ tags: '@requires-clean-imagify and not @imagify-compatibility' }, async function (this: ICustomWorld): Promise { + await uninstallPlugin('imagify'); +}); + /** * Before each test scenario without the @setup tag, performs setup tasks. */