-
Notifications
You must be signed in to change notification settings - Fork 3
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
Page Object Model for Playwright tests #737
Conversation
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.
I like the page model! I have some ideas/preferences that I noted below
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.
I like the fixtures!
# Conflicts: # tests/e2e/pages/home.spec.ts
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.
I think I'm still a fan of having the path expectation part of isReady
await expect(wpDashboard.page).toHaveURL(wpDashboard.path);
looks good so far!
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.
non-blocking comments and curiosities below :)
Code Climate has analyzed commit 862fbc1 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (90% is the threshold). This pull request will bring the total coverage in the repository to 92.6% (0.0% change). View more on Code Climate. |
Description
Adding page objects and fixtures for our existing Playwright tests. Hoping that this can be a template for creating readable e2e tests in the Playwright ecosystem.
This is a precursor to completing the test for filling out the WP, because that PR got huge and I would like for us to carefully review and comment on general approach in a more gradual fashion!
Related ticket(s)
N/A
How to test
yarn test:e2e
oryarn test:e2e-ui
Notes
Some pros (imo)
Some cons (imo)
Some questions
expect
in page objects and keep them in the tests. I tried to follow that philosophy here (with the exception of theisReady()
functions)Resources: