Skip to content

fix(desktop): scope Node.js template e2e selector to active tab panel#555

Merged
skevetter merged 1 commit into
mainfrom
fix/e2e-nodejs-template-selector
Jun 29, 2026
Merged

fix(desktop): scope Node.js template e2e selector to active tab panel#555
skevetter merged 1 commit into
mainfrom
fix/e2e-nodejs-template-selector

Conversation

@skevetter

@skevetter skevetter commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

The integration.e2e.ts "should create Node.js workspace" test intermittently failed on Windows with a Playwright strict-mode violation:

locator('[role="dialog"]')…locator('button').filter({ hasText: 'Node.js' }) resolved to 2 elements
  1) Node.js template card (Git tab)
  2) "Node.js 20 Featured" image-catalog card (Image tab)

Both tab panels stay in the DOM, so the unscoped hasText: "Node.js" selector matched both whenever the async image catalog finished loading before the click — a race, which is why the same commit both passed and failed.

Fix: scope the locator to the active tabpanel, matching the pattern already used by the sibling Python-template flow in the same file and by workspaces.e2e.ts.

Pre-existing flake, unrelated to the change that surfaced it.

Summary by CodeRabbit

  • Tests
    • Improved the Node.js workspace creation end-to-end test to target the correct “Node.js” source template more precisely.
    • Reduced the chance of selecting the wrong template during the workspace setup flow.

The wizard Source step's "Node.js" template button collided with the Image
catalog's "Node.js 20" card (both present in the DOM), causing an
intermittent Playwright strict-mode violation on the integration e2e. Scope
the locator to the active tabpanel, matching the existing Python-template flow
and workspaces.e2e.ts.
@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 7e7b79d
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a42b4d7895d36000724a49e

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c23edbe7-a7b2-4eff-b6f6-993dfe2a44ee

📥 Commits

Reviewing files that changed from the base of the PR and between 9ec2060 and 7e7b79d.

📒 Files selected for processing (1)
  • desktop/e2e/integration.e2e.ts

📝 Walkthrough

Walkthrough

In the Node.js workspace creation e2e test, the Step 2 template selection now scopes the "Node.js" button click to the dialog's active tabpanel instead of the full dialog, preventing ambiguous matches with similarly-labeled elements elsewhere in the DOM.

Workspace Lifecycle E2E

Layer / File(s) Summary
Scope Node.js template click to active tabpanel
desktop/e2e/integration.e2e.ts
Step 2's "Node.js" button locator is now scoped to [role="tabpanel"]:not([hidden]) within the dialog, replacing the previous unscoped dialog-level locator.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • devsy-org/devsy#498: Same file and same pattern — scopes workspace wizard template button selectors (Node.js/Python) to the active tabpanel to avoid strict-mode multi-match failures.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 7e7b79d
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a42b4d7ea6ee30008e0964f

@skevetter
skevetter marked this pull request as ready for review June 29, 2026 20:33
@skevetter
skevetter merged commit dbfd660 into main Jun 29, 2026
26 checks passed
@skevetter
skevetter deleted the fix/e2e-nodejs-template-selector branch June 29, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant