Fix save progress bug

This commit is contained in:
adilallo
2026-05-20 19:58:32 -06:00
parent 2f2b5d0dc2
commit 7ee6282c1a
14 changed files with 193 additions and 88 deletions
@@ -0,0 +1,22 @@
import { describe, expect, it } from "vitest";
import { buildCreateFlowDraftPayload } from "../../lib/create/buildCreateFlowDraftPayload";
describe("buildCreateFlowDraftPayload", () => {
it("merges state with currentStep when provided", () => {
expect(
buildCreateFlowDraftPayload(
{ title: "Oak Street Collective" },
"community-save",
),
).toEqual({
title: "Oak Street Collective",
currentStep: "community-save",
});
});
it("returns state unchanged when currentStep is omitted", () => {
expect(
buildCreateFlowDraftPayload({ title: "Oak Street Collective" }),
).toEqual({ title: "Oak Street Collective" });
});
});