test(vscode): add e2e coverage for nx.generate.ui entry points#3111
Open
test(vscode): add e2e coverage for nx.generate.ui entry points#3111
Conversation
Covers all three entry points: command palette, projects view context menu, and explorer context menu. Asserts the Generate UI opens and has the expected preselected project/path for each entry point. Seeds an additional root-level `extra-project` into the isolated test workspace so the projects-view case can prove projects-view-specific preselection (distinct from the palette default). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
View your CI Pipeline Execution ↗ for commit b3c1ea1
☁️ Nx Cloud last updated this comment at |
Drop the pre-launch workspace seed that was breaking the runner startup. Use the react-standalone fixture's built-in `e2e` project as the non-default project for the projects-view case instead. Tighten the projects-view row locator to exact `aria-label=` match so the `e2e` project name doesn't collide with the isolated workspace's `e2e#######` directory name via substring matching. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use a non-reserved env var for the runner marker id so the extension host writes the marker file Playwright is waiting for.
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.
Summary
Adds Playwright e2e coverage for
nx.generate.uifrom all three entry points:extra-project), asserting the preselected project isextra-project(and not the workspace default).src/main.tsx, asserting the breadcrumb's relative directory matchessrcexactly.Why the extra seeded project
The isolated test workspace is a single-project React standalone. Without a second project, the projects-view case couldn't prove projects-view-specific preselection — a silent regression of
nx.generate.ui.projectViewto behave like plainnx.generate.uiwould still produceproject === workspaceNameand pass. Seeding a root-levelextra-projectin the fixture makes the assertion meaningful.Test plan
VS Code E2Eworkflow against this branch and confirmsmoke.test.ts+generate-ui-entry-points.test.tspass.🤖 Generated with Claude Code