v0.9.11 — fix #35 e2e spec (tab restore + strict mode), test-only #41

Merged
kamilkrzywda merged 1 commits from fix-navai-e2e into master 2026-09-29 17:44:10 +02:00
Showing only changes of commit fdc5624b0c - Show all commits
+5 -2
View File
@@ -417,12 +417,15 @@ test('NAVIGATION AI research unlocks two-hop jumps on the world map (#35)', asyn
expect(target).toBeDefined();
await page.goto('/'); // fresh chart with NAV AI researched — two-hop fields are clickable now
// #27 restores whatever tab a previous step persisted (SKILL TREE after the research above), so
// activate WORLD MAP explicitly before asserting on the chart.
await page.getByRole('tab', { name: 'WORLD MAP' }).click();
await expect(page.getByText(/GALACTIC CHART \/\/ JUMP ROUTES — TURN \d+/)).toBeVisible();
const panel = page.getByRole('tabpanel');
const turnBefore = world.turn;
// The two-hop systems render as distinct chart fields (// JUMP ×2 sublabel), and the target is one of them.
await expect(panel.getByText(/(DISCOVERED|UNKNOWN) \/\/ JUMP ×2/)).toBeVisible();
// The two-hop systems render as distinct chart fields (// JUMP ×2 sublabel) — several at once, so .first().
await expect(panel.getByText(/(DISCOVERED|UNKNOWN) \/\/ JUMP ×2/).first()).toBeVisible();
await panel.getByRole('button', { name: target.name.toUpperCase() }).click();
const after = (await (await page.request.get('/api/world')).json()) as WorldState;