Skip to content

test(verify): add verify-nojs-elements browser verification skill - #131

Merged
ErickXavier merged 1 commit into
mainfrom
test/verify-skill
Nov 24, 2026
Merged

ErickXavier merged 1 commit into
mainfrom
test/verify-skill

Conversation

@ErickXavier

Copy link
Copy Markdown
Collaborator

Summary

Adds .claude/skills/verify-nojs-elements/, a project-local verification skill that lets an agent (or a person) prove element behavior in a real browser instead of stopping at Jest: launch an isolated server, check it, drive the example pages the way a visitor does, and keep the evidence.

  • scripts/verify.mjs with launch | doctor | drive | stop. It starts test-server.js on a chosen port (default 4321), records the pid under .verify/run/<port>/, and only ever stops the process it started (verified by pid, command and cwd).
  • --core <no.js> picks the NoJS core build the pages run on. test-server.js always serves /NoJS/... from the sibling ../NoJS checkout, which is often an older release (1.21.1 on this machine while Elements is 1.23.0), so the harness serves the chosen build to the driven browser and records the version the page actually loaded (loadedCoreVersion in result.json). https://cdn.no-js.dev/ and https://cdn-elements.no-js.dev/ are mapped to the chosen core and this checkout's dist/ the same way.
  • drive runs a JSON journey through the repo's own Playwright Chromium: user actions (click, key, focus, drag, fill, ...) and expectations (expect-attr for ARIA state, expect-focused, expect-class, expect-disabled, ...). Evidence goes to .verify/evidence/<stamp>-<name>/: steps.log, result.json, console.log, network.jsonl, screenshots and ARIA snapshots.
  • features/ maps five user-facing elements with recipes and gotchas: modal, tabs, dropdown, form validation, drag and drop. journeys/ holds the executable form of each recipe.
  • Compiled-host mode (Elements under NoJS-Server's plugin host) is documented as a pointer only: which NoJS-Server parity fixtures load Elements and how to point them at this checkout with NOJS_ELEMENTS_PATH. Not run as part of this PR.
  • .gitignore: .claude/ becomes .claude/* plus !.claude/skills/ so project skills are tracked while local Claude settings stay ignored, and .verify/ is ignored.

No product code changes.

Proof run (d9636db, macOS, Node 26, core build from no-js-dev/nojs main ede16b0 = 1.23.0)

node .claude/skills/verify-nojs-elements/scripts/verify.mjs launch --core ../NoJS--verify/dist/iife/no.js
#   READY http://127.0.0.1:4321 pid=73559 elements=1.23.0 sha=d9636db core=1.23.0
node .claude/skills/verify-nojs-elements/scripts/verify.mjs launch --core ...   # REFUSE: already recorded on port 4321 (exit 1)
node .claude/skills/verify-nojs-elements/scripts/verify.mjs doctor              # 6x OK, exit 0
node .claude/skills/verify-nojs-elements/scripts/verify.mjs drive --journey .claude/skills/verify-nojs-elements/journeys/modal.json   # 32/32 PASS, loadedCoreVersion 1.23.0
node .claude/skills/verify-nojs-elements/scripts/verify.mjs stop                # STOPPED pid 73559; evidence kept

After stop: port 4321 free, pid gone, .verify/run/4321/ removed, the evidence directory and the server log still present.

All mapped journeys pass on main: modal, tabs, dropdown, validation, dnd (including keyboard grab, move and drop: the list reads KB-2, KB-1, KB-3 afterwards).

Notes for reviewers

  • test-server.js has no host option and listens on all interfaces; the skill says so and tells the reader to stop it when done.
  • npm start (docs/dev-server.js) auto-picks a port in 3000-3010, so the skill uses test-server.js for isolation.

Agents had no scripted way to prove element behavior in a real
browser. verify-nojs-elements launches test-server.js on an isolated
port, runs the example pages on a chosen core build (the shared
../NoJS checkout is often an older release), drives JSON journeys
through Playwright Chromium and keeps screenshots, ARIA snapshots,
console and network logs in .verify/.

- feature map: modal, tabs, dropdown, validation, drag and drop
- compiled-host mode under NoJS-Server documented as a pointer
- .gitignore tracks .claude/skills/ and ignores .verify/
@ErickXavier
ErickXavier merged commit cd2703a into main Nov 24, 2026
2 checks passed
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