Skip to content

skills: promote e2e-locators-that-lie (four Playwright harness defects on Mendix pages) - #249

Closed
MendixMau wants to merge 1 commit into
masterfrom
feat/e2e-locators-that-lie
Closed

MendixMau wants to merge 1 commit into
masterfrom
feat/e2e-locators-that-lie

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Direct lane (skills/)

What changed and why (one paragraph):
Promotes skills/e2e-locators-that-lie.md from a personal toolkit. Four Playwright harness defects, each of which produced a confident, specific verdict about the app (three false FAILs, one false PASS): (1) a Studio Pro widget name is unique per page, not per rendered DOM — a tabbed page renders hidden panes at zero height, so .first() on .mx-name-x asserts or drives the hidden node; use :visible, and for assertions check every match until one is visible; (2) click({ force: true }) on a Mendix tab is swallowed by the <li> and never throws, so the idiom force.catch(() => plain) is dead code — plain click first, force as fallback; (3) a grid re-renders on the server response, not on the click, so a single text read at settle time races — poll until the property holds within a bounded deadline, both for textPresent and textAbsent; (4) a fixture literal that the reset script itself writes measures only the reset — derive values from the rows and assert the claimed property (e.g. "nobody in both association sets") instead of a magic number.

Field evidence: measured 2026-09-17 on a user-group administration module (tabbed detail page, members grid, per-row role dropdown). The fixes exist in that project's runner (anyVisible deadline loop, :visible widget lookup, plain-then-force click, polled awaitText) and the fixture check was rewritten from MemberCount = 6 to a cross-association join. Only the patterns are quoted, no project data.

Wired: routing row in bin/lib/skill-routing.tsv (test,review · stages 5,6 · ondemand · diagnose) and re-rendered surfaces (README, ROUTING.md, test/review agent templates, gate-check stage map); one-line pointer in skills/e2e-harness-base.md "Mendix-specific quirks"; CHANGELOG line in the same commit. Cross-references point at toolkit skills only (e2e-harness-base.md, journey-proof.md, fixture-seeding.md, tool-output-is-not-ground-truth.md, and unhappy-path-testing.md, which is being promoted in a parallel PR).

Runner status (not changed here): project-tests/e2e/journey-runner.js does not apply rules 1–3 — w() is .mx-name-<n> + .first() without :visible, the click is force.catch(() => plain) (preceded by a hit-test, which catches a cover but not a handler on a child node), landing guard / widget checks use .first().isVisible(), and textPresent/textAbsent read the body once. The skill says so explicitly; porting the fixes to the runner is a follow-up instrument change with its own field proof.

Checks run (all clean): bin/check-pr-discipline.sh, bin/check-skill-routing.sh, bin/render-routing.sh --check ("surfaces in sync; all skills routed or exempted; baseline 75969 words / budget 80000"), bin/check-no-client-data.sh with the local denylist and LEAKGUARD_BASE=origin/master ("no new capitalised words; no client data in 743 tracked files"), bin/check-portability.sh ("clean, 187 files").

  • No client data anywhere in the diff
  • Size cap: 9 files, well under 400 lines excluding CHANGELOG.md
  • Test tier reached: T0 (mechanical gates above); the skill is prose plus quoted patterns, no instrument changed
  • For a new skill: routing row added (bin/lib/skill-routing.tsv + bin/render-routing.sh)
  • CHANGELOG.md line appended in this PR, crediting the source
  • N/A: no instrument, no bug entries

🤖 Generated with Claude Code

…s on Mendix pages)

Four measured defects (2026-09-17, user-group administration module) where
the Playwright harness reported a defect in the app: widget name unique per
page not per DOM, forced click on a tab swallowed without throwing, grid
re-render after the response not the click, fixture literal written by the
reset script. Routed test/review at Stages 5-6 (diagnose), pointer from
e2e-harness-base.md, CHANGELOG line in this commit. The shipped runner does
not yet apply rules 1-3; the skill states that and the runner is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
MendixMau added a commit that referenced this pull request Oct 8, 2026
Squash of integration/2026-10-08, which merges:

- #225 perf(ui-loop): test-stack-up.sh recognises a live mxcli run --local
- #231 fix(sync): sync-project.sh no longer exits 1 silently before its bin/ refresh
- #242 fix(init): local by default, no Dev Container
- #243 docs(lint): process/lint-backlog.md, the lint rollout plan
- #247 new(lint): the lint gate keeps a ledger
- #249 learn(test): skills/e2e-locators-that-lie.md
- #250 learn(skills): unhappy-path-testing.md
- #251 fix(testing-shape): mxcli test --local shares the deploy directory (#230)
- #252 fix(obligations): LOOK staleness reads the newest VALID AT stamp (#155)
- #253 docs(lint): quality-source review, Batch 4 backlog rows and skill additions
- #254 fix(lint): CONV020 works out of the box, page navigation counts as feedback (#229, #245)
- #255 fix(e2e): journey-runner rung 2 runs for a negative-only span claim (#150)
- #256 fix(gates): Stage 6 Surface, source-sufficiency title, ${JOURNEY_DIR} manifest token (#233, #234, #235)

Verified on the branch: tests/run-tests.sh 33/0, tests/test-lint-delivery.sh ALL GREEN, tests/wave2 73/75 (two environmental), render-routing --check, check-scripts, check-portability, leak guard, check-no-private-citations, check-pr-discipline all clean; scaffold smoke run without crashes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
@MendixMau

Copy link
Copy Markdown
Owner Author

Merged into master via integration PR #258 (squash 9dd9be4), on the maintainer's approval. Closing this PR; its branch is part of that squash.


Generated by Claude Code

@MendixMau MendixMau closed this Oct 8, 2026
@MendixMau
MendixMau deleted the feat/e2e-locators-that-lie branch October 15, 2026 10:45
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