v1.11.0: hide open-package rows with no grounded plane at the origin (ISS-159)
CI / build + unit + e2e (pull_request) Successful in 5m25s
CI / build + unit + e2e (pull_request) Successful in 5m25s
This commit is contained in:
@@ -270,6 +270,26 @@ test('open jobs only appear where a plane can take them — foreign-origin jobs
|
||||
await expect(page.locator(`li[data-testid="open-package-${pkg.id}"]`)).toHaveCount(0, { timeout: 15_000 });
|
||||
});
|
||||
|
||||
test('jobs at an airport with no grounded plane stay hidden while a plane is still en route (ISS-159)', async ({ page }) => {
|
||||
test.setTimeout(300_000); // self-heal can take minutes after an interrupted run
|
||||
await flyHomeViaApi(page); // starter grounded at EDDF
|
||||
|
||||
const nearest = await nearestToHub(page);
|
||||
// Dispatch the only plane toward `nearest` — while airborne its DESTINATION joins the pool (v0.65.0), so a job there
|
||||
// reaches /api/state, but no GROUNDED plane sits at that airport yet: ISS-159 hides it until landing.
|
||||
const flyRes = await page.request.post('/api/planes/plane-starter/fly', { data: { destIcao: nearest.icao } });
|
||||
expect(flyRes.status()).toBe(200);
|
||||
|
||||
const pkg = await createPackage(page, nearest.icao, HUB);
|
||||
// The server keeps the job (its origin is in the pool)…
|
||||
await expect.poll(async () => (await getState(page)).packages.some((p) => p.id === pkg.id), { timeout: 15_000 }).toBe(true);
|
||||
|
||||
await page.goto('/');
|
||||
// …but no row renders while the plane is still en route — no grounded plane at its origin. No landing wait needed;
|
||||
// the next test's flyHomeViaApi self-heal finishes this leg.
|
||||
await expect(page.locator(`li[data-testid="open-package-${pkg.id}"]`)).toHaveCount(0, { timeout: 15_000 });
|
||||
});
|
||||
|
||||
test('on-board list: fly-to-destination + abandon with penalty preview; flying planes show their leg', async ({ page }) => {
|
||||
test.setTimeout(240_000); // one short flight at scale 1000 (seconds of real time) plus UI steps
|
||||
await flyHomeViaApi(page);
|
||||
|
||||
Reference in New Issue
Block a user