-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(playwright): migrate dashboard spec #1789
Conversation
587fb99
to
b539d15
Compare
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
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [ main, master ] |
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.
nit/question: Not sure if playwright is faster than cypress, should we run this for every PR? Or should we hook onto the existing ci-e2e workflow so that it can be triggered manually?
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.
playwright is kinda fast but no concrete numbers, more a gut feel based off how they perform. i can hook onto the existing workflow, no worries
branches: [ main, master ] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 |
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.
nit: curious why we are intentionally limiting ourselves to 1 hour instead of the default 6 hours?
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.
^ eh lets not leh, our workflow is not so complex, if it takes more than an hour is prob smt wrong
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.
this workflow is automatically created by playwright ._. fwiw, playwright runs 6 workers at once w/ max timeout of 30s so it should be ok most of the time
@@ -182,6 +184,7 @@ | |||
"@types/dompurify": "^3.0.4", | |||
"@types/invariant": "^2.2.35", | |||
"@types/jest": "^29.4.4", | |||
"@types/node": "^20.10.5", |
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.
nit: is this needed?
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 honestly can't remember - i think yes but i can't recall why.
this package doesn't have any runtime impact (typing) so it shud be ok to keep?
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [ main, master ] |
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.
hey i think typo here, do u mean push to develop
rather than main
branches: [ main, master ] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 |
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.
^ eh lets not leh, our workflow is not so complex, if it takes more than an hour is prob smt wrong
* Read environment variables from file. | ||
* https://github.com/motdotla/dotenv | ||
*/ | ||
// require('dotenv').config(); |
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.
unintended comment?
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.
this was autogenerated by playwright. i left it in here cos it might be useful next time but can always remove if you feel like it's extra
not merging yet, will get playwright to baseline first |
This pull request has been stale for more than 30 days! Could someone please take a look at it @isomerpages/iso-engineers |
52baae8
to
640baf0
Compare
640baf0
to
14a83ad
Compare
Problem
Previously we were using cypress, which was slow. this PR is part 1 of shifting to playwright.
Solution
page, request, context
- these are mostly self-explanatory; playwright has test isolation, so each test spec is a new page frame.locators
- this is a playwright concept, equivalent to cypress selectors.getByRole
expects a aria roleawait
forexpect
to assert that test passes, without theawait
, playwright will end prematurely and fail.