Stop treating login/save-progress as a 48-character email limit.
The overlay was failing Zod on preset method-card support text attached with the draft; raise that cap, allow RFC-length emails, and drop Back to home from the overlay. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { CUSTOM_METHOD_CARD_WIZARD_MAX_DESCRIPTION_CHARS } from "../../lib/create/customMethodCardWizardConstants";
|
||||
import {
|
||||
assertPlainJsonValue,
|
||||
DEFAULT_PLAIN_JSON_LIMITS,
|
||||
@@ -87,6 +88,33 @@ describe("createFlowStateSchema", () => {
|
||||
expect(r.success).toBe(false);
|
||||
});
|
||||
|
||||
it("accepts custom method card support text longer than 48 characters", () => {
|
||||
const r = createFlowStateSchema.safeParse({
|
||||
customMethodCardMetaById: {
|
||||
"00000000-0000-4000-8000-000000000001": {
|
||||
label: "Signal",
|
||||
supportText:
|
||||
"A decision is assumed approved unless objections are raised within a specified timeframe.",
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(r.success).toBe(true);
|
||||
});
|
||||
|
||||
it("rejects custom method card support text over the description max", () => {
|
||||
const r = createFlowStateSchema.safeParse({
|
||||
customMethodCardMetaById: {
|
||||
"00000000-0000-4000-8000-000000000001": {
|
||||
label: "Signal",
|
||||
supportText: "x".repeat(
|
||||
CUSTOM_METHOD_CARD_WIZARD_MAX_DESCRIPTION_CHARS + 1,
|
||||
),
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(r.success).toBe(false);
|
||||
});
|
||||
|
||||
it("accepts communityStructureChipSnapshots with custom chip rows", () => {
|
||||
const r = createFlowStateSchema.safeParse({
|
||||
communityStructureChipSnapshots: {
|
||||
|
||||
Reference in New Issue
Block a user