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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user