mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Complete phase 3 W1 acceptance and close T16 findings
Fix Navara model display tint, overlay ordering, follow gestures and resource cleanup. Reduce repeated aircraft work and correct fixture enrichment responses. Strengthen dev/preview QA, preserve failure history and document verified W1 results. Validation: 7171 ordinary tests pass, one Windows-only skip; 15 allocation probes; 37 W1 acceptance steps; contracts, shell, four performance gates; 18 identical Cesium baseline PNGs. Known pre-existing CCTV and live-source limits are recorded.
This commit is contained in:
1 parent
766c786093
commit
0600964249
59 files changed
+2334
-701
No files matched your search
@@ -82,6 +82,36 @@ for (const [name, files, pattern] of [
|
||||
},
|
||||
/reaches browser globals/,
|
||||
],
|
||||
[
|
||||
'W1 shared focusDeemphasis keeps native imports in render',
|
||||
{ 'src/data/focusDeemphasis.js': "import 'cesium';" },
|
||||
/cesium only in the layer's render/,
|
||||
],
|
||||
[
|
||||
'W1 shared trailRenderer keeps native imports in render',
|
||||
{ 'src/data/trailRenderer.js': "import 'cesium';" },
|
||||
/cesium only in the layer's render/,
|
||||
],
|
||||
[
|
||||
'W1 shared contactTrailRenderer keeps native imports in render',
|
||||
{ 'src/data/contactTrailRenderer.js': "import 'cesium';" },
|
||||
/cesium only in the layer's render/,
|
||||
],
|
||||
[
|
||||
'W1 shared iconOrientation keeps native imports in render',
|
||||
{ 'src/data/iconOrientation.js': "import 'cesium';" },
|
||||
/cesium only in the layer's render/,
|
||||
],
|
||||
[
|
||||
'W1 shared modelVisualAnchor keeps native imports in render',
|
||||
{ 'src/data/modelVisualAnchor.js': "import 'cesium';" },
|
||||
/cesium only in the layer's render/,
|
||||
],
|
||||
[
|
||||
'W1 shared trackingClickGesture keeps native imports in render',
|
||||
{ 'src/data/trackingClickGesture.js': "import 'cesium';" },
|
||||
/cesium only in the layer's render/,
|
||||
],
|
||||
[
|
||||
'geo module imports cesium',
|
||||
{ 'src/geo/demo.js': "import 'cesium';" },
|
||||
|
||||
@@ -19,7 +19,10 @@ import {
|
||||
photoImages,
|
||||
THUMB_HOST,
|
||||
} from '../../scripts/fixtures/street-level/mapillaryGraph.mjs';
|
||||
import { redact } from '../../scripts/qa-browserEvidence.mjs';
|
||||
import {
|
||||
redact,
|
||||
isExpectedPreviewSetupError,
|
||||
} from '../../scripts/qa-browserEvidence.mjs';
|
||||
|
||||
// The press helpers wait for paint; Node has no frames, so a tick stands in.
|
||||
globalThis.requestAnimationFrame ??= (callback) =>
|
||||
@@ -639,3 +642,41 @@ test('CI runs the gates hermetically against a production build, strict, with ev
|
||||
'a missed header press fails CI now that the rail settles',
|
||||
);
|
||||
});
|
||||
|
||||
test('preview setup API 404 is expected only with explicit preview mode', () => {
|
||||
const message = {
|
||||
type: () => 'error',
|
||||
text: () =>
|
||||
'Failed to load resource: the server responded with a status of 404 (Not Found)',
|
||||
location: () => ({ url: 'http://127.0.0.1:4195/api/setup/status' }),
|
||||
};
|
||||
const options = { preview: true, baseUrl: 'http://127.0.0.1:4195/' };
|
||||
assert.equal(isExpectedPreviewSetupError(message, options), true);
|
||||
assert.equal(
|
||||
isExpectedPreviewSetupError(message, { ...options, preview: false }),
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
test('preview mode never waives other errors, origins, paths or missing locations', () => {
|
||||
const options = { preview: true, baseUrl: 'http://127.0.0.1:4195/' };
|
||||
for (const [text, url] of [
|
||||
['Failed to load resource: 404', 'http://127.0.0.1:4195/api/flights'],
|
||||
['Failed to load resource: 404', 'https://example.com/api/setup/status'],
|
||||
['Failed to load resource: 500', 'http://127.0.0.1:4195/api/setup/status'],
|
||||
['Unhandled TypeError: 404', 'http://127.0.0.1:4195/api/setup/status'],
|
||||
['Failed to load resource: 404', undefined],
|
||||
]) {
|
||||
assert.equal(
|
||||
isExpectedPreviewSetupError(
|
||||
{
|
||||
type: () => 'error',
|
||||
text: () => text,
|
||||
location: () => ({ url }),
|
||||
},
|
||||
options,
|
||||
),
|
||||
false,
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,60 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { watchW1Page } from '../../scripts/qa-browserEvidence.mjs';
|
||||
const baseUrl = 'http://127.0.0.1:4195/';
|
||||
const message = (type, text, url) => ({
|
||||
type: () => type,
|
||||
text: () => text,
|
||||
location: () => ({ url }),
|
||||
});
|
||||
test('W1 main and share pages aggregate console, runtime and crash errors', () => {
|
||||
const report = {},
|
||||
main = new EventEmitter(),
|
||||
shared = new EventEmitter();
|
||||
watchW1Page(main, report, { name: 'main', baseUrl });
|
||||
watchW1Page(shared, report, { name: 'share', baseUrl });
|
||||
main.emit('console', message('warning', 'ordinary warning', baseUrl));
|
||||
shared.emit(
|
||||
'console',
|
||||
message('error', 'late error', baseUrl + 'api/x?key=sample-secret'),
|
||||
);
|
||||
shared.emit('pageerror', new Error('runtime failure'));
|
||||
shared.emit('error', new Error('renderer crashed'));
|
||||
assert.deepEqual(report.runtimePages, ['main', 'share']);
|
||||
assert.equal(report.browserErrors.length, 3);
|
||||
assert.match(report.browserErrors[0], /\[share\] late error/);
|
||||
assert.ok(!JSON.stringify(report).includes('sample-secret'));
|
||||
});
|
||||
test('W1 preview exception stays exact on a share page', () => {
|
||||
const report = {},
|
||||
shared = new EventEmitter();
|
||||
watchW1Page(shared, report, { name: 'share', baseUrl, preview: true });
|
||||
const failure = (url) =>
|
||||
shared.emit(
|
||||
'console',
|
||||
message(
|
||||
'error',
|
||||
'Failed to load resource: the server responded with a status of 404',
|
||||
url,
|
||||
),
|
||||
);
|
||||
failure(baseUrl + 'api/setup/status');
|
||||
failure(baseUrl + 'api/other');
|
||||
failure('https://example.invalid/api/setup/status');
|
||||
assert.deepEqual(report.expectedPreviewErrors, ['/api/setup/status: 404']);
|
||||
assert.equal(report.browserErrors.length, 2);
|
||||
});
|
||||
test('W1 response diagnostics retain page/status/path without query credentials', () => {
|
||||
const report = {},
|
||||
shared = new EventEmitter();
|
||||
watchW1Page(shared, report, { name: 'share', baseUrl });
|
||||
shared.emit('response', {
|
||||
status: () => 503,
|
||||
url: () => baseUrl + 'api/vessels?token=sample-secret',
|
||||
});
|
||||
assert.deepEqual(report.failedResponses, [
|
||||
{ page: 'share', status: 503, resource: baseUrl + 'api/vessels' },
|
||||
]);
|
||||
assert.ok(!JSON.stringify(report).includes('sample-secret'));
|
||||
});
|
||||
Reference in new issue
Block a user