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)
Changes
@@@ -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')) {@@@ -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'));
@@ -2,12 +2,12 @@
@@ -2,12 +2,12 @@
'use strict';
'use strict';
/**
/**
* Browser and no-JS check of every public OpenVibe product (roadmap WS-Q task 3; WS-T tasks 3 and 4), with
* 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
* 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.
* 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]
* 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>]
* [--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
* 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) {
@@ -293,7 +293,9 @@ async function networkDown(h) {
(async () => {
(async () => {
const { h, file: harnessFile } = loadHarness();
const { h, file: harnessFile } = loadHarness();
if (has('network-down')) return networkDown(h);
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` };
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;
let reports, code;
if (arg('remote')) {
if (arg('remote')) {
@@ -78,7 +78,7 @@ runTests([
@@ -78,7 +78,7 @@ runTests([
assert.deepStrictEqual(c[1].routes, ['/', { path: '/__ovcheck-404', status: 404 }], 'no sitemap: home and the probe');
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.deepStrictEqual(c[2].routes, ['/policy'], 'billing: its policy page only');
assert.strictEqual(c[0].base, `http://good.localhost:${port}`);
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.deepStrictEqual(c[0].checks, { axe: true, navigation: true });
assert.strictEqual(c[0].laps, 5);
assert.strictEqual(c[0].laps, 5);
assert.ok(c[0].ignore.includes('signed-out session probe answered 401'));
assert.ok(c[0].ignore.includes('signed-out session probe answered 401'));