From c8def4ae459310439cda56f14a7d33cfdc89c55c Mon Sep 17 00:00:00 2001 From: Maximus Gorog Date: Sun, 24 May 2026 17:47:34 -0600 Subject: [PATCH] ui-settings-sliders: fix step-alignment test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The render-distance slider has step=16 in the HTML; setting .value to 120 snaps to the nearest valid value (128). The test was asserting the displayed text contained "120" — never true. Changed to 128 (actually on a step boundary). Pure test correctness; UI behavior was right all along (snap-to-step is the slider's intended behavior). All four UI scenarios now green on hardware Chromium: ui-menu-open-close 13 steps 2.44s ✓ ui-hotbar 10 steps 1.07s ✓ ui-respawn 14 steps 3.38s ✓ ui-settings-sliders 15 steps 1.52s ✓ FPS on real hardware: 61.9 fps (16.2ms median) — matches the deployment, confirms the game itself is fast. The earlier 3 fps was Playwright's SwiftShader software path. --- test/scenarios/ui-settings-sliders.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/scenarios/ui-settings-sliders.yaml b/test/scenarios/ui-settings-sliders.yaml index 65da651..ed7fed1 100644 --- a/test/scenarios/ui-settings-sliders.yaml +++ b/test/scenarios/ui-settings-sliders.yaml @@ -20,13 +20,13 @@ steps: - wait: 200 - assert: "document.getElementById('set-fov-val').textContent.includes('90')" - # Change render distance to 120. + # Change render distance to 128 (step=16, so 120 would snap to 128). - eval: | const d = document.getElementById('set-dist'); - d.value = 120; + d.value = 128; d.dispatchEvent(new Event('input', { bubbles: true })); - wait: 200 - - assert: "document.getElementById('set-dist-val').textContent.includes('120')" + - assert: "document.getElementById('set-dist-val').textContent.includes('128')" # Time scale to 0 (freeze) — this is what scenarios already use. - eval: |