Unique test id per GraphSelector mount (fix strict-mode collision)#139
Merged
Conversation
GraphSelector is mounted in up to three responsive slots at once (sidebar,
phone top-bar, workspace top-bar) and every instance hard-coded
data-testid="graph-selector". On desktop workspace that put 2+ elements with the
same test id in the DOM, so any strict-mode selector (e.g. the shared E2E
navigateToWorkspace helper's isVisible/getByTestId) errored with a strict-mode
violation. Add a `testId` prop (default 'graph-selector' = the canonical
workspace mount); the sidebar/phone mounts now use graph-selector-sidebar /
graph-selector-mobile. getByTestId('graph-selector') is unique again.
Found by a dogfood session against the live dev stack. Verified: typecheck;
THE GATE 5/5; canonical count == 1, 0 page/GraphQL errors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🧪 Comprehensive Test Suite
Full-stack smoke gate runs in the CI workflow. |
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.
GraphSelector mounts in up to 3 responsive slots at once (sidebar, phone top-bar, workspace top-bar), each hard-coding
data-testid="graph-selector"→ duplicate test id in the DOM → strict-mode selector violations (broke the sharednavigateToWorkspaceE2E helper). Adds atestIdprop (defaultgraph-selector= canonical workspace mount); sidebar/phone getgraph-selector-sidebar/graph-selector-mobile.Surfaced by a dogfood session driving the live dev stack. Verified: web typecheck; THE GATE 5/5;
getByTestId('graph-selector')resolves to exactly 1; 0 page/GraphQL errors in session.🤖 Generated with Claude Code