v1.12.0: takeoff & landing phases on the marker #166

Merged
kamilkrzywda merged 3 commits from feat/takeoff-landing-phases into master 2026-09-28 12:15:37 +02:00
2 changed files with 8 additions and 1 deletions
Showing only changes of commit 37bdf902cc - Show all commits
+1
View File
@@ -167,6 +167,7 @@ test('marker shows the takeoff and landing phases on a dispatched leg', async ({
// --- Landing: fast-forward through the cruise to just before the landing window, then drop back
// to OBS so the hold at the destination gate is observable. ---
const landingStart = T_dep + ph.takeoffMs + ph.cruiseMs;
await setScale(page, MID); // fast-forward through takeoff hold + cruise (pure arrival wait)
await expect.poll(async () => {
const body = await getState(page);
const p = body.planes.find((x) => x.id === STARTER)!;
+7 -1
View File
@@ -162,7 +162,13 @@ async function flyHomeViaApi(page: Page): Promise<void> {
// v0.39.0 (ISS-069): wear accumulates across the shared CI DB — restore full health and clear any
// active repair gate from an interrupted run before the steps below act on the starter, so the
// farthest-flyable picker and fuel pins never see a worn or broken plane.
expect((await page.request.post('/api/test/set-health', { data: { planeId: 'plane-starter', health: 100, repairUntilMs: 0 } })).status()).toBe(200);
// ISS-127-style transient: test hooks intermittently 500 under dind load — retry briefly instead of failing.
for (let attempt = 1; ; attempt++) {
const healthRes = await page.request.post('/api/test/set-health', { data: { planeId: 'plane-starter', health: 100, repairUntilMs: 0 } });
if (healthRes.status() === 200) break;
if (attempt >= 3) throw new Error(`/api/test/set-health returned ${healthRes.status()} after 3 attempts`);
await page.waitForTimeout(500);
}
// Fast-forward any leftover leg / repositioning flight (a few seconds real time worst case at 1000×).
await setScale(page, SCALE);
await expect.poll(async () => {