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:
1 parent
96ca15d8e3
commit
bcbc6f30d9
89 files changed
+36555
-2828
No files matched your search
@@ -205,9 +205,9 @@ function FinalReviewWithCustomizeSelections() {
|
||||
{ id: "2", label: "Accountability", state: "unselected" },
|
||||
],
|
||||
selectedCommunicationMethodIds: ["signal"],
|
||||
selectedMembershipMethodIds: ["open-access"],
|
||||
selectedMembershipMethodIds: ["open-admission"],
|
||||
selectedDecisionApproachIds: ["lazy-consensus"],
|
||||
selectedConflictManagementIds: ["peer-mediation"],
|
||||
selectedConflictManagementIds: ["conflict-ladder"],
|
||||
});
|
||||
}, [replaceState]);
|
||||
return <FinalReviewScreen />;
|
||||
@@ -220,16 +220,39 @@ describe("FinalReviewScreen — prefilled selections", () => {
|
||||
expect(screen.getByText("Accessibility")).toBeInTheDocument();
|
||||
});
|
||||
expect(screen.getByText("Signal")).toBeInTheDocument();
|
||||
expect(screen.getByText("Open Access")).toBeInTheDocument();
|
||||
expect(screen.getByText("Lazy Consensus")).toBeInTheDocument();
|
||||
expect(screen.getByText("Peer Mediation")).toBeInTheDocument();
|
||||
expect(screen.getByText("Open admission")).toBeInTheDocument();
|
||||
expect(screen.getByText("Lazy consensus")).toBeInTheDocument();
|
||||
expect(screen.getByText("Conflict ladder")).toBeInTheDocument();
|
||||
|
||||
// Demo chips from `finalReview.json` must not leak through once the
|
||||
// user has real selections: "Open Admission" is shipped as fallback,
|
||||
// while the customize flow resolves to "Open Access".
|
||||
// user has real selections. The fallback still says "Open Admission".
|
||||
expect(screen.queryByText("Open Admission")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("Consciousness")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("warns when binding arbitration sits next to a join that records no yes", async () => {
|
||||
function ReviewWithOpenJoinAndArbitration() {
|
||||
const { replaceState } = useCreateFlow();
|
||||
useLayoutEffect(() => {
|
||||
replaceState({
|
||||
title: "Oak Park Commons",
|
||||
selectedMembershipMethodIds: ["open-admission"],
|
||||
selectedConflictManagementIds: ["binding-arbitration"],
|
||||
});
|
||||
}, [replaceState]);
|
||||
return <FinalReviewScreen />;
|
||||
}
|
||||
|
||||
render(<ReviewWithOpenJoinAndArbitration />);
|
||||
expect(
|
||||
await screen.findByText(/Binding arbitration needs each member.s own yes/),
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText(
|
||||
/Each member still has to agree separately before binding arbitration applies/,
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
describe("FinalReviewScreen — chip detail modal", () => {
|
||||
@@ -245,7 +268,7 @@ describe("FinalReviewScreen — chip detail modal", () => {
|
||||
await waitFor(() => {
|
||||
expect(
|
||||
screen.getByText(
|
||||
/Encrypted messaging for high-security, private coordination\./i,
|
||||
/encrypted Signal groups/i,
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
@@ -277,7 +300,7 @@ describe("FinalReviewScreen — chip detail modal", () => {
|
||||
);
|
||||
|
||||
fireEvent.click(
|
||||
await screen.findByRole("button", { name: catalogChipName("Video Meetings") }),
|
||||
await screen.findByRole("button", { name: catalogChipName("Video meetings") }),
|
||||
);
|
||||
const dialog = await screen.findByRole("dialog");
|
||||
expect(within(dialog).getAllByRole("textbox")).toHaveLength(3);
|
||||
@@ -1021,9 +1044,9 @@ describe("FinalReviewScreen — chip edit modal save semantics", () => {
|
||||
? (document.getElementById(labelledby)?.textContent ?? "").trim()
|
||||
: "";
|
||||
});
|
||||
expect(labels[0]).toMatch(/Logistics, Admin/);
|
||||
expect(labels[1]).toMatch(/Code of Conduct/);
|
||||
expect(labels[2]).toMatch(/Core Principle/);
|
||||
expect(labels[0]).toMatch(/How it works/);
|
||||
expect(labels[1]).toMatch(/Norms/);
|
||||
expect(labels[2]).toMatch(/Core principle/);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user