Commit Graph

12 Commits

Author SHA1 Message Date
Kpa-clawbot
4ca850fdd0 test(e2e): add Playwright tests for all uncovered pages #144
Add 25 new E2E tests covering pages that previously had no Playwright coverage:

Packets page (4 tests):
- Detail pane hidden on fresh load
- groupByHash toggle
- Clicking row shows detail pane
- Detail pane close button

Analytics sub-tabs (7 tests):
- RF, Topology, Channels, Hash Stats, Hash Issues, Route Patterns, Distance

Compare page (2 tests):
- Observer dropdowns populate
- Running comparison produces results

Live page (2 tests):
- Page loads with map and stats
- WebSocket connection indicators

Channels page (2 tests):
- Channel list loads with items
- Clicking channel shows messages

Traces page (2 tests):
- Search input and button present
- Search returns results for valid hash

Observers page (2 tests):
- Table loads with rows
- Health indicators present

Perf page (2 tests):
- Metrics load
- Refresh button works

Audio Lab page (3 tests):
- Controls load (play, voice, BPM, volume)
- Sidebar lists packets by type
- Clicking packet shows detail and hex dump

Total: 42 tests (was 17). All new tests validated against analyzer.00id.net.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 10:42:35 -07:00
Kpa-clawbot
4cfdd85063 fix: resolve 4 issues + optimize E2E test performance
Issues fixed:
- #127: Firefox copy URL - shared copyToClipboard() with execCommand fallback
- #125: Dismiss packet detail pane - close button with keyboard support
- #124: Customize window scrollbar - flex layout fix for overflow
- #122: Last Activity stale times - use last_heard || last_seen

Test improvements:
- E2E perf: replace 19 networkidle waits, cut navigations 14->7, remove 11 sleeps
- 8 new unit tests for copyToClipboard helper (47->55 in test-frontend-helpers)
- 1 new E2E test for packet pane dismiss

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 12:41:25 -07:00
Kpa-clawbot
521ee21fce fix(test): move browser.close() after all E2E tests complete
browser.close() on line 274 was firing before tests 14-16 executed,
causing them to crash with 'Target page, context or browser has been
closed'. Moved to after test 16, just before the summary block.

Fixes 3 of 4 E2E failures (remaining 2 are data-dependent map tests).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 12:41:25 -07:00
you
863ee604be fix: re-run marker decollision on map resize
Added map.on('resize') handler that re-renders markers, recalculating
pixel-based decollision offsets for the new container size. Previously
only zoomend triggered re-render — resize left stale offsets.

Added E2E test verifying markers survive a viewport resize.
2026-03-24 20:55:39 +00:00
you
1bdf41a631 fix: separate heatmap opacity controls for Map and Live pages
- Live page showHeatMap() now reads meshcore-live-heatmap-opacity from
  localStorage and applies it to the canvas element (was hardcoded 0.3)
- Customizer now has two clearly labeled sliders:
  🗺️ Nodes Map — controls the static map page heatmap
  📡 Live Map — controls the live page heatmap
- Each uses its own localStorage key (meshcore-heatmap-opacity vs
  meshcore-live-heatmap-opacity)
- Added E2E tests for live opacity persistence and dual slider existence
- 13/15 E2E tests pass locally (2 fail due to ARM chromium OOM after
  heavy live page tests — CI on x64 will handle them)

Closes #119 properly this time.
2026-03-24 19:25:28 +00:00
you
16eb7ef07d fix: persist live page heat checkbox + add E2E test
Live page liveHeatToggle now saves to localStorage (meshcore-live-heatmap).
Map page was already fixed but live page was missed.
Added E2E test that verifies persistence across reload.

13/13 E2E tests pass locally.
2026-03-24 17:57:17 +00:00
you
dbb792bcbb test: add E2E tests for heat checkbox persistence and heatmap opacity
- Heat checkbox persists in localStorage across reload
- Heat checkbox is clickable (not disabled)
- Live page heat disabled when ghosts/matrix mode active
- Heatmap opacity value persists and applies to canvas

4 new tests, all verified locally before push.
2026-03-24 17:50:58 +00:00
you
1061a6209e docs: AGENTS.md updated with all testing learnings + fix E2E default to localhost
- Full test file list with all 12+ test files
- Feature development workflow: write code → write tests → run locally → push
- Playwright defaults to localhost:3000, NEVER prod
- Coverage infrastructure explained (Istanbul instrument → Playwright → nyc)
- ARM testing notes (basic tests work, heavy coverage use CI)
- 4 new pitfalls from today's session
2026-03-24 05:16:16 +00:00
you
2040b36a63 ci: lower node count threshold for local server E2E (>=1 not >=10)
Fresh DB has only seed data — can't expect 10+ nodes.
2026-03-24 03:03:54 +00:00
you
724a91da10 ci: Playwright runs BEFORE deploy against local temp server
Tests now run in the test job, not after deploy. Spins up server.js
on port 13581, runs Playwright against it, kills it after.
If E2E fails, deploy is blocked — broken code never reaches prod.
BASE_URL env var makes the test configurable.
2026-03-24 03:01:15 +00:00
you
0b1f7aaead ci: Playwright E2E tests run in GitHub Actions after deploy
8 smoke tests against prod after deployment completes.
Uses Playwright bundled Chromium on x86 runner.
Falls back to CHROMIUM_PATH env var for other architectures.
2026-03-24 02:37:48 +00:00
you
940debbbe9 Add Playwright E2E test POC (8 tests against prod)
Proof of concept: bare Playwright (not @playwright/test) running 8 critical
flow tests against analyzer.00id.net:
- Home page, nodes, map, packets, node detail, theme customizer, dark mode, analytics
- Uses system Chromium on ARM (Playwright bundled binary doesn't work on musl)
- Not added to test-all.sh or CI yet — POC only
- Run with: node test-e2e-playwright.js
2026-03-24 02:31:46 +00:00