test: fix tests for handling lazy iframe #1052
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 inincomplete
, newer versions will look inpasses
. 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 seeframe-tested
as passes. For webdevierio and webdriverjs you'll need to set the chrome binary and/or chromedriver to a version < 124 to seeframe-tested
in incomplete, and the latest version to seeframe-tested
as passes.