Skip to content
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

[e2e] Add console error detection to all of our e2e tests #5000

Closed
unlikelyzero opened this issue Mar 25, 2022 · 3 comments · Fixed by #5177
Closed

[e2e] Add console error detection to all of our e2e tests #5000

unlikelyzero opened this issue Mar 25, 2022 · 3 comments · Fixed by #5177
Labels
type:maintenance tests, chores, or project maintenance
Milestone

Comments

@unlikelyzero
Copy link
Contributor

unlikelyzero commented Mar 25, 2022

Summary

It's possible to intercept console errors in playwright. Let's update our test suite to detect console errors during runtime and fail if found.

Implementation here: https://github.com/microsoft/playwright/discussions/11690#discussioncomment-2060397

@unlikelyzero unlikelyzero added the type:maintenance tests, chores, or project maintenance label Mar 25, 2022
@unlikelyzero
Copy link
Contributor Author

Testing Notes

npm run test:e2e:full runs without error

Add the following to a test

wait page.evaluate(() => console.log('error'));

and verify that the test fails

1 similar comment
@unlikelyzero
Copy link
Contributor Author

Testing Notes

npm run test:e2e:full runs without error

Add the following to a test

wait page.evaluate(() => console.log('error'));

and verify that the test fails

@khalidadil
Copy link
Contributor

Verified Fixed in Testathon on 06/27/22 by adding await page.evaluate(() => console.error('error')); to the smoke.e2e.spec.js test.

@unlikelyzero unlikelyzero added this to the Target:2.0.5 milestone Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:maintenance tests, chores, or project maintenance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants