From 3b8fe08d9e85878dadf1d984c084f18b132f6fd4 Mon Sep 17 00:00:00 2001 From: Admin Date: Fri, 18 Sep 2026 00:47:50 +0000 Subject: [PATCH] Test wide-screen HUD responsiveness --- tests/wiring.test.mjs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/wiring.test.mjs b/tests/wiring.test.mjs index c81ac19..2c35320 100644 --- a/tests/wiring.test.mjs +++ b/tests/wiring.test.mjs @@ -47,3 +47,22 @@ test('player collision callback queues hits and processing occurs in scene updat assert.match(source, /combat:player-hit-queued/); assert.match(source, /combat:player-hit-processed/); }); + +test('wide-screen HUD keeps visual controls aligned with touch hit-zones', async () => { + const source = await read('src/mobile-hud.js'); + + assert.match(source, /@media \(min-width: 700px\)/); + assert.match(source, /--steam-wide-helm-size:/); + assert.match(source, /--steam-wide-cannon-size:/); + assert.match(source, /\.steam-radar-wrap,\s*#mobile-controls\.controller-active #drag-stick/); + assert.match(source, /\.steam-cannon-port,\s*\.steam-cannon-starboard,\s*#mobile-controls\.controller-active \.mobile-control\.port,\s*#mobile-controls\.controller-active \.mobile-control\.starboard/); + assert.match(source, /right: calc\(var\(--steam-wide-edge-right\) \+ var\(--steam-wide-cannon-size\) \+ 14px\)/); +}); + +test('wide-screen HUD caps portrait-scaled artwork instead of stretching with viewport width', async () => { + const source = await read('src/mobile-hud.js'); + + assert.match(source, /\.steam-top \{[\s\S]*?width: min\(64vw, 560px\)/); + assert.match(source, /\.steam-player-card \{[\s\S]*?width: min\(34vw, 360px\)/); + assert.match(source, /\.steam-enemy-card \{[\s\S]*?width: min\(30vw, 330px\)/); +});