Let decision-approaches wrap at narrow widths and sync key-resource scopes.
The info-box checkboxes overflowed in a squeezed column; wrapping them and offering those scopes as chips on every approach keeps the sidebar and Applicable Scope selection in sync without publishing unchecked keys as defaults. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { communicationPresetFor } from "../../lib/create/finalReviewChipPresets";
|
||||
import { communicationMethodFacetMatchesPreset } from "../../lib/create/methodCardFacetMatchesPresetForId";
|
||||
import {
|
||||
communicationPresetFor,
|
||||
decisionApproachPresetFor,
|
||||
} from "../../lib/create/finalReviewChipPresets";
|
||||
import {
|
||||
communicationMethodFacetMatchesPreset,
|
||||
decisionApproachFacetMatchesPreset,
|
||||
} from "../../lib/create/methodCardFacetMatchesPresetForId";
|
||||
|
||||
const uuid = "550e8400-e29b-41d4-a716-446655440000";
|
||||
|
||||
@@ -19,4 +25,23 @@ describe("methodCardFacetMatchesPresetForId", () => {
|
||||
),
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("decision approaches: ignores key-resource chip selections", () => {
|
||||
const p = decisionApproachPresetFor(uuid);
|
||||
expect(
|
||||
decisionApproachFacetMatchesPreset(
|
||||
{
|
||||
...p,
|
||||
selectedApplicableScope: ["Steward finances"],
|
||||
},
|
||||
uuid,
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
decisionApproachFacetMatchesPreset(
|
||||
{ ...p, corePrinciple: "edited" },
|
||||
uuid,
|
||||
),
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user