aboutsummaryrefslogtreecommitdiff
path: root/tests/gallery-probes
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-12 20:56:15 -0500
committerCraig Jennings <c@cjennings.net>2026-07-12 20:56:15 -0500
commitb312240add7cb4dc2fd022f69b44917330ef3cd2 (patch)
treef1f4a9d183d48d599e1fb5449bb7f82a1f84dfe6 /tests/gallery-probes
parentb44cf9584da97e5831cbdc4a53e3f4f3c443e232 (diff)
downloadarchsetup-b312240add7cb4dc2fd022f69b44917330ef3cd2.tar.gz
archsetup-b312240add7cb4dc2fd022f69b44917330ef3cd2.zip
test(gallery): repair stale probe assertions
The committed probes asserted the pre-sprint gallery: default size 3 (now 2/M since 16da33e) and five .famchips rows (card 01's option capsules reuse the class, so six exist). The zoom test now clicks 3x explicitly instead of assuming it as the default, and the family count filters to rows labeled 'screen' so future option-group cards don't break it.
Diffstat (limited to 'tests/gallery-probes')
-rw-r--r--tests/gallery-probes/probe-fams.mjs3
-rw-r--r--tests/gallery-probes/probe.mjs5
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/gallery-probes/probe-fams.mjs b/tests/gallery-probes/probe-fams.mjs
index 08ac709..76759b6 100644
--- a/tests/gallery-probes/probe-fams.mjs
+++ b/tests/gallery-probes/probe-fams.mjs
@@ -16,7 +16,8 @@ const ok = (n, c, d = '') => { console.log(`${c ? 'PASS' : 'FAIL'} ${n}${d ? ' â
await send('Runtime.enable'); await sleep(1500);
ok('no exceptions on load', events.filter(e => e.method === 'Runtime.exceptionThrown').length === 0);
-ok('5 chip rows', await evl(`document.querySelectorAll('.famchips').length`) === 5);
+// count screen-family rows only — card option groups (e.g. card 01) reuse .famchips
+ok('5 screen chip rows', await evl(`[...document.querySelectorAll('.famchips .lab')].filter(l=>l.textContent==='screen').length`) === 5);
// default fallback: dmx ink computes to gold-hi rgb(255,190,84)
const dmxFill0 = await evl(`getComputedStyle(document.querySelector('#dmx text')).fill`);
diff --git a/tests/gallery-probes/probe.mjs b/tests/gallery-probes/probe.mjs
index 457ecf3..17b3d73 100644
--- a/tests/gallery-probes/probe.mjs
+++ b/tests/gallery-probes/probe.mjs
@@ -65,12 +65,13 @@ try {
const errs = events.filter(e => e.method === 'Runtime.exceptionThrown');
ok('no exceptions on load', errs.length === 0, errs.map(e => e.params.exceptionDetails?.exception?.description).join('; ').slice(0, 200));
- // 1. defaults: size=3, 84 cards
- ok('default size 3', await evl(`document.body.dataset.size`) === '3');
+ // 1. defaults: size=2 (M), card count
+ ok('default size 2', await evl(`document.body.dataset.size`) === '2');
const cards = await evl(`document.querySelectorAll('.card').length`);
ok('109 cards', cards === 109, `got ${cards}`);
// 2. zoom actually scales: card visual width at 3x vs 1x
+ await evl(`document.querySelector('.szbar .key[data-sz="3"]').click()`);
const w3 = await evl(`document.querySelector('.card').getBoundingClientRect().width`);
await evl(`document.querySelector('.szbar .key[data-sz="1"]').click()`);
const w1 = await evl(`document.querySelector('.card').getBoundingClientRect().width`);