Keep catalog method section editors after a Customize title override so Core Principle and related copy are not replaced by an empty custom-policy body.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-21 14:11:21 -06:00
co-authored by Cursor
parent 4006fe5c6c
commit 75ba0a214f
7 changed files with 152 additions and 7 deletions
@@ -125,4 +125,40 @@ describe("usesWizardFieldBlocksModalBody", () => {
}),
).toBe(true);
});
it("is false for catalog ids with a title-override meta row and no field blocks", () => {
expect(
usesWizardFieldBlocksModalBody({
methodId: "video-meetings",
meta: {
"video-meetings": {
label: "Video Meetings",
supportText: "Synchronous video calls.",
},
},
fieldBlocksById: { "video-meetings": [] },
modalEditUnlocked: false,
draftFieldBlocks: null,
customFacetDetailsMatchPreset: true,
}),
).toBe(false);
});
it("is true for catalog ids when persisted field blocks exist", () => {
expect(
usesWizardFieldBlocksModalBody({
methodId: "video-meetings",
meta: {
"video-meetings": {
label: "Video Meetings",
supportText: "Synchronous video calls.",
},
},
fieldBlocksById: { "video-meetings": blocks },
modalEditUnlocked: false,
draftFieldBlocks: null,
customFacetDetailsMatchPreset: true,
}),
).toBe(true);
});
});