Files
meshcore-analyzer/.github/workflows
Kpa-clawbot d837166158 test(coverage): add Playwright E2E for channels page (#1297 B3) (#1300)
## #1297 B3 — Playwright E2E coverage for `public/channels.js`

Pure-coverage PR. Adds five Playwright suites targeting the largest
under-tested branches of `public/channels.js` (1950 LOC, was **19.9%
statements** per the live coverage refinement in #1297 — the single
biggest delta opportunity in the umbrella). No production code changes.

### Coverage exemption

Per repo `AGENTS.md` TDD rule: this is the **net-new test coverage**
case — there is no production change to gate, so a failing-then-passing
red commit isn't applicable. All five suites exercise existing channels
init() code paths that ship today.

### New test files

| File | Scenarios exercised |
| --- | --- |
| `test-channels-list-render-e2e.js` | Sectioned sidebar (My Channels /
Network / Encrypted) headers, encrypted collapse toggle + localStorage
persistence, row badges + previews, color dot + color clear control,
sidebar resize handle width persist |
| `test-channels-selection-flow-e2e.js` | `selectChannel()` header
update + URL replaceState, message row rendering (avatars, sender
colors, packet links), node detail panel open via mouse + keyboard +
close-with-focus-restore, deep-link route restoration, scroll button
initial state |
| `test-channels-add-modal-e2e.js` | Generate PSK Channel (key + QR +
status banner + localStorage persist), Add PSK invalid hex error path,
Add PSK valid hex success + close + My Channels row, Monitor Hashtag
with and without leading `#`, empty-hashtag no-op, Scan QR unavailable
fallback, Escape close, Remove ✕ flow |
| `test-channels-share-color-e2e.js` | Share modal normal mode
(dedicated `#chShareModal` with QR + Hex Key + Copy success label),
Share modal error mode (`openShareModalError` when no stored key — field
groups hidden), Escape close, `ChannelColorPicker.show` invocation on
color-dot click, keyboard Enter on a `[data-share-channel]` span |
| `test-channels-ws-batch-e2e.js` | `processWSBatch` via
`_channelsProcessWSBatchForTest`: explicit-sender append, `"Sender:
text"` parsing branch, packetHash dedup + observer accumulation,
new-channel append (channel previously unseen), scroll-button branch
when user not at bottom, region-filter exclusion code path |

All five tests wired into `.github/workflows/deploy.yml` after the
existing `test-channel-fluid-e2e.js` step.

### Preflight

`bash ~/.openclaw/skills/pr-preflight/scripts/run-all.sh origin/master`
→
exit 0, all gates pass (PII, CSS vars, branch scope, etc.).

Refs #1297

---------

Co-authored-by: openclaw-bot <openclaw-bot@users.noreply.github.com>
Co-authored-by: openclaw-bot <bot@openclaw.local>
Co-authored-by: mc-bot <bot@meshcore.local>
2026-05-29 11:46:51 +00:00
..