aboutsummaryrefslogtreecommitdiff
path: root/tests/gallery-probes
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gallery-probes')
-rw-r--r--tests/gallery-probes/probe-fams.mjs14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/gallery-probes/probe-fams.mjs b/tests/gallery-probes/probe-fams.mjs
index 35671db..99b4e92 100644
--- a/tests/gallery-probes/probe-fams.mjs
+++ b/tests/gallery-probes/probe-fams.mjs
@@ -20,19 +20,19 @@ ok('no exceptions on load', events.filter(e => e.method === 'Runtime.exceptionTh
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`);
+const dmxFill0 = await evl(`getComputedStyle(document.querySelector('#card-R10 svg text')).fill`);
ok('R10 default ink = gold-hi', dmxFill0 === 'rgb(255, 190, 84)', dmxFill0);
// click green chip on R10 -> ink becomes phos rgb(127,224,160)
-await evl(`document.querySelector('#dmx').closest('.card').querySelector('.fc[title="green"]').click()`);
-const dmxFill1 = await evl(`getComputedStyle(document.querySelector('#dmx text')).fill`);
+await evl(`document.querySelector('#card-R10').querySelector('.fc[title="green"]').click()`);
+const dmxFill1 = await evl(`getComputedStyle(document.querySelector('#card-R10 svg text')).fill`);
ok('R10 green chip recolors ink', dmxFill1 === 'rgb(127, 224, 160)', dmxFill1);
// radar: default sweep line = gold-hi; click green -> phos
-const swSel = `document.querySelector('#radar').closest('.card')`;
-const line0 = await evl(`getComputedStyle(document.querySelectorAll('#radar line')[0]).stroke`);
+const swSel = `document.querySelector('#card-R31')`;
+const line0 = await evl(`getComputedStyle(document.querySelectorAll('#card-R31 svg line')[0]).stroke`);
await evl(`${swSel}.querySelector('.fc[title="green"]').click()`);
-const line1 = await evl(`getComputedStyle(document.querySelectorAll('#radar line')[0]).stroke`);
+const line1 = await evl(`getComputedStyle(document.querySelectorAll('#card-R31 svg line')[0]).stroke`);
ok('R31 green chip recolors furniture', line0 !== line1 && line1 === 'rgb(88, 184, 126)', `${line0} -> ${line1}`);
// scope (CSS widget): trace stroke changes on amber chip
@@ -55,7 +55,7 @@ ok('R17 amber chip retints face', face === 'rgb(216, 203, 166)', face);
ok('no exceptions after chip clicks', events.filter(e => e.method === 'Runtime.exceptionThrown').length === 0);
// screenshot the recolored screens region (scroll R31 into view)
-await evl(`document.querySelector('#radar').scrollIntoView({block:'center'})`);
+await evl(`document.querySelector('#card-R31 svg').scrollIntoView({block:'center'})`);
await sleep(400);
const shot = await send('Page.captureScreenshot', { format: 'png' });
writeFileSync('fams.png', Buffer.from(shot.result.data, 'base64'));