[object Object]

← back to Nationalrealestate

auto-save: 2026-07-30T08:16:08 (4 files) — cap_mobile.cjs cap_search2.cjs cap_search3.cjs cap_webkit.cjs

e0d59e0412fab47e928d39b89f11d974a84aac7f · 2026-07-30 08:16:09 -0700 · Steve Abrams

Files touched

Diff

commit e0d59e0412fab47e928d39b89f11d974a84aac7f
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Jul 30 08:16:09 2026 -0700

    auto-save: 2026-07-30T08:16:08 (4 files) — cap_mobile.cjs cap_search2.cjs cap_search3.cjs cap_webkit.cjs
---
 cap_mobile.cjs  | 34 ++++++++++++++++++++++++++++++++++
 cap_search2.cjs | 19 +++++++++++++++++++
 cap_search3.cjs | 31 +++++++++++++++++++++++++++++++
 cap_webkit.cjs  | 29 +++++++++++++++++++++++++++++
 4 files changed, 113 insertions(+)

diff --git a/cap_mobile.cjs b/cap_mobile.cjs
new file mode 100644
index 0000000..6108d9a
--- /dev/null
+++ b/cap_mobile.cjs
@@ -0,0 +1,34 @@
+const { chromium, devices } = require('playwright');
+(async () => {
+  const url = process.argv[2] || 'https://corkwallcovering.com/';
+  const q = process.argv[3] || 'grasscloth';
+  const out = process.argv[4] || '/tmp/search-mobile.png';
+  const b = await chromium.launch();
+  const ctx = await b.newContext({ ...devices['iPhone 13'] });
+  const page = await ctx.newPage();
+  const errs = [];
+  page.on('console', m => { if (m.type()==='error') errs.push(m.text().slice(0,80)); });
+  page.on('pageerror', e => errs.push('PAGEERR '+e.message.slice(0,80)));
+  const resp502 = [];
+  page.on('response', r => { if (r.status()>=500 || (r.status()===404 && /api|search|products/i.test(r.url()))) resp502.push(r.status()+' '+r.url().slice(0,70)); });
+  await page.goto(url, { waitUntil: 'networkidle', timeout: 30000 });
+  const sel = '#grid a.card, #grid .card, [data-card]';
+  const t = async () => page.$$eval(sel, els => els.slice(0,4).map(e=>(e.textContent||'').replace(/\s+/g,' ').trim().slice(0,32)));
+  const searchVisible = await page.isVisible('#searchInput').catch(()=>false);
+  const before = await t().catch(()=>[]);
+  let typed = false;
+  try { await page.fill('#searchInput', q, { timeout: 4000 }); typed = true; } catch(e){ errs.push('FILL FAIL '+e.message.slice(0,60)); }
+  await page.waitForTimeout(1600);
+  const after = await t().catch(()=>[]);
+  const stat = await page.$eval('#statLine', el=>el.textContent).catch(()=> '(no statLine)');
+  console.log('URL', url, '| MOBILE');
+  console.log('#searchInput visible:', searchVisible, '| typed:', typed);
+  console.log('BEFORE:', JSON.stringify(before));
+  console.log('AFTER :', JSON.stringify(after));
+  console.log('statLine:', stat.trim(), '| grid changed:', JSON.stringify(before)!==JSON.stringify(after));
+  console.log('5xx/api-404 responses:', resp502.slice(0,6));
+  console.log('console errors:', errs.slice(0,6));
+  await page.screenshot({ path: out, fullPage: false });
+  console.log('shot', out);
+  await b.close();
+})().catch(e => { console.error('ERR', e.message); process.exit(1); });
diff --git a/cap_search2.cjs b/cap_search2.cjs
new file mode 100644
index 0000000..c58d598
--- /dev/null
+++ b/cap_search2.cjs
@@ -0,0 +1,19 @@
+const { chromium } = require('playwright');
+(async () => {
+  const url = process.argv[2] || 'https://corkwallcovering.com/';
+  const q = process.argv[3] || 'blue';
+  const out = process.argv[4] || '/tmp/search-proof.png';
+  const b = await chromium.launch();
+  const page = await b.newPage({ viewport: { width: 1280, height: 900 } });
+  await page.goto(url, { waitUntil: 'networkidle', timeout: 30000 });
+  const sel = '#grid .card, #grid a.card, [data-card]';
+  const before = await page.$$eval(sel, els => els.length).catch(()=>0);
+  await page.fill('#searchInput', q);           // type into the REAL in-page search
+  await page.waitForTimeout(1300);              // debounce + re-render
+  const after = await page.$$eval(sel, els => els.length).catch(()=>0);
+  const stat = await page.$eval('#statLine', el=>el.textContent).catch(()=> '');
+  console.log('url:', url, '| query:', q, '| cards before:', before, '| after:', after, '| statLine:', stat.trim());
+  await page.screenshot({ path: out, fullPage: false });
+  console.log('screenshot:', out);
+  await b.close();
+})().catch(e => { console.error('ERR', e.message); process.exit(1); });
diff --git a/cap_search3.cjs b/cap_search3.cjs
new file mode 100644
index 0000000..627e7b1
--- /dev/null
+++ b/cap_search3.cjs
@@ -0,0 +1,31 @@
+const { chromium } = require('playwright');
+(async () => {
+  const url = process.argv[2] || 'https://corkwallcovering.com/';
+  const q = process.argv[3] || 'grasscloth';
+  const out = process.argv[4] || '/tmp/search-grid.png';
+  const b = await chromium.launch();
+  const page = await b.newPage({ viewport: { width: 1280, height: 1000 } });
+  const errs = [];
+  page.on('console', m => { if (m.type()==='error') errs.push(m.text()); });
+  page.on('pageerror', e => errs.push('PAGEERR '+e.message));
+  await page.goto(url, { waitUntil: 'networkidle', timeout: 30000 });
+  const titles = async () => page.$$eval('#grid a.card, #grid .card, [data-card]', els => els.slice(0,5).map(e => (e.textContent||'').replace(/\s+/g,' ').trim().slice(0,40)));
+  const before = await titles().catch(()=>[]);
+  // find the search box (in-page or corner-nav)
+  const hasIn = await page.$('#searchInput');
+  await page.fill('#searchInput', q);
+  await page.waitForTimeout(1500);
+  const after = await titles().catch(()=>[]);
+  const stat = await page.$eval('#statLine', el=>el.textContent).catch(()=> '');
+  console.log('URL', url, 'Q', q);
+  console.log('BEFORE cards:', JSON.stringify(before));
+  console.log('AFTER  cards:', JSON.stringify(after));
+  console.log('statLine:', stat.trim());
+  console.log('changed:', JSON.stringify(before)!==JSON.stringify(after));
+  console.log('console errors:', errs.slice(0,5));
+  await page.evaluate(()=>{ const g=document.querySelector('#grid'); if(g) g.scrollIntoView(); });
+  await page.waitForTimeout(400);
+  await page.screenshot({ path: out });
+  console.log('shot', out);
+  await b.close();
+})().catch(e => { console.error('ERR', e.message); process.exit(1); });
diff --git a/cap_webkit.cjs b/cap_webkit.cjs
new file mode 100644
index 0000000..f8370fa
--- /dev/null
+++ b/cap_webkit.cjs
@@ -0,0 +1,29 @@
+const { webkit, devices } = require('playwright');
+(async () => {
+  const url = process.argv[2] || 'https://corkwallcovering.com/';
+  const q = process.argv[3] || 'grasscloth';
+  let b;
+  try { b = await webkit.launch(); } catch(e){ console.log('WEBKIT-UNAVAILABLE', e.message.slice(0,120)); process.exit(3); }
+  const ctx = await b.newContext({ ...devices['iPhone 13'] });
+  const page = await ctx.newPage();
+  const errs = [];
+  page.on('console', m => { if (m.type()==='error') errs.push(m.text().slice(0,120)); });
+  page.on('pageerror', e => errs.push('PAGEERR '+e.message.slice(0,120)));
+  await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 }).catch(e=>errs.push('GOTO '+e.message.slice(0,80)));
+  await page.waitForTimeout(2500);
+  const sel = '#grid a.card, #grid .card, [data-card]';
+  const t = async () => page.$$eval(sel, els => els.slice(0,4).map(e=>(e.textContent||'').replace(/\s+/g,' ').trim().slice(0,28))).catch(()=>[]);
+  const vis = await page.isVisible('#searchInput').catch(()=>false);
+  const before = await t();
+  let typed=false;
+  try { await page.click('#searchInput',{timeout:4000}); await page.type('#searchInput', q, {delay:120}); typed=true; } catch(e){ errs.push('TYPE '+e.message.slice(0,70)); }
+  await page.waitForTimeout(1800);
+  const after = await t();
+  const stat = await page.$eval('#statLine', el=>el.textContent).catch(()=>'(none)');
+  console.log('ENGINE: WebKit(iOS Safari) |', url);
+  console.log('searchInput visible:', vis, '| typed:', typed);
+  console.log('grid changed on type:', JSON.stringify(before)!==JSON.stringify(after));
+  console.log('statLine:', String(stat).trim());
+  console.log('console/page errors:', errs.length? errs : 'NONE');
+  await b.close();
+})().catch(e=>{console.error('ERR',e.message);process.exit(1);});

← a453373 auto-save: 2026-07-30T07:45:45 (1 files) — cap_search.cjs  ·  back to Nationalrealestate  ·  auto-save: 2026-07-30T09:16:33 (3 files) — cap_viewport.cjs 1dbfb57 →