dequelabs / axe-core-npm

Mozilla Public License 2.0
577 stars 65 forks source link

test: fix tests for handling lazy iframe #1052

Closed straker closed 2 months ago

straker commented 2 months ago

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 commented 2 months ago

Superseded by https://github.com/dequelabs/axe-core-npm/pull/1053