Skip to content

feat: add playwright e2e tests for DevGuard Web#771

Open
juliankepka wants to merge 32 commits into
mainfrom
feat/playwright
Open

feat: add playwright e2e tests for DevGuard Web#771
juliankepka wants to merge 32 commits into
mainfrom
feat/playwright

Conversation

@juliankepka

@juliankepka juliankepka commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

@juliankepka juliankepka changed the title feat: fixed two playwright scripts feat: add playwright e2e tests for DevGuard Web Jun 1, 2026
@juliankepka juliankepka linked an issue Jun 1, 2026 that may be closed by this pull request
14 tasks
Comment thread e2e/src/pom/devguard.ts Outdated
@juliankepka juliankepka marked this pull request as ready for review June 3, 2026 08:30
Copilot AI review requested due to automatic review settings June 3, 2026 08:30

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 adds Playwright end-to-end coverage for key DevGuard Web user journeys and introduces stable data-testid hooks across the UI so the E2E selectors don’t rely on fragile text/DOM structure.

Changes:

  • Added data-testid attributes to navigation menus, dialogs, forms, tables, and key buttons/inputs to enable stable Playwright selectors.
  • Introduced/refactored Playwright Page Object Model (POM) flows (auth/org/group/repo/setup/vuln/artifact) and added new E2E specs to cover vulnerability handling, user invites, theme toggling, repo flows, and setup flows.
  • Extended E2E utilities to generate unique emails/usernames for repeated/parallel runs.

Reviewed changes

Copilot reviewed 55 out of 55 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/hooks/useProjectMenu.ts Adds testId fields to project menu items for stable nav selectors.
src/hooks/useOrganizationMenu.ts Adds testId fields to org menu items for stable nav selectors.
src/hooks/useAssetMenu.ts Extends menu item typing and adds testId hooks for asset navigation.
src/components/risk-handling/RiskHandlingRow.tsx Adds row-level data-testid for package/CVE expansion in tests.
src/components/project/ProjectForm.tsx Adds test ids to group name/description inputs.
src/components/ory/overrides.tsx Adds test ids to Ory inputs and auth method buttons.
src/components/OrgForm.tsx Adds a test id to org name input.
src/components/navigation/UserNav.tsx Adds test ids for theme chooser + user dropdown/logout.
src/components/MemberDialog.tsx Adds test ids for invite input/button.
src/components/guides/webhook-setup-carousel-slides/SelectRepoSlide.tsx Adds test ids for repo selection/connect flow.
src/components/guides/risk-scanner-carousel-slides/SetupMethodSelectionSlide.tsx Adds test ids to setup selection + continue button.
src/components/guides/risk-scanner-carousel-slides/ScannerSelectionSlide.tsx Adds test ids to setup cards + navigation buttons.
src/components/guides/risk-scanner-carousel-slides/ManualIntegrationSlide.tsx Updates copy, adds test ids for tabs + continue button.
src/components/guides/risk-scanner-carousel-slides/IntegrationMethodSelectionSlide.tsx Adds test ids to manual upload card + nav buttons.
src/components/guides/risk-scanner-carousel-slides/AutoSetupProgressSlide.tsx Adds test ids for autosetup buttons.
src/components/Filter.tsx Adds test ids for opening/applying filters and inputs/selects.
src/components/FileUpload.tsx Adds a test id to the upload input (currently non-unique across tabs).
src/components/FalsePositiveDialog.tsx Adds test id for confirming false positive.
src/components/common/tours/WelcomeModal.tsx Adds test id for “Explore” button.
src/components/common/GitLabIntegrationForm.tsx Adds test ids for GitLab integration form fields/actions.
src/components/common/DynamicHeader.tsx Plumbs testId from menu items into rendered links.
src/components/common/Combobox.tsx Adds data-testid passthrough and option ids for POM usage.
src/components/common/ArtifactForm.tsx Adds test ids for artifact creation fields/actions.
src/components/common/ArtifactDialog.tsx Adds test id to submit artifact button.
src/components/common/Alert.tsx Adds test id to confirm action.
src/components/asset/asset-form/VulnAutoReopenAfterDays.tsx Adds test id to auto-reopen switch.
src/components/asset/asset-form/AssetFormVulnsManagement.tsx Adds test ids to public access switch + save button.
src/components/asset/asset-form/AssetFormRequirements.tsx Adds test ids and makes Low/Medium/High clickable for tests.
src/components/asset/asset-form/AssetFormGeneral.tsx Adds test ids for repo fields and provider selection buttons.
src/components/artifacts/ArtifactRow.tsx Adds test ids for artifact dropdown actions.
src/components/AcceptRiskDialog.tsx Adds test id for confirming accepted risk.
src/app/(loading-group)/[organizationSlug]/settings/page.tsx Adds test id to “Add Member” button.
src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/page.tsx Adds test ids to create subgroup/repo actions and submit.
src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/assets/[assetSlug]/settings/page.tsx Adds test id to delete repository button.
src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/assets/[assetSlug]/refs/[assetVersionSlug]/dependency-risks/page.tsx Adds test ids for state tabs and sorting caret.
src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/assets/[assetSlug]/refs/[assetVersionSlug]/dependency-risks/[vulnId]/page.tsx Adds test ids for vuln actions (false positive/accept/comment).
src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/assets/[assetSlug]/refs/[assetVersionSlug]/artifacts/page.tsx Adds test ids for artifact creation + delete confirmation.
src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/assets/[assetSlug]/page.tsx Adds test id for “Setup Risk Scanning” entrypoint.
src/app/(loading-group)/[organizationSlug]/page.tsx Adds test ids for “Create group” and submit.
e2e/src/utils.ts Adds unique email generator for test registrations.
e2e/src/pom/flows/vuln.ts New POM flow for vuln navigation/actions and filtering.
e2e/src/pom/flows/setup.ts New POM flow for risk scanner setup + uploads + GitLab autosetup.
e2e/src/pom/flows/repo.ts New POM flow for repo create/settings/delete.
e2e/src/pom/flows/org.ts New POM flow for org creation and member invites.
e2e/src/pom/flows/group.ts New POM flow for group actions and header nav checks.
e2e/src/pom/flows/auth.ts New POM flow for auth/register/login/logout.
e2e/src/pom/flows/artifact.ts New POM flow for artifact create/delete.
e2e/src/pom/devguard.ts Refactors monolithic POM into flow composition and shared helpers.
e2e/src/opencode-devguard-project-handling.e2e.spec.ts Updates spec to use new auth flow for logout.
e2e/src/devguard-vuln-flow.e2e.spec.ts New spec covering SBOM→vuln handling, GitLab autosetup, and filtering.
e2e/src/devguard-user-invite.e2e.spec.ts New spec covering org invite flow.
e2e/src/devguard-test-light-dark-mode.e2e.spec.ts Updates to new registration helper + theme test.
e2e/src/devguard-repo-flow.e2e.spec.ts Refactors repo flows to POM flows; retains artifact flow test.
e2e/src/devguard-prerelease-test.e2e.spec.ts Refactors prerelease flow to new POM flows.
e2e/src/devguard-login-flow.e2e.spec.ts Updates login/registration tests to use new auth helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/FileUpload.tsx Outdated
Comment thread e2e/src/pom/flows/setup.ts
Comment thread e2e/src/pom/flows/auth.ts Outdated
Comment thread e2e/src/utils.ts Outdated
Comment thread e2e/src/utils.ts
Comment thread e2e/src/devguard-vuln-flow.e2e.spec.ts Outdated
Comment thread e2e/src/devguard-user-invite.e2e.spec.ts Outdated
Comment thread e2e/src/pom/flows/setup.ts Outdated
Comment thread e2e/src/pom/devguard.ts Outdated
Comment thread e2e/src/devguard-repo-flow.e2e.spec.ts

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

Copilot reviewed 69 out of 72 changed files in this pull request and generated 3 comments.

Comment thread e2e/src/devguard-vuln-flow.e2e.spec.ts
Comment thread e2e/src/pom/flows/setup.ts Outdated
Comment thread e2e/src/pom/flows/vuln.ts

@seb-kw seb-kw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please resolve conflicts again 😅

@juliankepka juliankepka requested a review from seb-kw June 10, 2026 08:10
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.

E2E Testing of DevGuard Web with Playwright

4 participants