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] Update Console error fixture to be more informative #5273

Closed
unlikelyzero opened this issue May 31, 2022 · 9 comments · Fixed by #5304
Closed

[e2e] Update Console error fixture to be more informative #5273

unlikelyzero opened this issue May 31, 2022 · 9 comments · Fixed by #5304
Labels
type:maintenance tests, chores, or project maintenance

Comments

@unlikelyzero
Copy link
Contributor

Summary

When the Console error detection fails in the fixtures.js, it's not obvious to users why it failed. We need to fix that with some sort of logging that's apparent in CI.

@unlikelyzero unlikelyzero added the type:maintenance tests, chores, or project maintenance label May 31, 2022
@ozyx ozyx self-assigned this Jun 8, 2022
@ozyx ozyx closed this as completed in #5304 Jun 8, 2022
@unlikelyzero
Copy link
Contributor Author

Testing Notes

Create a console error in the e2e tests
Verify that the errors are clear in the failure report

Create a console warning in the e2e tests
Verify that the warnings do not appear on the failure report

@jvigliotta
Copy link
Contributor

Unable To Test Locally: Testathon: 7/8/22

Many tests are failing, this is after running: npm run test:e2e

@unlikelyzero
Copy link
Contributor Author

unlikelyzero commented Jul 8, 2022

Unable To Test Locally: Testathon: 7/8/22

Many tests are failing, this is after running: npm run test:e2e

@jvigliotta try running npm run test:e2e:ci because this references a narrower but stable set of tests

@akhenry
Copy link
Contributor

akhenry commented Jul 11, 2022

  • Added console.error and console.warn in e2e tests. Console messages appeared in the console.
  • Threw an error from an e2e test, and verified that it appears in the console, and test failed.

I believe this is verified?

@khalidadil
Copy link
Contributor

@akhenry Do you see the same thing for console.error?

@akhenry
Copy link
Contributor

akhenry commented Jul 11, 2022

@khalidadil Typo, I meant console.error.

@khalidadil
Copy link
Contributor

Verified Fixed in Testathon on 07/11/22

@akhenry
Copy link
Contributor

akhenry commented Jul 11, 2022

I added a console.error to an otherwise passing test and ran the test suite with npm run test:e2e:ci. Although the error was logged to the console, the test still passed. Is this a failure then?

@khalidadil
Copy link
Contributor

khalidadil commented Jul 11, 2022

@akhenry I just talked to @unlikelyzero, and you have to do it in the browser scope like this:

        await Promise.all([
            page.evaluate(() => console.error('This should result in a failure')),
            page.waitForEvent('console') // always wait for the event to happen while triggering it!
        ]);

Is that how you did it?

Doing it that way did cause it to fail for me:

Screen Shot 2022-07-11 at 3 25 46 PM

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.

5 participants