feat: add playwright e2e tests for DevGuard Web#771
Open
juliankepka wants to merge 32 commits into
Open
Conversation
14 tasks
timbastin
reviewed
Jun 2, 2026
Contributor
There was a problem hiding this comment.
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-testidattributes 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.
Signed-off-by: Julian Kepka <148074683+juliankepka@users.noreply.github.com>
seb-kw
requested changes
Jun 9, 2026
seb-kw
left a comment
Member
There was a problem hiding this comment.
Please resolve conflicts again 😅
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.
l3montree-dev/devguard#2079