Integration tests: Add new test for privileges main page#1135
Conversation
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- There are multiple identical
@seedscenarios creating the same privileges (e.g.,a_privilege1,a_privilege2); consider consolidating these into a shared setup (Background or a single seed scenario) to reduce duplication and make the test flow clearer. - The cleanup steps only explicitly remove
a_privilege1anda_privilege2; ifa_privilege3or other test data can persist beyond their scenarios, it may be worth adding corresponding cleanup steps to keep the test environment consistent between runs. - In
privileges.ts, thecy.ipacalls are fire-and-forget; if these setup/teardown steps need to be chained with other Cypress commands, consider returning thecy.ipacall from the step definitions to integrate properly with Cypress’s command queue.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- There are multiple identical `@seed` scenarios creating the same privileges (e.g., `a_privilege1`, `a_privilege2`); consider consolidating these into a shared setup (Background or a single seed scenario) to reduce duplication and make the test flow clearer.
- The cleanup steps only explicitly remove `a_privilege1` and `a_privilege2`; if `a_privilege3` or other test data can persist beyond their scenarios, it may be worth adding corresponding cleanup steps to keep the test environment consistent between runs.
- In `privileges.ts`, the `cy.ipa` calls are fire-and-forget; if these setup/teardown steps need to be chained with other Cypress commands, consider returning the `cy.ipa` call from the step definitions to integrate properly with Cypress’s command queue.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
@veronnicka - Removed the |
Followed hbac_service.feature which main page is very similar Signed-off-by: Veronika Miticka <vmiticka@redhat.com>
681616b to
7e349e8
Compare
|
The code is rebased and the checks are passing. Please have a look @carma12 |
carma12
left a comment
There was a problem hiding this comment.
Maybe we can add a new test that checks the addition of a new Privilege with description, but it's completely fine if we don't include it. Apart from that, LGTM.
The first tests adds a privilige with a description. Is that what you meant? |
Followed hbac_service.feature which main page is very similar
This PR is built on top of #1134 , can be reviewed but we will have to wait for the rebase for the checks to pass
Summary by Sourcery
Add integration tests for privileges main page covering privilege creation, search, deletion, bulk deletion, and cancel flows.
New Features:
Tests: