Files
gods-eye-view/src/tooling/mapillaryQa.test.mjs
T
Said TurkseverandClaude Fable 5.1 547b706f67 refactor(mapillary): remove the plain-English query feature
Street Level is imagery only from here on: coverage, sequences and the
embedded viewer. The Claude planner, map-feature and traffic-sign tiles,
the NDJSON feature stream, sprites, detection outlines and analyst records
go, along with @anthropic-ai/sdk, zod and the Anthropic key entry.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-25 18:08:43 +01:00

42 lines
1.1 KiB
JavaScript

import assert from 'node:assert/strict';
import fs from 'node:fs';
import test from 'node:test';
import {
isCollapsed,
RAIL_ORDER,
VIEWPORTS,
} from '../../scripts/qa-mapillary.mjs';
test('the QA harness exercises both review viewports', () => {
assert.deepEqual(
VIEWPORTS.map((v) => `${v.width}x${v.height}`),
['1440x900', '1280x800'],
);
});
test('rail order puts Street Level between CCTV and Context', () => {
assert.deepEqual(RAIL_ORDER, [
'pp-toggles',
'cctv-panel',
'weather-panel',
'recent-imagery-panel',
'mapillary-panel',
'global-context-panel',
]);
assert.equal(isCollapsed(['panel-collapsible', 'collapsed']), true);
assert.equal(isCollapsed(['panel-collapsible']), false);
});
test('the harness only runs its browser flow when executed directly', () => {
const source = fs.readFileSync(
new URL('../../scripts/qa-mapillary.mjs', import.meta.url),
'utf8',
);
assert.match(
source,
/import\.meta\.url === pathToFileURL\(process\.argv\[1\]\)\.href/,
);
assert.match(source, /PUPPETEER_EXECUTABLE_PATH/);
assert.match(source, /--url/);
});