test: the boundary stays quiet while reloading for a new build; Back restores Home's whole question

This commit is contained in:
2026-09-19 05:47:17 +02:00
parent 92979fa920
commit 038da5374f
2 changed files with 49 additions and 0 deletions
@@ -575,13 +575,18 @@ describe("Home", () => {
fireEvent.click(screen.getByText("home.budget.short"));
fireEvent.click(screen.getByText("home.hero.reroll"));
expect(await screen.findByText("Rerolled")).toBeTruthy();
const asked = discoverPick.mock.lastCall;
first.unmount();
discover.mockClear();
discoverPick.mockClear();
mount();
expect(await screen.findByText("Rerolled")).toBeTruthy();
expect(discover).toHaveBeenLastCalledWith("short", 0);
// The very same question — seed, the cards already seen and the press count all came back, not
// just the budget: the server answers each of them differently.
await waitFor(() => expect(discoverPick.mock.lastCall).toEqual(asked));
});
// Measured in the browser (2026-09-07), before the fix: the palette's "Meglepetés" arrived at Home