test: the boundary stays quiet while reloading for a new build; Back restores Home's whole question
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user