-
Notifications
You must be signed in to change notification settings - Fork 0
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
DM-45409 Add tests for CM web app #95
Conversation
expect(page.get_by_text("group0", exact=True)).not_to_be_empty() | ||
# check group fullname is correct | ||
expect(page.get_by_text("HSC_DRP-RC2/w_2024_30_DM-45425c/step1/group0")).not_to_be_empty() | ||
# check collections section |
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 is soooo intensly nitpicking. The code is great. The comments are good and generally clear.
You MIGHT want to adopt a recognised comment convention for test comments. There are a bunch all with pros and cons.
I tend to go for "Thing should do foo".
The only advantage over "check foo" is that "check foo" doesn't tell us what you think should happen. Only what you are testing.
Example:
Instead of
# check group name is correct
# check group fullname is correct
do
# Group0 should be visible on the page
# Group fullname should include the campaign name, run name, step number , and group number as a complete url.
Don't change this right now. Just something to think about in the future.
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.
Good to know. I'll adopt it whenever I make changes to the tests. Thanks Asher
ac0473a
to
0f2fdfe
Compare
… changes to the code
…use build_tree function from tests/db/util_functions.py
…he playwright marker
… file init command
0f2fdfe
to
ff015c0
Compare
This PR introduces API and E2E tests for the web app.
E2E tests are done using playwright which runs the tests using an actual browser
The changes also introduces a new custom command line argument
--run-playwright
to pytest. If not present, pytest skips any tests marked asplaywright
Playwright tests assumes there is a running web server with specific data (which was added from a snapshot of a real database".
I opted to using this data as it allows for the different states and corresponding UI changes to show up and hence be tested.