fix: v0.12.2 — ISS-003 route leg lines now follow the curved great-circle path (greatCircleArc, 25 sampled points via sim slerp) instead of a straight two-point chord; e2e asserts >2 coordinates in the routes source

This commit is contained in:
2026-09-18 14:06:38 +00:00
parent 7c51cadef7
commit 79cf5a05e2
6 changed files with 75 additions and 17 deletions
+9 -4
View File
@@ -239,12 +239,17 @@ test('plane markers move while flying, the current leg draws a route line, and t
expect(haversineKm(p1.lat, p1.lon, p2.lat, p2.lon)).toBeGreaterThan(0);
// 4) The route line for this flight exists in the routes source (v0.12.0: one line
// per flying plane's current leg, keyed by planeId).
// per flying plane's current leg, keyed by planeId) and is a CURVED arc — >2
// coordinates along the great circle, not a straight two-point chord (v0.12.2).
await expect
.poll(async () => {
const feats = (await sourceFeatures(page, 'routes')) as Array<{ properties: Record<string, unknown> }>;
return feats.some((f) => f.properties.planeId === 'plane-starter');
}, { timeout: 15_000, message: 'waiting for the route line in the routes source' })
const feats = (await sourceFeatures(page, 'routes')) as Array<{
properties: Record<string, unknown>;
geometry?: { type: string; coordinates: [number, number][] };
}>;
const f = feats.find((x) => x.properties.planeId === 'plane-starter');
return !!f && (f.geometry?.coordinates.length ?? 0) > 2;
}, { timeout: 15_000, message: 'waiting for the curved route line in the routes source' })
.toBe(true);
// 5) Click the flying plane → status popup with model, status, fuel and the leg.