Update conflict management modal

This commit is contained in:
adilallo
2026-04-30 09:23:40 -06:00
parent b7446873cd
commit 58d0e33500
8 changed files with 95 additions and 24 deletions
@@ -0,0 +1,29 @@
import { describe, expect, it } from "vitest";
import { formatConflictApplicableScopeForTextarea } from "../../lib/create/ruleSectionsFromMethodSelections";
describe("formatConflictApplicableScopeForTextarea", () => {
it("joins legacy preset fragments with comma-space as one sentence", () => {
expect(
formatConflictApplicableScopeForTextarea(
[],
[
"Low-level friction",
"misunderstandings",
"and minor grievances between peers.",
],
),
).toBe(
"Low-level friction, misunderstandings, and minor grievances between peers.",
);
});
it("prefers selected scopes when non-empty", () => {
expect(
formatConflictApplicableScopeForTextarea(["only this"], ["a", "b"]),
).toBe("only this");
});
it("returns empty string when both lists are empty", () => {
expect(formatConflictApplicableScopeForTextarea([], [])).toBe("");
});
});