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

+14 -1
View File
@@ -69,6 +69,14 @@ describe("flowSteps", () => {
expect(getNextStep("community-context")).toBe("community-size");
});
it("places setup-questions after community-size and before the logo upload", () => {
expect(getStepIndex("setup-questions")).toBe(5);
expect(getNextStep("community-size")).toBe("setup-questions");
expect(getNextStep("setup-questions")).toBe("community-upload");
expect(getPreviousStep("community-upload")).toBe("setup-questions");
expect(getPreviousStep("setup-questions")).toBe("community-size");
});
it("skipCommunitySave bridges upload → review and review → upload", () => {
const opts = { skipCommunitySave: true } as const;
expect(getNextStep("community-upload", opts)).toBe("review");
@@ -77,7 +85,8 @@ describe("flowSteps", () => {
it("skipCommunitySave does not change steps outside the save segment", () => {
const opts = { skipCommunitySave: true } as const;
expect(getNextStep("community-size", opts)).toBe("community-upload");
expect(getNextStep("community-size", opts)).toBe("setup-questions");
expect(getNextStep("setup-questions", opts)).toBe("community-upload");
expect(getNextStep("review", opts)).toBe("core-values");
expect(getPreviousStep("communication-methods", opts)).toBe("core-values");
});
@@ -86,6 +95,8 @@ describe("flowSteps", () => {
const opts = { useWithoutChangesIdentityOnly: true } as const;
expect(getNextStep("community-name", opts)).toBe("community-context");
expect(getNextStep("community-context", opts)).toBe("community-upload");
expect(getNextStep("community-size", opts)).toBe("community-upload");
expect(getNextStep("setup-questions", opts)).toBe("community-upload");
expect(getNextStep("community-upload", opts)).toBe("confirm-stakeholders");
expect(getNextStep("confirm-stakeholders", opts)).toBe("final-review");
expect(getPreviousStep("community-context", opts)).toBe("community-name");
@@ -199,6 +210,7 @@ describe("flowSteps", () => {
expect(shouldOfferCreateFlowSaveAndExit("informational")).toBe(false);
expect(shouldOfferCreateFlowSaveAndExit("community-name")).toBe(false);
expect(shouldOfferCreateFlowSaveAndExit("community-structure")).toBe(false);
expect(shouldOfferCreateFlowSaveAndExit("setup-questions")).toBe(false);
expect(shouldOfferCreateFlowSaveAndExit("community-upload")).toBe(false);
expect(shouldOfferCreateFlowSaveAndExit("community-save")).toBe(true);
expect(shouldOfferCreateFlowSaveAndExit("review")).toBe(true);
@@ -244,6 +256,7 @@ describe("flowSteps", () => {
expect(createFlowStepUsesSelectSplitScroll("community-structure")).toBe(
true,
);
expect(createFlowStepUsesSelectSplitScroll("setup-questions")).toBe(true);
expect(createFlowStepUsesSelectSplitScroll("communication-methods")).toBe(
true,
);