From 0ac133f750d71a1d5ea09d7ce320cd9418c429b5 Mon Sep 17 00:00:00 2001 From: Kamil Krzywda Date: Mon, 21 Sep 2026 02:50:10 +0000 Subject: [PATCH] fix(e2e): hook package weight within starter payload (4 t < 4.8 t max) --- e2e/right-pane.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/e2e/right-pane.spec.ts b/e2e/right-pane.spec.ts index 6fbe9d7..2301b96 100644 --- a/e2e/right-pane.spec.ts +++ b/e2e/right-pane.spec.ts @@ -213,11 +213,12 @@ test('open packages render with names, reward and deadline; Load is enabled at a // Deterministic target: a hook-created EDDF package — Load is enabled (starter at origin, free slot). const nearest = await nearestToHub(page); - const pkg = await createPackage(page, HUB, nearest.icao, undefined, 10_000); + const pkg = await createPackage(page, HUB, nearest.icao, undefined, 4_000); const row = page.locator(`li[data-testid="open-package-${pkg.id}"]`); await expect(row, 'the hook-created package appears in the list').toBeVisible({ timeout: 15_000 }); - // ISS-066 (v0.35.0): cargo shows as type + tonnage ("… 10.0t"), not "type × count". - await expect(page.getByTestId(`open-package-cargo-${pkg.id}`)).toContainText('10.0t'); + // ISS-066 (v0.35.0): cargo shows as type + tonnage ("… 4.0t"), not "type × count". + // 4 t is within the starter ATR's 4.8 t maxPayloadKg, so Load stays enabled below. + await expect(page.getByTestId(`open-package-cargo-${pkg.id}`)).toContainText('4.0t'); await expect(page.getByTestId(`open-package-reward-${pkg.id}`)).toContainText(eur(pkg.reward)); const loadBtn = page.getByTestId(`load-${pkg.id}`); await expect(loadBtn).toBeEnabled();