Skip to content

test(e2e): fix stale Pattern-row locator in multi-control-editors script - #2155

Merged
alexwarren merged 1 commit into
mainfrom
claude/laughing-shamir-bdd1d0
Aug 27, 2026
Merged

test(e2e): fix stale Pattern-row locator in multi-control-editors script#2155
alexwarren merged 1 commit into
mainfrom
claude/laughing-shamir-bdd1d0

Conversation

@alexwarren

Copy link
Copy Markdown
Contributor

Summary

  • verify-appshell-multi-control-editors.mjs timed out on getByText('Pattern:', { exact: true }).locator('../..').locator(':scope > select, :scope > div > select').first(), failing consistently on both main and this branch.
  • Root cause: fix(AppShell): label PropertyEditor fields and announce validation errors #2137 (the accessibility pass) wrapped the Pattern control's mode <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 the div tag, so it stopped matching and the script started failing on every run.
  • Fix is test-only: scope the select lookup by descendant (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 5199
  • node tests/e2e/verify-appshell-multi-control-editors.mjs http://localhost:5199 — all 16 assertions pass

🤖 Generated with Claude Code

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>
@alexwarren
alexwarren merged commit 015bb81 into main Aug 27, 2026
16 checks passed
@alexwarren
alexwarren deleted the claude/laughing-shamir-bdd1d0 branch August 27, 2026 11:07
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