fix(e2e): pass STARTER into evaluate; verify self-heal end state on fresh snapshots
CI / build + unit + e2e (pull_request) Failing after 10m42s
CI / build + unit + e2e (pull_request) Failing after 10m42s
This commit is contained in:
+3
-3
@@ -105,7 +105,7 @@ async function fitToAirports(page: Page, icaos: string[]): Promise<void> {
|
||||
// fetch can be stale by tens of px) and wait for the popup. `flyingOnly` skips grounded frames —
|
||||
// used right after dispatch, when the last rendered frame may predate it.
|
||||
async function clickPlane(page: Page, flyingOnly: boolean): Promise<void> {
|
||||
const pt = await page.evaluate(async (onlyFlying: boolean) => {
|
||||
const pt = await page.evaluate(async ({ onlyFlying, starterId }: { onlyFlying: boolean; starterId: string }) => {
|
||||
const m = (window as any).__flightMap;
|
||||
if (!m) return null;
|
||||
const deadline = Date.now() + 10_000;
|
||||
@@ -116,7 +116,7 @@ async function clickPlane(page: Page, flyingOnly: boolean): Promise<void> {
|
||||
} catch {
|
||||
// map not ready yet — keep polling
|
||||
}
|
||||
const f = feats.find((x) => x.properties?.id === STARTER && (!onlyFlying || x.properties?.flying === true));
|
||||
const f = feats.find((x) => x.properties?.id === starterId && (!onlyFlying || x.properties?.flying === true));
|
||||
if (f && f.geometry) {
|
||||
const projected = m.project(f.geometry.coordinates);
|
||||
const rect = m.getContainer().getBoundingClientRect();
|
||||
@@ -125,7 +125,7 @@ async function clickPlane(page: Page, flyingOnly: boolean): Promise<void> {
|
||||
if (Date.now() >= deadline) return null;
|
||||
await new Promise((r) => setTimeout(r, 100));
|
||||
}
|
||||
}, flyingOnly);
|
||||
}, { onlyFlying: flyingOnly, starterId: STARTER });
|
||||
expect(pt, 'plane marker not rendered').not.toBeNull();
|
||||
|
||||
// Popups are created per click and never auto-close — remove any stale ones so the testids below
|
||||
|
||||
Reference in New Issue
Block a user