-
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
User access group test #14
base: main
Are you sure you want to change the base?
Conversation
3994d0e
to
c56c1b2
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.
Before requesting reviews, all tests should pass using this procedure:
- Check that you are using the correct Git branches, and they are up to date
- LEAF -> "master" branch
- LEAF-Automated-Tests -> your working branch
- Navigate to the Development dashboard (https://host.docker.internal/)
- Click on "API tester", and wait for it to complete
- Click on "End-to-End tests (Playwright)"
c56c1b2
to
17e27de
Compare
|
||
const saveButton = page.getByRole('button', { name: 'Save' }); | ||
await saveButton.click(); | ||
|
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 does not error on repeat runs, but I'm concerned that the test does not reflect it only being possible to create a group of a specific name once (even if it's subsequently deleted).
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.
Elaborating on the concern: Tests that involve creating and validating entries must not use fixed values. Subsequent runs of this test fail to validate intended functionality: whether the user can create groups. In this test, the second run actually skips the group creation because the group already exists (which would normally trigger an error).
Instead of:
await groupTitle.fill('New Test Group 0');
A more complete solution would be:
let randNum = Math.random();
let uniqueText = `New Test Group ${randNum}`;
await groupTitle.fill(uniqueText);
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.
fixed
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.
-
Please update the PR description to reflect changes in scope. Since tests were removed, the description should reflect it.
-
When naming tests, try to think about the procedure from the end-user's perspective. For example, instead of "Validate group creation and an employee addition", a more concise label would be "create group and add employee". It's not necessary to explain that the test is doing validation -- this is implied since all tests are fundamentally validating functionality.
-
The "waitFor" in this pattern is redundant because the second line automatically waits:
await group.waitFor();
await group.click();
- To improve repeatability, it would be prudent to expand certain tests. For example, when importing a group, it's easier to also remove it within the same test so that subsequent runs fully exercise the intended functionality. Currently these tests trigger an error, but it doesn't show up because it's based on an asynchronous transaction, and the test's locators end up skipping it.
2203f31
to
cb12d75
Compare
cb12d75
to
73acc32
Compare
1c119c8
to
8e2fc6a
Compare
8e2fc6a
to
2767337
Compare
Test scenarios for User Access Group test -