diff --git a/src/features/ll-lcp.feature b/src/features/ll-lcp.feature index 6e09b11..87d3ce6 100644 --- a/src/features/ll-lcp.feature +++ b/src/features/ll-lcp.feature @@ -3,7 +3,6 @@ Feature: Lazyload with LCP Background: Given I am logged in - And delete 'wp-rocket' plugin And plugin is installed 'new_release' And plugin 'wp-rocket' is activated When I go to 'wp-admin/options-general.php?page=wprocket#dashboard' diff --git a/src/support/steps/imagify.ts b/src/support/steps/imagify.ts index 46a99f9..e167724 100644 --- a/src/support/steps/imagify.ts +++ b/src/support/steps/imagify.ts @@ -2,6 +2,7 @@ import { ICustomWorld } from "../../common/custom-world"; import { Given } from '@cucumber/cucumber'; import { IMAGIFY_INFOS } from "../../../config/wp.config"; +import {expect} from "@playwright/test"; Given('Imagify is set up', async function (this: ICustomWorld) { await this.utils.gotoImagify(); @@ -25,4 +26,6 @@ Given('display next-gen is enabled on imagify', async function (this: ICustomWor // Click the submit button to save the changes await this.page.click('input#submit'); + + await expect(this.page.getByText('Settings saved.')).toBeVisible(); }); \ No newline at end of file diff --git a/utils/commands.ts b/utils/commands.ts index b503a67..50a2061 100644 --- a/utils/commands.ts +++ b/utils/commands.ts @@ -249,7 +249,8 @@ export async function isPluginInstalled(name: string): Promise { } /** - * Delete a plugin if exist + * Delete a plugin if exist. + * Note: this is not ideal for wpr or imagify plugins as it doesn't delete DB data which relies on uninstall hook. * @function * @name deletePlugin * @async