Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #168: Tests for Check if content are lazyloaded while scrolling seems always failing for the templates lazyload_css_background_images, ll_bg_css_single_colon and ll_bg_css_double_colon #169

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions src/support/steps/ll-css-bg-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
5 changes: 4 additions & 1 deletion utils/page-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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%/');

Expand Down
Loading