mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
Frame the port-drawn gizmo in the CCTV QA drag fixture and share the catalog-pair reader
The drag-fixture framing looked the gizmo up in viewer.entities, which main no longer populates, so it did nothing and five drag checks stayed inconclusive. It now reads the arrow from the layer's drawn state and records the framed shaft length as a check. Tarktee and Lithuania read their two catalogs through one helper, readCatalogsTogether, so both get the shared deadline, sibling abort and the release of a response that arrives after the other feed failed. An Ontario error response has its body released, and tests pin the refused redirect and system-code log labels.
This commit is contained in:
1 parent
bdd92663d6
commit
75f1a3c181
9 files changed
+160
-92
No files matched your search
@@ -148,6 +148,7 @@
|
||||
"server/providers/cctv/groundHeights.js",
|
||||
"server/providers/cctv/catalog.js",
|
||||
"server/providers/cctv/lithuania.js",
|
||||
"server/providers/cctv/catalogPair.js",
|
||||
"src/data/cctvLithuania.test.mjs",
|
||||
"server/providers/cctv/taiwan.js",
|
||||
"src/data/cctvTaiwan.test.mjs",
|
||||
|
||||
@@ -563,6 +563,7 @@
|
||||
"server/providers/cctv/groundHeights.js",
|
||||
"server/providers/cctv/catalog.js",
|
||||
"server/providers/cctv/lithuania.js",
|
||||
"server/providers/cctv/catalogPair.js",
|
||||
"server/providers/cctv/taiwan.js",
|
||||
"server/providers/cctv/quebec.js",
|
||||
"server/providers/cctv/ottawa.js",
|
||||
|
||||
+18
-9
@@ -1792,31 +1792,40 @@ async function main() {
|
||||
|
||||
// Frame the actual gizmo for the drag fixture. Default autofocus can leave
|
||||
// its shaft below the 10px interaction threshold; that distant view is not
|
||||
// the drag-usability scenario this regression exercises.
|
||||
// the drag-usability scenario this regression exercises. The gizmo is drawn
|
||||
// through the renderer ports, so its arrow is read from the layer's drawn
|
||||
// state (plain {x,y,z} points), not from viewer.entities.
|
||||
const dragFraming = await page.evaluate(async () => {
|
||||
const viewer = window.__godsEyeView.viewer;
|
||||
const e = viewer.entities.getById('cctv-gizmo-move-east');
|
||||
if (!e) return null;
|
||||
const pts = e.polyline.positions.getValue(viewer.clock.currentTime);
|
||||
const target = pts?.[0];
|
||||
if (!target) return null;
|
||||
const mod = window.__godsEyeView.dataManager.layers.get('cctv').module;
|
||||
const arrow = () =>
|
||||
mod._cctvDrawnForTest().gizmo['cctv-gizmo-move-east']?.positions;
|
||||
if (!arrow()?.length) return null;
|
||||
const Cartesian3 = viewer.camera.positionWC.constructor;
|
||||
const measure = () => {
|
||||
const pts = arrow();
|
||||
if (!pts?.length) return { shaftPx: null, rangeM: null };
|
||||
const a = viewer.scene.cartesianToCanvasCoordinates(pts[0]);
|
||||
const b = viewer.scene.cartesianToCanvasCoordinates(pts[pts.length - 1]);
|
||||
return {
|
||||
shaftPx: a && b ? Math.hypot(b.x - a.x, b.y - a.y) : null,
|
||||
rangeM: target.constructor.distance(viewer.camera.positionWC, target),
|
||||
rangeM: Cartesian3.distance(viewer.camera.positionWC, pts[0]),
|
||||
};
|
||||
};
|
||||
const before = measure();
|
||||
const target = Cartesian3.clone(arrow()[0]);
|
||||
viewer.camera.cancelFlight();
|
||||
viewer.camera.lookAt(target, new target.constructor(0, -200, 180));
|
||||
viewer.camera.lookAt(target, new Cartesian3(0, -200, 180));
|
||||
viewer.camera.lookAtTransform(viewer.camera.transform.constructor.IDENTITY);
|
||||
viewer.scene.requestRender();
|
||||
const frames = await window.__qaRenderFrames(3, 10000);
|
||||
return { before, after: measure(), frames };
|
||||
});
|
||||
console.log('Drag fixture framing:', JSON.stringify(dragFraming));
|
||||
record(
|
||||
'drag fixture frames the east arrow above the 10px grab threshold',
|
||||
dragFraming?.after?.shaftPx >= 10,
|
||||
JSON.stringify(dragFraming),
|
||||
);
|
||||
|
||||
// Synthetic CDP drag on the EAST arrow — the owner's field-test
|
||||
// regression. Sample effective elevation after every mouse move: it must
|
||||
|
||||
Reference in new issue
Block a user