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

+7 -9
View File
@@ -7,14 +7,12 @@ import { methodSectionsPinsForHydratedSelections } from "../../lib/create/publis
import coreValuesMessages from "../../messages/en/create/customRule/coreValues.json";
function coreValuePresetId(label: string): string {
const values = coreValuesMessages.values as Array<
string | { label: string }
>;
const idx = values.findIndex((v) => {
const l = typeof v === "string" ? v : v.label;
return l.toLowerCase() === label.toLowerCase();
});
return String(idx + 1);
const values = coreValuesMessages.values as Array<{ id: string; label: string }>;
const row = values.find(
(value) => value.label.toLowerCase() === label.toLowerCase(),
);
if (!row) throw new Error(`No core value named ${label}`);
return row.id;
}
describe("buildTemplateCustomizePrefill", () => {
@@ -76,7 +74,7 @@ describe("buildTemplateCustomizePrefill", () => {
const snapshot = prefill.coreValuesChipsSnapshot ?? [];
const selectedRows = snapshot.filter((r) => r.state === "selected");
expect(selectedRows.map((r) => r.label).sort()).toEqual([
"Community Care",
"Community care",
"Consensus",
]);
// Unmatched presets should still appear, as unselected, so the screen