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:
adilalloandCursor committed 2026-11-04 14:22:54 -07:00
1 parent 96ca15d8e3
commit bcbc6f30d9
89 files changed
+36555 -2828

No files matched your search

+17 -17
View File
@@ -30,14 +30,14 @@ describe("Create flow communication-methods page", () => {
render(<CommunicationMethodsScreen />);
const signalCards = screen.getAllByRole("button", {
name: /Signal: Encrypted messaging/,
name: /Signal: We coordinate in encrypted Signal groups/,
});
await user.click(signalCards[0]);
const dialog = screen.getByRole("dialog");
expect(dialog).toBeInTheDocument();
expect(within(dialog).getByText("Signal")).toBeInTheDocument();
expect(within(dialog).getByText("Add Platform")).toBeInTheDocument();
expect(within(dialog).getByText("Add card")).toBeInTheDocument();
});
test("re-opening a selected method shows Save and footer Remove; Remove stays in the kebab", async () => {
@@ -45,11 +45,11 @@ describe("Create flow communication-methods page", () => {
render(<CommunicationMethodsScreen />);
const signalCards = screen.getAllByRole("button", {
name: /Signal: Encrypted messaging/,
name: /Signal: We coordinate in encrypted Signal groups/,
});
await user.click(signalCards[0]);
const dialog = screen.getByRole("dialog");
await user.click(within(dialog).getByRole("button", { name: "Add Platform" }));
await user.click(within(dialog).getByRole("button", { name: "Add card" }));
await user.click(signalCards[0]);
const dialogAgain = screen.getByRole("dialog");
@@ -57,7 +57,7 @@ describe("Create flow communication-methods page", () => {
within(dialogAgain).getByRole("button", { name: "Remove" }),
).toBeInTheDocument();
expect(
within(dialogAgain).queryByRole("button", { name: "Add Platform" }),
within(dialogAgain).queryByRole("button", { name: "Add card" }),
).not.toBeInTheDocument();
expect(
within(dialogAgain).getByRole("button", { name: "Save" }),
@@ -72,12 +72,12 @@ describe("Create flow communication-methods page", () => {
render(<CommunicationMethodsScreen />);
const signalCards = screen.getAllByRole("button", {
name: /Signal: Encrypted messaging/,
name: /Signal: We coordinate in encrypted Signal groups/,
});
await user.click(signalCards[0]);
await user.click(
within(screen.getByRole("dialog")).getByRole("button", {
name: "Add Platform",
name: "Add card",
}),
);
@@ -96,12 +96,12 @@ describe("Create flow communication-methods page", () => {
render(<CommunicationMethodsScreen />);
const signalCards = screen.getAllByRole("button", {
name: /Signal: Encrypted messaging/,
name: /Signal: We coordinate in encrypted Signal groups/,
});
await user.click(signalCards[0]);
await user.click(
within(screen.getByRole("dialog")).getByRole("button", {
name: "Add Platform",
name: "Add card",
}),
);
@@ -123,7 +123,7 @@ describe("Create flow communication-methods page", () => {
render(<CommunicationMethodsScreen />);
const signalCards = screen.getAllByRole("button", {
name: /Signal: Encrypted messaging/,
name: /Signal: We coordinate in encrypted Signal groups/,
});
await user.click(signalCards[0]);
const dialog = screen.getByRole("dialog");
@@ -138,7 +138,7 @@ describe("Create flow communication-methods page", () => {
render(<CommunicationMethodsScreen />);
const signalCards = screen.getAllByRole("button", {
name: /Signal: Encrypted messaging/,
name: /Signal: We coordinate in encrypted Signal groups/,
});
await user.click(signalCards[0]);
@@ -182,7 +182,7 @@ describe("Create flow communication-methods page", () => {
expect(
screen.getByText(
"How should this community communicate with each-other?",
"How does your group talk, meet and keep its records?",
),
).toBeInTheDocument();
});
@@ -191,11 +191,11 @@ describe("Create flow communication-methods page", () => {
render(<CommunicationMethodsScreen />);
expect(
screen.getByText(/You can select multiple methods for different needs or/),
screen.getByText(/Pick a card for each part of how your group communicates/),
).toBeInTheDocument();
expect(screen.getByRole("button", { name: /^add$/i })).toBeInTheDocument();
expect(
screen.getByRole("button", { name: "See all communication approaches" }),
screen.getByRole("button", { name: "See all communication cards" }),
).toBeInTheDocument();
});
@@ -230,7 +230,7 @@ describe("Create flow communication-methods page", () => {
render(<CommunicationMethodsScreen />);
const toggle = screen.getByRole("button", {
name: "See all communication approaches",
name: "See all communication cards",
});
await user.click(toggle);
@@ -239,7 +239,7 @@ describe("Create flow communication-methods page", () => {
).toBeInTheDocument();
expect(
screen.getByText(
"How should this community communicate with each-other?",
"How does your group talk, meet and keep its records?",
),
).toBeInTheDocument();
expect(
@@ -419,7 +419,7 @@ describe("Create flow communication-methods page", () => {
const dupId = dupIds[0];
expect(latest.selectedCommunicationMethodIds).toEqual([CUSTOM_POLICY_ID]);
expect(
within(dialog).getByRole("button", { name: "Add Platform" }),
within(dialog).getByRole("button", { name: "Add card" }),
).toBeInTheDocument();
expect(metaAfterDup[dupId].label.endsWith(" (copy)")).toBe(true);
expect(within(dialog).getByRole("heading", { level: 1 })).toHaveTextContent(