Show leg distance in km on job list and on-board contracts (ISS-095, v0.48.0)
CI / build + unit + e2e (pull_request) Successful in 10m21s
CI / build + unit + e2e (pull_request) Successful in 10m21s
This commit is contained in:
@@ -197,6 +197,8 @@ test('full core loop via UI: load → fly to destination → exact reward + rep
|
||||
await expect(onboardRow, 'loaded package appears in the on-board list').toBeVisible();
|
||||
// ISS-081 (v0.40.0): the on-board route shows ICAO tags, not full airport names.
|
||||
await expect(page.getByTestId(`onboard-route-${pkg.id}`)).toContainText(`${HUB} → ${nearest.icao}`);
|
||||
// v0.48.0 (ISS-095): leg distance on the on-board line, right after the route — integer km.
|
||||
await expect(page.getByTestId(`onboard-distance-${pkg.id}`)).toHaveText(/^\d+km$/);
|
||||
|
||||
// FLY via the UI: click the fly-to button in the on-board list (ISS-081: ICAO label).
|
||||
const flyBtn = page.getByTestId(`fly-to-${pkg.id}`);
|
||||
|
||||
@@ -210,6 +210,8 @@ test('open packages render with names, reward and deadline; Load is enabled at a
|
||||
await expect(rows.first(), 'an open package row appears').toBeVisible({ timeout: 15_000 });
|
||||
await expect(rows.first()).toContainText(/→/);
|
||||
await expect(page.locator('[data-testid^="open-package-reward-"]').first()).toContainText('€');
|
||||
// v0.48.0 (ISS-095): leg distance on the job row — integer km, no space before "km".
|
||||
await expect(page.locator('[data-testid^="open-package-distance-"]').first()).toHaveText(/^\d+km$/);
|
||||
|
||||
// Deterministic target: a hook-created EDDF package — Load is enabled (starter at origin, free slot).
|
||||
const nearest = await nearestToHub(page);
|
||||
@@ -220,6 +222,8 @@ test('open packages render with names, reward and deadline; Load is enabled at a
|
||||
// 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));
|
||||
// v0.48.0 (ISS-095): the hook-created package's row shows its leg distance too.
|
||||
await expect(page.getByTestId(`open-package-distance-${pkg.id}`)).toHaveText(/^\d+km$/);
|
||||
const loadBtn = page.getByTestId(`load-${pkg.id}`);
|
||||
await expect(loadBtn).toBeEnabled();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user