From 40a1b61f4d06c948f7aefed95fb33fecd3a9c119 Mon Sep 17 00:00:00 2001 From: jedarden Date: Sat, 25 Apr 2026 12:10:09 -0400 Subject: [PATCH] test(web): verify replay viewer loads and plays real match replay Added test suite that validates all replay viewer functionality: - Canvas renders grid, bots, energy cells correctly - Playback controls (play/pause, step, speed) work - Transcript panel generates turn-by-turn events - Win probability sparkline renders with data Mobile testing via ADB confirmed all tests pass on Pixel 6: - Loads real match m_tprjf4ij (712 turns, 4 players) - Canvas shows walls, bots, cores, energy nodes - All controls responsive on touch interface - Layout not broken, text readable, no horizontal overflow Acceptance criteria met - replay viewer is fully functional with real match data (real-replay.json in public/data/). --- .needle-predispatch-sha | 2 +- web/public/test-replay-viewer-bundled.html | 261 +++++++++++++++++++++ web/test-replay-viewer.html | 206 ++++++++++++++++ 3 files changed, 468 insertions(+), 1 deletion(-) create mode 100644 web/public/test-replay-viewer-bundled.html create mode 100644 web/test-replay-viewer.html diff --git a/.needle-predispatch-sha b/.needle-predispatch-sha index 4f51683..7c0fcbb 100644 --- a/.needle-predispatch-sha +++ b/.needle-predispatch-sha @@ -1 +1 @@ -3ae35ea00abe6123fd9b0b045ae8d61b2eaf9685 +508dc0c2e89849e9c383ec27150cdfd446368c52 diff --git a/web/public/test-replay-viewer-bundled.html b/web/public/test-replay-viewer-bundled.html new file mode 100644 index 0000000..3398231 --- /dev/null +++ b/web/public/test-replay-viewer-bundled.html @@ -0,0 +1,261 @@ + + + + + + Replay Viewer Test - Real Replay + + + +

Replay Viewer Test - Real Replay (m_tprjf4ij)

+
+
+
+ +
+
+ + + + + + + Loading... +
+
+
+

Transcript (Current Turn)

+
+
+
+
+

Test Results

+
+
+
+ + + + diff --git a/web/test-replay-viewer.html b/web/test-replay-viewer.html new file mode 100644 index 0000000..fbb3bc6 --- /dev/null +++ b/web/test-replay-viewer.html @@ -0,0 +1,206 @@ + + + + + + AI Code Battle - Replay Viewer Test + + + +

AI Code Battle - Replay Viewer Test Suite

+ +
+

Test Controls

+ + +
+ +
+

Test Results

+
+
+ +
+

Replay Viewer

+
+ +
+
+ +
+

Test Log

+
+
+ + + + +