Align DB with create community stage

This commit is contained in:
adilallo
2026-04-15 21:23:48 -06:00
parent 92149d9fb0
commit b15f0d6226
6 changed files with 170 additions and 24 deletions
+23
View File
@@ -78,6 +78,29 @@ describe("createFlowStateSchema", () => {
});
expect(r.success).toBe(false);
});
it("accepts communityStructureChipSnapshots with custom chip rows", () => {
const r = createFlowStateSchema.safeParse({
communityStructureChipSnapshots: {
organizationTypes: [
{ id: "1", label: "Co-op", state: "Selected" },
{ id: "custom-uuid", label: "My type", state: "Selected" },
],
scale: [{ id: "1", label: "Local" }],
maturity: [],
},
});
expect(r.success).toBe(true);
});
it("rejects invalid chip snapshot row types", () => {
const r = createFlowStateSchema.safeParse({
communityStructureChipSnapshots: {
organizationTypes: [{ id: "1", label: 123 }],
},
});
expect(r.success).toBe(false);
});
});
describe("putDraftBodySchema", () => {