-
Notifications
You must be signed in to change notification settings - Fork 240
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
Upgrade browser/accessibility tests for Puppeteer v18 #2532
Conversation
Switching away from the deprecated `axe-puppeteer` in future unblocks `puppeteer` upgrades: ``` npm ERR! Could not resolve dependency: npm ERR! peer puppeteer@">=1.10.0 <= 18" from @axe-core/puppeteer@4.5.2 ```
Additionally adds `jest-axe` for violation reporting
Recent axe update can’t use `puppeteer@19` yet ``` npm ERR! Could not resolve dependency: npm ERR! peer puppeteer@">=1.10.0 <= 18" from @axe-core/puppeteer@4.5.2 ```
This matches axe behaviour from previous releases, but see discussion: #2442 (comment)
Includes various changes and fixes for the `puppeteer@18` upgrade
✅ You can preview this change here:
To edit notification comments on pull requests, go to your Netlify site settings. |
Note: We've had to hold off npm ERR! Could not resolve dependency:
npm ERR! peer puppeteer@">=1.10.0 <= 18" from @axe-core/puppeteer@4.5.2 |
}, | ||
globals: { | ||
page: true, | ||
browser: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows the jest-puppeteer
page and browser globals to work without lint errors
Includes CLI flags for colour output, GitHub Actions reporter, ESLint config changes for test globals
4bff55b
to
ea4ec2b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me locally and seems speedier?
Got a few comments/queries, but I don't really foresee anything being blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go!
Good to silence those seemingly daily puppeteer updates...
I'd love to see more thorough accessibility tests, but I think that begins on govuk-frontend
, and it's certainly beyond the scope of this PR.
This PR is a fairly drastic bump to
puppeteer@1.14.0
puppeteer@18.2.1
Which includes:
govuk-frontend
./lib/puppeteer-helpers.js@axe-core/puppeteer
to replaceaxe-puppeteer
incognito
contextLots of tests have been simplified to the newer Puppeteer selector methods:
Plus various other anti-flakiness improvements inspired by:
Closes #2468