F1: conflict toast closes when the merge ends, toasts keep off the commit box
The merge store dismisses its conflict warning once the status lists no conflicted file (resolved, committed or aborted) and replaces it on a new conflicted merge. The toast stack moves above areas registered with keepClearOf; the Changes window registers its commit box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e228d11ef9
commit
750ecf5e51
7 changed files with 235 additions and 9 deletions
|
|
@ -416,6 +416,29 @@ describe("merging", () => {
|
|||
expect(useNotificationsStore(pinia).toasts.some((n) => n.text.includes("cancelled"))).toBe(true);
|
||||
});
|
||||
|
||||
it("closes the conflict toast once no conflict is left, and a new conflicted merge replaces it", async () => {
|
||||
await mountDialog();
|
||||
const notifications = useNotificationsStore(pinia);
|
||||
const conflictToasts = (): number => notifications.toasts.filter((n) => n.text.includes("stopped on conflicts")).length;
|
||||
await runCommand("vcs.merge", { branch: "feature" });
|
||||
await runCommand("vcs.merge", { branch: "feature" });
|
||||
expect(conflictToasts()).toBe(1);
|
||||
gitStatus = { ...gitStatus, files: [{ path: "b.php", index: "modified", worktree: "unmodified" }] };
|
||||
await useVcsStatusStore(pinia).refresh();
|
||||
await flushPromises();
|
||||
expect(conflictToasts()).toBe(0);
|
||||
});
|
||||
|
||||
it("closes the conflict toast when the merge is aborted", async () => {
|
||||
const wrapper = await mountDialog();
|
||||
await runCommand("vcs.merge", { branch: "feature" });
|
||||
expect(useNotificationsStore(pinia).toasts.some((n) => n.text.includes("stopped on conflicts"))).toBe(true);
|
||||
await runCommand("vcs.abortMerge");
|
||||
await wrapper.get("[data-test=merge-abort]").trigger("click");
|
||||
await flushPromises();
|
||||
expect(useNotificationsStore(pinia).toasts.some((n) => n.text.includes("stopped on conflicts"))).toBe(false);
|
||||
});
|
||||
|
||||
it("lists the other branches and merges the one chosen", async () => {
|
||||
const wrapper = await mountDialog();
|
||||
await runCommand("vcs.merge");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue