Files
community-rule/tests/unit/createFlowRegistryScreenAlignment.test.ts
T
adilalloandCursor 24a9615c0c Standardize create-flow option steps on one question-and-options layout and Selection sizes.
Method cards, chips, and the right rail now share the two-column shell; last options clear the footer fade, See all stays under the stack, and the left heading no longer jumps when the list expands.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 17:18:04 -06:00

24 lines
1.0 KiB
TypeScript

import { describe, expect, it } from "vitest";
import {
CREATE_FLOW_SCREEN_REGISTRY,
createFlowStepUsesCardLayout,
} from "../../app/(app)/create/utils/createFlowScreenRegistry";
import { VALID_STEPS } from "../../app/(app)/create/utils/flowSteps";
describe("create flow registry vs valid steps (CR-92 §3)", () => {
it("CREATE_FLOW_SCREEN_REGISTRY defines every VALID_STEPS id", () => {
const keys = new Set(Object.keys(CREATE_FLOW_SCREEN_REGISTRY));
for (const step of VALID_STEPS) {
expect(keys.has(step), `missing registry entry for ${step}`).toBe(true);
}
expect(keys.size).toBe(VALID_STEPS.length);
});
it("keeps Figma card-kind ids on the method-card steps", () => {
expect(createFlowStepUsesCardLayout("communication-methods")).toBe(true);
expect(createFlowStepUsesCardLayout("membership-methods")).toBe(true);
expect(createFlowStepUsesCardLayout("conflict-management")).toBe(true);
expect(createFlowStepUsesCardLayout("decision-approaches")).toBe(false);
});
});