test(e2e): fix stale Pattern-row locator in multi-control-editors script - #2155
Merged
Conversation
PR #2137's accessibility pass wrapped the Pattern control's mode select in a <label> (for native label association) instead of a plain <div>, so the script's tag-specific ":scope > div > select" locator stopped matching and the script started failing on every run. Scope by descendant instead of direct-child-with-tag, which still avoids matching the sidebar's filter box and the Unresolved-object-text control since neither is inside the Pattern row's wrapper. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
verify-appshell-multi-control-editors.mjstimed out ongetByText('Pattern:', { exact: true }).locator('../..').locator(':scope > select, :scope > div > select').first(), failing consistently on bothmainand this branch.<select>in a<label>instead of a plain<div>for correct native label association (src/AppShell/src/components/PropertyEditor.svelte) — a deliberate, correct app change. The test's CSS locator hardcoded thedivtag, so it stopped matching and the script started failing on every run.patternRow.locator('select').first()) instead of direct-child-with-tag. This still avoids matching the sidebar's "Filter game objects" textbox and the "Unresolved object text" control, since neither is a descendant of the Pattern row's own wrapper.Test plan
dotnet build src/WasmEditor/WasmEditor.csproj && dotnet build src/WasmPlayer/WasmPlayer.csproj./dev.sh --port 5199node tests/e2e/verify-appshell-multi-control-editors.mjs http://localhost:5199— all 16 assertions pass🤖 Generated with Claude Code