aboutsummaryrefslogtreecommitdiff
path: root/tests/gallery-probes/probe.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gallery-probes/probe.mjs')
-rw-r--r--tests/gallery-probes/probe.mjs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/gallery-probes/probe.mjs b/tests/gallery-probes/probe.mjs
index d9ba22f..4892188 100644
--- a/tests/gallery-probes/probe.mjs
+++ b/tests/gallery-probes/probe.mjs
@@ -1109,6 +1109,25 @@ try {
})()`);
ok('N20 chips are miniature flap cells: board colour, ink letter, real face', n20g === 'ok', n20g);
+ // N24 jewels — the handle reads and drives lamp state. Waybar-bound: a
+ // consumer must be able to set a jewel without synthesizing clicks.
+ const jw = await evl(`(() => {
+ const h = document.getElementById('card-N24').dupre;
+ if (!h.get || !h.set) return 'no get/set on handle';
+ const init = h.get().join(',');
+ if (init !== '0,1,2,-1') return 'initial ' + init;
+ h.set(3, 1);
+ if (h.get()[3] !== 1) return 'set(3,1) not reflected: ' + h.get().join(',');
+ const el = document.querySelectorAll('#card-N24 .dupre-jewel')[3];
+ if (!el) return 'no .dupre-jewel elements';
+ if (el.classList.contains('dupre-dim')) return 'jewel 3 still dark after set(3,1)';
+ h.set(3, -1);
+ if (!el.classList.contains('dupre-dim')) return 'set(3,-1) did not dark';
+ if (h.get()[3] !== -1) return 'get after dark: ' + h.get().join(',');
+ return 'ok';
+ })()`);
+ ok('N24 jewels handle exposes get/set', jw === 'ok', jw);
+
// Under prefers-reduced-motion the board paints once and RESTS — the dwell
// chain must stay gated off, or the panel self-advances every 2s forever.
await send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-reduced-motion', value: 'reduce' }] });