Skip to content

add e2e flow for VEX rule creation and false-positive marking - #863

Open
refoo0 wants to merge 2 commits into
mainfrom
test/vex-rule-e2e-flow
Open

add e2e flow for VEX rule creation and false-positive marking#863
refoo0 wants to merge 2 commits into
mainfrom
test/vex-rule-e2e-flow

Conversation

@refoo0

@refoo0 refoo0 commented Aug 3, 2026

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Copilot AI review requested due to automatic review settings August 3, 2026 09:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-testid hooks 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

  • docShot is async (returns a Promise) but it's called without await, 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.

Comment thread e2e/src/pom/flows/vuln.ts
Comment thread e2e/src/devguard-vex-flow.auth.e2e.spec.ts
Comment thread .claude/settings.json Outdated
Signed-off-by: rafi <refaei.shikho@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants