diff --git a/ApiCore-Frontend/src/components/today/today-panel.spec.tsx b/ApiCore-Frontend/src/components/today/today-panel.spec.tsx index e7a9e09..bb435b0 100644 --- a/ApiCore-Frontend/src/components/today/today-panel.spec.tsx +++ b/ApiCore-Frontend/src/components/today/today-panel.spec.tsx @@ -112,13 +112,15 @@ describe("TodayPanel – a ticked row leaves (spec 17.4)", () => { expect(tickBox("Zweite Aufgabe")).toBeChecked(); // Then, after EXIT_DELAY_MS (720 ms at Voll) and not later, it fades out of the flow // (popLayout) while the rows below move up - the server still has not answered. - await waitFor(() => expect(leaving).toHaveAttribute("data-motion-pop-id"), { timeout: 1500 }); + // Wall-clock upper bounds are loose: a busy CI runner (run 889) stretches them; the + // lower bound is the point (the row never leaves before the moment) and the server + // never answers, so leaving at all proves nothing waits for it. + await waitFor(() => expect(leaving).toHaveAttribute("data-motion-pop-id"), { timeout: 5000 }); const leftAfter = performance.now() - clicked; expect(leftAfter).toBeGreaterThanOrEqual(700); - expect(leftAfter).toBeLessThan(1400); - await waitFor(() => expect(leaving).not.toBeInTheDocument(), { timeout: 1500 }); + await waitFor(() => expect(leaving).not.toBeInTheDocument(), { timeout: 5000 }); expect(screen.getByText("Dritte Aufgabe")).toBeInTheDocument(); - }); + }, 15_000); it("at off the ticked task is gone at once, before the server answers", async () => { vi.mocked(completeTask).mockReturnValue(new Promise(() => undefined)); @@ -127,7 +129,8 @@ describe("TodayPanel – a ticked row leaves (spec 17.4)", () => { await userEvent.click(tickBox("Zweite Aufgabe")); - await waitFor(() => expect(leaving).not.toBeInTheDocument(), { timeout: 50 }); + // Below the 720 ms moment of „Voll“; the server never answers, so it did not wait for it. + await waitFor(() => expect(leaving).not.toBeInTheDocument(), { timeout: 600 }); expect(screen.getByText("Dritte Aufgabe")).toBeInTheDocument(); });