diff --git a/src/support/steps/ll-css-bg-image.ts b/src/support/steps/ll-css-bg-image.ts index 44a08ec..c4aefc9 100644 --- a/src/support/steps/ll-css-bg-image.ts +++ b/src/support/steps/ll-css-bg-image.ts @@ -179,6 +179,5 @@ Then('Check {string} input for background images', async function (this: ICustom await this.page.locator('input[name="lastName"]').nth(1).fill('Random text') await this.utils.scrollDownBottomOfAPage(); - - expect(images).toEqual(LL_BACKGROUND_IMAGES[page].lazyLoadedImages) + expect(images.every(image => LL_BACKGROUND_IMAGES[page].lazyLoadedImages.includes(image))).toBeTruthy(); }); \ No newline at end of file diff --git a/utils/page-utils.ts b/utils/page-utils.ts index 1c97d3f..86a3889 100644 --- a/utils/page-utils.ts +++ b/utils/page-utils.ts @@ -16,7 +16,7 @@ import { ICustomWorld } from '../src/common/custom-world'; import fs from "fs/promises"; import {WP_BASE_URL, WP_PASSWORD, WP_USERNAME} from '../config/wp.config'; -import { uninstallPlugin, updatePermalinkStructure } from "./commands"; +import { uninstallPlugin, updatePermalinkStructure, deactivatePlugin } from "./commands"; /** * Utility class for interacting with a Playwright Page instance in WordPress testing. @@ -577,6 +577,9 @@ export class PageUtils { // Remove helper plugin. await uninstallPlugin('wp-rocket force-wp-mobile'); + // Deactivate WPML. + await deactivatePlugin('sitepress-multilingual-cms'); + // Reset permalink structure. await updatePermalinkStructure('/%postname%/');