Invite people after review, then finish the Rule, with login before inviting and Invite your members on Profile.

This commit is contained in:
adilallo committed 2026-11-06 08:56:13 -07:00
1 parent 88bfccd1e7
commit 70ceb73104
31 files changed
+1388 -401

No files matched your search

@@ -0,0 +1,28 @@
import { describe, expect, it } from "vitest";
import { membershipInvitePreview } from "../../lib/create/membershipInvitePreview";
import type { CreateFlowState } from "../../app/(app)/create/types";
describe("membershipInvitePreview", () => {
it("returns null when no membership method is selected", () => {
expect(membershipInvitePreview({} as CreateFlowState)).toBeNull();
});
it("uses the first selected membership method and saved words", () => {
const preview = membershipInvitePreview({
selectedMembershipMethodIds: ["open-admission"],
membershipMethodDetailsById: {
"open-admission": {
eligibility: "Anyone who shares the work belongs.",
joiningProcess: "Work two Sunday shares, then ask to join.",
expectations: "",
},
},
} as CreateFlowState);
expect(preview?.title).toBe("Open admission");
expect(preview?.categoryName).toBe("Membership");
expect(preview?.eligibility).toBe("Anyone who shares the work belongs.");
expect(preview?.joiningProcess).toBe(
"Work two Sunday shares, then ask to join.",
);
});
});