add e2e flow for VEX rule creation and false-positive marking - #863
Open
refoo0 wants to merge 2 commits into
Open
add e2e flow for VEX rule creation and false-positive marking#863refoo0 wants to merge 2 commits into
refoo0 wants to merge 2 commits into
Conversation
Signed-off-by: rafi <refaei.shikho@hotmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the Playwright E2E coverage around VEX rule creation/propagation by adding stable UI selectors (data-testid) and extending the E2E Page Object Model (POM) with helpers for VEX-related flows.
Changes:
- Add
data-testidhooks to vulnerability state and VEX recommendation UI for reliable E2E selectors. - Extend the E2E VulnFlow/OrgFlow POM with helpers to create/delete VEX rules and validate vuln state transitions.
- Add a new E2E spec covering the “VEX rule recommendation on a second asset” flow.
Reviewed changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/vex-rules/VexRuleRecommendationCard.tsx | Adds a test id to enable E2E selection of the recommendation card. |
| src/components/common/VulnState.tsx | Adds a test id to enable E2E selection of the vuln state badge. |
| e2e/src/pom/flows/vuln.ts | Adds new POM helpers for VEX flows (state assertions, delete rule, recommendation flow, navigation). |
| e2e/src/pom/flows/org.ts | Adds helper to open a group by name in E2E. |
| e2e/src/pom/devguard.ts | Returns created org/group/repo names from test setup helper. |
| e2e/src/devguard-vuln-flow.auth.e2e.spec.ts | Adjusts vuln flow tests (keeps false-positive flow, removes/rewrites others). |
| e2e/src/devguard-vex-flow.auth.e2e.spec.ts | Adds a new E2E spec file for VEX rule recommendation propagation. |
| .claude/settings.json | Adds Claude client settings/permissions file (appears local/environment-specific). |
Suppressed comments (1)
e2e/src/pom/flows/vuln.ts:130
docShotis async (returns a Promise) but it's called withoutawait, which can race the following UI interactions and may drop the attachment in the test report.
await firstRuleRow.getByRole("button").click();
docShot(this.page, testInfo, "vex-rule-delete-confirmation-dialog");
await this.page.getByRole("menuitem", { name: "Delete" }).click();
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: rafi <refaei.shikho@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.