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

test: fix tests for handling lazy iframe #1052

Closed
wants to merge 7 commits into from
Closed

Conversation

straker
Copy link
Contributor

@straker straker commented May 8, 2024

Chrome v124 now has the capability to load lazy loaded iframes. To support both older versions of chrome (e.g. installing older versions of playwright or puppeteer) we'll branch the test to look at the frame-tested rule in different places. Older versions will look in incomplete, newer versions will look in passes. Note that since the iframe is lazy loaded the page load event is fired before the frame is loaded, so I needed to add a delay after the page loaded to ensure the iframes were all settled (otherwise the tests were flakey).

At a later date we'll create a CI job that installs an older version of the chrome for each of the packages to ensure we don't have a regression going forward.

QA notes: test puppeteer version < 22 with lazy loaded iframe to see frame-tested as incomplete, test with latest version to see frame-tested as passes. For webdevierio and webdriverjs you'll need to set the chrome binary and/or chromedriver to a version < 124 to see frame-tested in incomplete, and the latest version to see frame-tested as passes.

@straker straker requested a review from a team as a code owner May 8, 2024 21:25
Copy link
Member

@stephenmathieson stephenmathieson left a comment

Choose a reason for hiding this comment

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

LGTM but I think we could slightly simplify with:

import {setTimeout} from 'timers/promises'

packages/puppeteer/test/axe-puppeteer.spec.ts Outdated Show resolved Hide resolved
Copy link
Member

@stephenmathieson stephenmathieson left a comment

Choose a reason for hiding this comment

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

🚀

@straker
Copy link
Contributor Author

straker commented May 9, 2024

Superseded by #1053

@straker straker closed this May 9, 2024
straker added a commit that referenced this pull request May 9, 2024
Fixes the broken lazy load iframe tests.

Ref: #1052

No QA needed.
straker added a commit to dequelabs/axe-core-gems that referenced this pull request May 9, 2024
Fixes the broken lazy load iframe tests.

Ref: dequelabs/axe-core-npm#1052

No QA needed.
straker added a commit to dequelabs/axe-core-nuget that referenced this pull request May 9, 2024
Fixes the broken lazy load iframe tests.

Ref: dequelabs/axe-core-npm#1052

No QA needed.
straker added a commit to dequelabs/axe-core-maven-html that referenced this pull request May 9, 2024
Fixes the broken lazy load iframe tests.

Ref: dequelabs/axe-core-npm#1052

No QA needed.

---------

Co-authored-by: michael-siek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants