Import the remade decks on stable ids and recommend one card per job, so a saved draft still loads after a chip is renamed.

The real-group profiles stay as a test, so a change that moves a pick fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilalloandCursor committed 2026-11-04 14:22:54 -07:00
1 parent 96ca15d8e3
commit bcbc6f30d9
89 files changed
+36555 -2828

No files matched your search

@@ -32,7 +32,11 @@ describe("parsePublishedDocumentForCommunityRuleDisplay", () => {
},
};
const out = parsePublishedDocumentForCommunityRuleDisplay(doc);
expect(out.map((s) => s.categoryName)).toEqual(["Values", "Communication"]);
expect(out.map((s) => s.categoryName)).toEqual([
"Values",
"Communication",
"Shared terms",
]);
expect(out[0].entries[0].title).toBe("Ecology");
expect(out[0].entries[0].body).toBe(
"We protect water.\n\nLitter = violation.",
@@ -50,7 +54,10 @@ describe("parsePublishedDocumentForCommunityRuleDisplay", () => {
],
};
const out = parsePublishedDocumentForCommunityRuleDisplay(doc);
expect(out.map((s) => s.categoryName)).toEqual(["Membership"]);
expect(out.map((s) => s.categoryName)).toEqual([
"Membership",
"Shared terms",
]);
});
it("prefers document.coreValues over a parallel Values section in document.sections", () => {
@@ -66,8 +73,10 @@ describe("parsePublishedDocumentForCommunityRuleDisplay", () => {
],
};
const out = parsePublishedDocumentForCommunityRuleDisplay(doc);
expect(out.length).toBe(1);
expect(out[0].categoryName).toBe("Values");
expect(out.map((section) => section.categoryName)).toEqual([
"Values",
"Shared terms",
]);
expect(out[0].entries[0].title).toBe("Should not duplicate");
expect(out[0].entries[0].body).toBe("x\n\ny");
});
@@ -80,7 +89,7 @@ describe("parsePublishedDocumentForCommunityRuleDisplay", () => {
],
};
const out = parsePublishedDocumentForCommunityRuleDisplay(doc);
expect(out[0].entries[0].body).toMatch(/survival and success/);
expect(out[0].entries[0].body).toMatch(/well-being is bound up/);
});
it("replaces template placeholder bodies with preset copy, Values first", () => {
@@ -99,7 +108,11 @@ describe("parsePublishedDocumentForCommunityRuleDisplay", () => {
],
};
const out = parsePublishedDocumentForCommunityRuleDisplay(doc);
expect(out.map((s) => s.categoryName)).toEqual(["Values", "Communication"]);
expect(out.map((s) => s.categoryName)).toEqual([
"Values",
"Communication",
"Shared terms",
]);
expect(out[0].entries[0].body).not.toContain("Suggested focus");
expect(out[0].entries[0].body.length).toBeGreaterThan(20);
expect(out[1].entries[0].blocks?.length).toBeGreaterThanOrEqual(1);
@@ -112,9 +125,12 @@ describe("parsePublishedDocumentForCommunityRuleDisplay", () => {
{ categoryName: "X", entries: [{ title: "t", body: "b" }] },
],
};
expect(parsePublishedDocumentForCommunityRuleDisplay(doc)).toEqual(
doc.sections,
);
const out = parsePublishedDocumentForCommunityRuleDisplay(doc);
expect(out[0]).toEqual(doc.sections[0]);
expect(out.map((section) => section.categoryName)).toEqual([
"X",
"Shared terms",
]);
});
it("replaces stale document.sections method category with full methodSelections (custom rules)", () => {