-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add eslint warning about use of waitForTimeout to playwright eslint #40802
Conversation
Size Change: +90 B (0%) Total Size: 1.23 MB
ℹ️ View Unchanged
|
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.
Thanks!
Although, normally we don't need waitForSelector
either if we can just use locator. Could you add locator to the message to clarify it?
Ah, true - the dangers of copy and paste - updated. |
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.
Thanks! 🧡
What?
Adds an eslint warning about the use of waitForTimeout to playwright eslint config
Why?
Puppeteer has a warning added to prevent people use waitForTimeout and to prompt to use waitForSelector instead as this is best practice.
How?
Copied the relevant config from the puppeteer config to the playwright config
Testing Instructions
Try adding
await page.waitForTimeout(1000);
to a playwright test, eg.test/e2e/specs/editor/plugins/image-size.spec.js
and check that you get an eslint warning