Ask the six optional setup questions after size so each tick can change suggested cards, keeping the answers on the draft and off the published Rule.

This commit is contained in:
adilallo committed 2026-11-05 20:26:07 -07:00
1 parent b4bfa157f8
commit bdaf1818d9
23 files changed
+399 -82

No files matched your search

+22
View File
@@ -69,6 +69,28 @@ describe("createFlowStateSchema", () => {
expect(r.success).toBe(false);
});
it("accepts setup-questions as currentStep and true or false setupTraits", () => {
const r = createFlowStateSchema.safeParse({
currentStep: "setup-questions",
setupTraits: {
network: true,
nonvoters: false,
employer: true,
sponsor: false,
records: false,
risky: true,
},
});
expect(r.success).toBe(true);
});
it("rejects non-boolean setupTraits values", () => {
const r = createFlowStateSchema.safeParse({
setupTraits: { network: "yes" },
});
expect(r.success).toBe(false);
});
it("rejects title that is too long", () => {
const r = createFlowStateSchema.safeParse({ title: "x".repeat(600) });
expect(r.success).toBe(false);