test: complete isometric stage 1 gates

Issue: #89
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-08-13 15:28:19 +03:00
parent 0ef900a3ae
commit 6ea3ebff17
23 changed files with 1331 additions and 564 deletions
+8 -1
View File
@@ -21,6 +21,11 @@ test('golden matrix has stable unique ids and bounded comparison thresholds', ()
assert.equal(Number.isInteger(region.minPixels) && region.minPixels > 0, true, scenario.id);
assert.equal(region.minRedBlueDelta > 0, true, scenario.id);
}
if (scenario.labs) {
assert.deepEqual(scenario.labs, ['iso'], scenario.id);
assert.equal(scenario.projection, 'iso', scenario.id);
assert.equal(scenario.mode, 'view', scenario.id);
}
if (scenario.sunRayPixels) {
assert.equal(Number.isInteger(scenario.sunRayPixels.minPixels)
&& scenario.sunRayPixels.minPixels > 0, true, scenario.id);
@@ -64,7 +69,9 @@ test('golden matrix covers required geometry, rendering and adaptive surfaces',
'fill-light', 'fill-temp', 'fill-lqi', 'lighting', 'hover', 'zoom-040', 'zoom-250',
'warm-remount', 'dialog-mobile', 'color-popover', 'tray-wide', 'tray-medium', 'sun-window',
'tray-narrow', 'opaque-glow-two-doorways', 'filled-tunnel', 'opening-placement',
'backup-full', 'backup-space', 'value-badge-positions'])
'backup-full', 'backup-space', 'value-badge-positions', 'isometric-geometry',
'isometric-live-layers', 'isometric-no-borders', 'isometric-touch-kiosk',
'isometric-large-warm-remount'])
assert.equal(ids.includes(token), true, token);
assert.equal(new Set(GOLDEN_SCENARIOS.map((scenario) => scenario.mode)).has('plan'), true);
assert.equal(new Set(GOLDEN_SCENARIOS.map((scenario) => scenario.mode)).has('devices'), true);
+7 -1
View File
@@ -2,6 +2,7 @@ import test from 'node:test';
import assert from 'node:assert/strict';
import {
LABS_FLAGS, hashSpace, liveLabsFlags, parseVersionCore, resolveLabs, validLabsFlag,
validLabsRegistry,
} from '../test-build/labs.js';
const resolve = (search = '', hash = '', storage = null, version = '1.62.0') =>
@@ -15,6 +16,12 @@ test('registry metadata and numeric-core lifetime fail closed', () => {
assert.equal(liveLabsFlags('1.65.0').has('iso'), false);
assert.equal(liveLabsFlags('not-a-version').size, 0);
assert.equal(validLabsFlag({ ...LABS_FLAGS[0], since: '1.65.0' }), false);
assert.equal(validLabsRegistry([LABS_FLAGS[0], { ...LABS_FLAGS[0] }]), false);
assert.equal(liveLabsFlags('1.62.0', [LABS_FLAGS[0], { ...LABS_FLAGS[0] }]).size, 0);
assert.deepEqual(resolveLabs(
{ search: '?hp-labs=iso', hash: '' }, '["iso"]', '1.62.0',
[LABS_FLAGS[0], { ...LABS_FLAGS[0] }],
).active, []);
});
test('URL operations are ordered query then hash with off and removal semantics', () => {
@@ -48,4 +55,3 @@ test('malformed and unavailable storage are safe', () => {
assert.deepEqual(resolve('', '', '{bad').active, []);
assert.deepEqual(resolve('?hp-labs=iso', '', undefined).active, ['iso']);
});