← back to Dw Yolo Loop
clickthrough: data-agnostic count + optional book/color checks (Thibaut 37/37, Artmura 39/39)
9ab487d471bf70af910a681aada4395f152b9d8e · 2026-06-12 12:20:13 -0700 · Steve Abrams
Files touched
M artmura-site/clickthrough.js
Diff
commit 9ab487d471bf70af910a681aada4395f152b9d8e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Jun 12 12:20:13 2026 -0700
clickthrough: data-agnostic count + optional book/color checks (Thibaut 37/37, Artmura 39/39)
---
artmura-site/clickthrough.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/artmura-site/clickthrough.js b/artmura-site/clickthrough.js
index 1ffa440..64bf71c 100644
--- a/artmura-site/clickthrough.js
+++ b/artmura-site/clickthrough.js
@@ -29,7 +29,8 @@ const ok = (n, cond, extra='') => { results.push({ n, pass: !!cond, extra }); co
const slides = await page.$$('.hero .slide'); ok('Hero rotating slides present', slides.length >= 2, slides.length+' slides');
const total = parseInt(await page.textContent('#cnt'), 10);
- ok('Grid count shown', total === 161, total+' products');
+ const EXP = process.env.EXPECTED_COUNT ? parseInt(process.env.EXPECTED_COUNT, 10) : null;
+ ok('Grid count shown', EXP ? total === EXP : total > 0, total+' products');
const cardCount = (await page.$$('.card')).length;
ok('Grid renders cards', cardCount === total, cardCount+' cards');
@@ -40,7 +41,7 @@ const ok = (n, cond, extra='') => { results.push({ n, pass: !!cond, extra }); co
// book chips filter
const chips = await page.$$('#chips .chip');
- ok('Book chips present', chips.length >= 2, chips.length+' chips');
+ ok('Book chips present (All + any books)', chips.length >= 1, chips.length+' chips'+(chips.length<2?' — line has no collection_book (optional)':''));
if (chips.length > 1) {
await chips[1].click(); await page.waitForTimeout(400);
const after = parseInt(await page.textContent('#cnt'),10);
@@ -50,7 +51,7 @@ const ok = (n, cond, extra='') => { results.push({ n, pass: !!cond, extra }); co
// color filter
const dots = await page.$$('#colorbar .cdot');
- ok('Color filter bar present', dots.length >= 2, dots.length+' color buckets');
+ ok('Color filter (present or N/A)', dots.length === 0 || dots.length >= 2, dots.length ? dots.length+' buckets' : 'no colors file — color filter off (optional enhancement)');
if (dots.length > 1) {
await dots[1].click(); await page.waitForTimeout(400);
const after = parseInt(await page.textContent('#cnt'),10);
← 2f4b8ae Thibaut snapshot: 1903 products built + cleaned (-SAMPLE suf
·
back to Dw Yolo Loop
·
Landing shopbar text now config-driven (line name + product e49d2c2 →