ui-settings-sliders: fix step-alignment test

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.
This commit is contained in:
Maximus Gorog 2026-05-24 17:47:34 -06:00
parent 3ed16c2aaf
commit c8def4ae45

View file

@ -20,13 +20,13 @@ steps:
- wait: 200 - wait: 200
- assert: "document.getElementById('set-fov-val').textContent.includes('90')" - 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: | - eval: |
const d = document.getElementById('set-dist'); const d = document.getElementById('set-dist');
d.value = 120; d.value = 128;
d.dispatchEvent(new Event('input', { bubbles: true })); d.dispatchEvent(new Event('input', { bubbles: true }));
- wait: 200 - 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. # Time scale to 0 (freeze) — this is what scenarios already use.
- eval: | - eval: |