Skip to content

Commit bc38c4a

Browse files
committed
test(e2e): move the beacon-only-machine coverage onto the science block
lab-vatbrain drove a synthetic research recipe that no longer exists, so it had stopped running: a skip, not a pass. Its assertions are still worth keeping — a machine with no module slots must still reach the picker, must offer no palette of its own, and must surface beacon-carried modules only after a beacon is added. The science block is the surviving surface for all of that, so they move to its spec rather than being rewritten around another recipe row.
1 parent 78c6fdc commit bc38c4a

2 files changed

Lines changed: 14 additions & 80 deletions

File tree

app/e2e/mut/lab-vatbrain.e2e.ts

Lines changed: 0 additions & 76 deletions
This file was deleted.

app/e2e/mut/science-block.e2e.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import { activeProjectDbFile, goto } from "./helpers";
66
* The science-consumer block, driven through the UI.
77
*
88
* Everything here is reachable only through real interaction: the singleton
9-
* button that disables itself, the per-pack rate inputs, and the technology
10-
* helper that writes into them. Server-level tests cover the arithmetic and can
11-
* see none of it.
9+
* button that disables itself, the per-pack rate inputs, the technology helper
10+
* that writes into them, and the module picker on a machine with no module slots
11+
* of its own. Server-level tests cover the arithmetic and can see none of it,
12+
* which is how a dead button shipped.
1213
*
1314
* Skips when the project has no labs, since they arrive only with a data sync on
1415
* a build that imports them.
@@ -93,12 +94,21 @@ test("creating a science block, typing rates, and deriving them from a technolog
9394
const picker = page.getByRole("dialog");
9495
await expect(picker.getByRole("heading")).toContainText("Modules —");
9596

97+
// A lab with no slots holds nothing itself, so there must be no palette under
98+
// it: offering beacon-only modules there would read as "put one in the lab".
99+
// The chip is reachable anyway, because a beacon is such a lab's ONE possible
100+
// modifier — a slots-based gate closed that path and shipped a dead button.
101+
const slotless = await picker.getByText("No module slots").isVisible();
102+
if (slotless) await expect(picker.getByTitle(/click: add/)).toHaveCount(0);
103+
96104
const addBeacon = picker.getByRole("button", { name: "+ Add" });
97105
const noBeacons = (await addBeacon.getAttribute("aria-disabled")) === "true";
98106
test.skip(noBeacons, "no beacon can reach this lab in this project's data");
99107

100108
await addBeacon.click();
101-
// the first module the beacon can carry — whatever the mod set calls it
109+
// Only NOW can a module appear — inside the beacon, the one place it can go.
110+
// Whatever the mod set calls it: the lab's allowed categories decide.
111+
await expect(picker.getByTitle(/click: add/).first()).toBeVisible();
102112
await picker.getByTitle(/click: add/).first().click();
103113
await expect(picker.getByText(/%\s*(productivity|speed)/).first()).toBeVisible();
104114

0 commit comments

Comments
 (0)