Custom add and create flow polish

This commit is contained in:
adilallo
2026-05-08 20:32:24 -06:00
parent 26bcd61ea3
commit 026a1e6d71
68 changed files with 6208 additions and 527 deletions
+20
View File
@@ -0,0 +1,20 @@
import { describe, it, expect, vi } from "vitest";
import { runCompletedStepExit } from "../../app/(app)/create/utils/runCompletedStepExit";
describe("runCompletedStepExit", () => {
it("clears client draft mirrors and navigates home without implying server DELETE", () => {
const clearState = vi.fn();
const clearAnonymousCreateFlowStorage = vi.fn();
const router = { push: vi.fn() };
runCompletedStepExit({
clearState,
clearAnonymousCreateFlowStorage,
router,
});
expect(clearState).toHaveBeenCalledTimes(1);
expect(clearAnonymousCreateFlowStorage).toHaveBeenCalledTimes(1);
expect(router.push).toHaveBeenCalledWith("/");
});
});