openvibers/openvibe.host Commits

Browser check: 320px wide by default too (six sites' home pages scrolled sideways on small phones without the check noticing) (#127)

OP OpenVibers committed 27 days ago · c5f221b467 · 2 files, +6 −4

Changes

ddiff --git a/scripts/browser-check.js b/scripts/browser-check.js
iindex aef1c1d..b078c44 100644
---- a/scripts/browser-check.js
++++ b/scripts/browser-check.js
@@@ -2,12 +2,12 @@
'use strict';
/**
* Browser and no-JS check of every public OpenVibe product (roadmap WS-Q task 3; WS-T tasks 3 and 4), with
-- * openvibe-shared/browser-harness: per route × width (390, 768, 1280) status, console errors, horizontal
++ * openvibe-shared/browser-harness: per route × width (320, 390, 768, 1280) status, console errors, horizontal
* overflow and duplicate scripts; per route without JavaScript visible text, canonical and JSON-LD against the
* visible text; axe-core (serious/critical fail); per site a repeated-navigation growth check and idle activity.
*
* node scripts/browser-check.js [--sites live,https://openvibe.wiki] [--routes-file routes.json] [--max-routes 7]
-- * [--widths 390,768,1280] [--no-axe] [--no-nav] [--laps 5] [--strict-errors]
++ * [--widths 320,390,768,1280] [--no-axe] [--no-nav] [--laps 5] [--strict-errors]
* [--json] [--out docs/browser-check.md] [--remote <ssh-host>] [--harness <browser-harness.js>]
*
* Sites: --sites takes registry ids or origins; without it, every service in OpenVibe.Network's registry with a
@@@ -293,7 +293,9 @@ async function networkDown(h) {
(async () => {
const { h, file: harnessFile } = loadHarness();
if (has('network-down')) return networkDown(h);
-- const widths = arg('widths') ? arg('widths').split(',').map(Number) : h.WIDTHS;
++ // 320px too (small Android phones, the first iPhone SE): the harness's default starts at 390, and six sites' home
++ // pages scrolled sideways at 320 until 2026-10-17 without this check noticing.
++ const widths = arg('widths') ? arg('widths').split(',').map(Number) : [320, ...h.WIDTHS.filter((w) => w !== 320)];
const meta = { at: new Date().toISOString(), runner: 'local', widths, axe: has('no-axe') ? 'off' : `axe-core ${h.AXE.version}, WCAG 2.1 A/AA`, nav: has('no-nav') ? 'off' : `${Number(arg('laps') || 5)} laps` };
let reports, code;
if (arg('remote')) {
ddiff --git a/test/browser-check.test.js b/test/browser-check.test.js
iindex 1135e9d..a6228ca 100644
---- a/test/browser-check.test.js
++++ b/test/browser-check.test.js
@@@ -78,7 +78,7 @@ runTests([
assert.deepStrictEqual(c[1].routes, ['/', { path: '/__ovcheck-404', status: 404 }], 'no sitemap: home and the probe');
assert.deepStrictEqual(c[2].routes, ['/policy'], 'billing: its policy page only');
assert.strictEqual(c[0].base, `http://good.localhost:${port}`);
-- assert.deepStrictEqual(c[0].widths, [390, 768, 1280]);
++ assert.deepStrictEqual(c[0].widths, [320, 390, 768, 1280], 'phones down to 320px');
assert.deepStrictEqual(c[0].checks, { axe: true, navigation: true });
assert.strictEqual(c[0].laps, 5);
assert.ok(c[0].ignore.includes('signed-out session probe answered 401'));