mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-05-24 18:25:18 +00:00
5cb9b9e732
## Summary Adds Playwright E2E coverage for `public/home.js` and `public/path-inspector.js` per the umbrella issue #1297 B5 page-modules batch. Both files were flagged in the 2026-05-19 frontend coverage audit as page modules with only 1 E2E mention — well below the >=50% statement coverage target. ## Files added - `test-home-coverage-e2e.js` — 12 steps exercising: - first-time chooser → `showChooser` + `setLevel` - experienced-user render → `renderHome` + `loadStats` - search → suggestions → claim → `setupSearch` + `addMyNode` - My Mesh card render + click → `loadHealth` detail - card remove → localStorage cleared - level toggle → checklist accordion expand - `test-path-inspector-coverage-e2e.js` — 10 steps exercising: - page chrome (input/submit/help text) - all 4 validation branches (empty, non-hex, odd-length, mixed lengths) - Enter-key submit + URL `?prefixes=` replacement - valid prefixes → results/no-results render - candidate row toggle + Show on Map → `#/map` hand-off - deep-link `?prefixes=2c` auto-fill + auto-submit Both wired into `.github/workflows/deploy.yml` after the #1279 entries. ## Why the existing `test-path-inspector-e2e.js` is not enough The existing file uses the `@playwright/test` runner (`npx playwright test …`). CI's `e2e-test` step runs every coverage test as `node test-*-e2e.js` directly — the `@playwright/test`-style file is never invoked by CI and contributes zero to the frontend coverage roll-up. ## TDD note Per AGENTS.md exemption: pure coverage tests on existing UI surfaces, no production code modified (`git diff origin/master --stat` shows only the two new test files plus the workflow wiring). Zero behavior change → no red-then-green commit required. ## Verified - Both tests pass locally against a fresh Go server backed by `test-fixtures/e2e-fixture.db` (12/12 + 10/10). - Preflight (`bash ~/.openclaw/skills/pr-preflight/scripts/run-all.sh origin/master`): all gates clean. Refs #1297 Co-authored-by: iavor-bot <bot@corescope>