Skip to content

test(vscode): add e2e coverage for nx.generate.ui entry points#3111

Open
MaxKless wants to merge 5 commits intomasterfrom
e2e/generate-ui-entry-points
Open

test(vscode): add e2e coverage for nx.generate.ui entry points#3111
MaxKless wants to merge 5 commits intomasterfrom
e2e/generate-ui-entry-points

Conversation

@MaxKless
Copy link
Copy Markdown
Contributor

Summary

Adds Playwright e2e coverage for nx.generate.ui from all three entry points:

  • Command palette — opens Generate UI with workspace default preselection.
  • Projects view context menu — opens Generate UI from a real sidebar tree-item right-click on a seeded non-default project (extra-project), asserting the preselected project is extra-project (and not the workspace default).
  • Explorer context menu — opens Generate UI from a real file-context-menu right-click on src/main.tsx, asserting the breadcrumb's relative directory matches src exactly.

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.projectView to behave like plain nx.generate.ui would still produce project === workspaceName and pass. Seeding a root-level extra-project in the fixture makes the assertion meaningful.

Test plan

  • Manually trigger the VS Code E2E workflow against this branch and confirm smoke.test.ts + generate-ui-entry-points.test.ts pass.

🤖 Generated with Claude Code

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>
@nx-cloud-snapshot
Copy link
Copy Markdown
Contributor

nx-cloud-snapshot Bot commented Apr 15, 2026

View your CI Pipeline Execution ↗ for commit b3c1ea1

Command Status Duration Result
nx run vscode-e2e:e2e ❌ Failed 10m 16s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-15 13:54:43 UTC

MaxKless and others added 4 commits April 14, 2026 23:36
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.
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.

1 participant