Follow the catalogue rather than a star it used to rank fourth
The scheduled refresh on 24 August took the star catalogue from 68 388 rows to 447 410 and from 820 kB to 5.4 MB. No branch in the seven-PR chain had ever seen it -- they were all cut before -- so nothing tested the combination until the chain landed on main. Two things broke there. The neighbour ring named Barnard's Star, and the spec clicked it by name. The refresh is a Gaia DR3 merge that carries the same physical star twice: Proxima Centauri at 1.296 pc and Gaia DR3 5853498713190525696 at 1.302 pc are one star, as are Barnard's Star at 1.824 and Gaia DR3 4472832130942575872 at 1.828. The extra row pushed Barnard's from fourth-nearest to fifth, off a ring that shows four. The ring is doing exactly what it says; the spec was asserting the catalogue's contents. It now reads whichever star the ring names and follows that one, so the next refresh cannot demote it. Four other assertions were timing out at Playwright's default five seconds -- not because anything was wrong, but because every one of these tests boots that catalogue and the suite boots several at once on a software rasterizer. The heavy waits already carried explicit longer timeouts; the default now matches. Capping the worker count would have worked too, and would have cost every run the time whether or not the machine needed it. npm test 607/607, npx playwright test 16/16 at the default worker count. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014fcUfL82nvyh9VebX1Fz6w
This commit is contained in:
@@ -17,16 +17,23 @@ test.describe('Neighbour jump', () => {
|
||||
await expect(readout).toHaveText('Sol', { timeout: 30_000 });
|
||||
|
||||
// Its nearest neighbours are named around the edge of the view; each is a button that flies
|
||||
// there. Barnard's Star rather than the Alpha Centauri trio, whose three members share one
|
||||
// bearing and so are decluttered down to whichever the label pass reaches first.
|
||||
const neighbour = page.getByRole('button', { name: /Barnard's Star/ });
|
||||
// there. Whichever one the ring names, not a star named here: the catalogue is refreshed on
|
||||
// a schedule, and a refresh reorders which four are nearest — a hand-picked name made this a
|
||||
// test of the catalogue's contents rather than of the ring. Which of them survives the
|
||||
// declutter is a property of the view, so the first is as good as any.
|
||||
const neighbour = page.getByRole('button', { name: /^Go to .+ pc away$/ }).first();
|
||||
await expect(neighbour).toBeVisible({ timeout: 30_000 });
|
||||
await neighbour.click();
|
||||
const label = (await neighbour.getAttribute('aria-label'))!;
|
||||
const name = /^Go to (.+), [\d.]+ pc away$/.exec(label)![1];
|
||||
|
||||
await expect(readout).toHaveText("Barnard's Star", { timeout: 45_000 });
|
||||
// Clicked by the name just read rather than through `neighbour`, which re-resolves `.first()`
|
||||
// and could land on a different star if the label pass reorders the ring in between.
|
||||
await page.getByRole('button', { name: label, exact: true }).click();
|
||||
|
||||
await expect(readout).toHaveText(name, { timeout: 45_000 });
|
||||
// And from there the walk goes on: the new system names its own neighbours. Which ones is
|
||||
// not asserted — several of Barnard's nearest share a bearing, so which of them survives
|
||||
// the declutter is a property of the view, not a fact about the catalogue.
|
||||
// not asserted — neighbours sharing a bearing are decluttered, so which of them survives is
|
||||
// a property of the view, not a fact about the catalogue.
|
||||
await expect(page.locator('.map-label--ghost')).not.toHaveCount(0, { timeout: 30_000 });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user