Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

test(web): give closing donation toast enough frames to unmount

Amruth Pillaie8b6eeccdf50
diff --git a/apps/web/src/components/ui/donation-toast.test.tsx b/apps/web/src/components/ui/donation-toast.test.tsx
index 53dff61ed..528cab437 100644
--- a/apps/web/src/components/ui/donation-toast.test.tsx
+++ b/apps/web/src/components/ui/donation-toast.test.tsx
@@ -37,7 +37,8 @@ it("hides an existing donation toast when launch starts without recording a dism
expect(screen.getByText("Please support the project")).toBeVisible();
await act(() => vi.advanceTimersByTimeAsync(60_000));
- await act(() => vi.advanceTimersByTimeAsync(20));
+ // Base UI unmounts a closing toast a few animation frames later; leave room for them whatever the clock phase.
+ await act(() => vi.advanceTimersByTimeAsync(100));
expect(screen.queryByText("Please support the project")).not.toBeInTheDocument();
expect(Cookies.get(DISMISSED_COOKIE)).toBeUndefined();