-
Notifications
You must be signed in to change notification settings - Fork 297
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
Update deprecated use of Puppeteer's page.waitFor
#3236
Comments
I don't think we need to add
If we do need to upgrade puppeteer first, it might be a good idea to create a new issue for upgrading |
@aaemnnosttv There already is an issue for upgrading wp-scripts and I'm already doing the IB for it (Sadly github actions being down means I can't continue, but I've got upgrades working up to v14) #3033 |
@tofumatt This looks good to go otherwise so I'll rename this one detail in the IB. IB ✅ |
QA ✅Confirmed on recent runs of the VRT and E2E tests that no warnings about deprecated |
Feature Description
v5 of Puppeteer has deprecated its
waitFor
function. We should update our use accordingly to avoid problems later when it is removed, but also to avoid extra noise in tests from this warning.This function is still not removed yet, even in the latest v9 of Puppeteer so it isn't an emergency.
See also WordPress/gutenberg#28093
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
page.waitFor
in E2E tests should be updated to usepage.waitForTimeout
insteadSee https://pptr.dev/#?product=Puppeteer&version=v9.0.0&show=api-pagewaitforselectororfunctionortimeout-options-args
E.g.
site-kit-wp/tests/backstop/engine_scripts/puppet/clickAndHoverHelper.js
Line 10 in 3fb4b73
Implementation Brief
package.json
so it includes these new methodspage.waitFor
site-kit-wp/tests/e2e/utils/page-wait.js
Line 32 in 2a18934
page.waitForTimeout
.page.waitFor
withpage.waitForSelector
in https://github.com/google/site-kit-wp/blob/2a18934d46d4cadcb169c50c406ec13f28c481d6/tests/backstop/engine_scripts/puppet/clickAndHoverHelper.jsTest Coverage
Visual Regression Changes
QA Brief
page.waitFor
calls. You can check the PR or adevelop
GitHub Action run of E2E tests to verify this.Changelog entry
The text was updated successfully, but these errors were encountered: