Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion src/features/broken-links.feature
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src/features/delete-plugin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/features/enable-all-features.feature
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/features/roll-back.feature
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/features/self-host-google-fonts.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@smoke @selfhostgooglefonts @setup
@smoke @selfhostgooglefonts @setup @requires-clean-imagify

Feature: Google Fonts are self-hosted

Expand Down
2 changes: 2 additions & 0 deletions src/features/settings-export-import.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions src/support/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ BeforeAll(async function (this: ICustomWorld) {
}
});

/**
* Before each scenario tagged with @requires-clean-imagify, ensures Imagify is not installed.
Comment thread
hanna-meda marked this conversation as resolved.
Outdated
*/
Before({ tags: '@requires-clean-imagify and not @imagify-compatibility' }, async function (this: ICustomWorld): Promise<void> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we need this run before smoke test , why not just use @smoke instead of @requires-clean-imagify?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mai-Saad, I used requires-clean-imagify so this hook can be reused beyond smoke. It is currently applied only in smoke, but the precondition itself is not smoke-specific.

await uninstallPlugin('imagify');
});

/**
* Before each test scenario without the @setup tag, performs setup tasks.
*/
Expand Down
Loading