diff --git a/client/src/components/lanes/__tests__/DiffEditor.test.tsx b/client/src/components/lanes/__tests__/DiffEditor.test.tsx index 6d3a58ee..87656f95 100644 --- a/client/src/components/lanes/__tests__/DiffEditor.test.tsx +++ b/client/src/components/lanes/__tests__/DiffEditor.test.tsx @@ -66,7 +66,10 @@ describe("DiffEditor", () => { expect(right).toHaveAttribute("contenteditable", "true"); expect(container.querySelector(".cm-merge-a .cm-changedLine.cm-ah-mod")).not.toBeNull(); expect(container.querySelector(".cm-merge-b .cm-changedLine.cm-ah-mod")).not.toBeNull(); - expect(container.querySelector(".cm-merge-revert button")).toHaveAttribute("title", "Revert"); + // The revert column is drawn in CodeMirror's next measure pass, not at mount. + await waitFor(() => + expect(container.querySelector(".cm-merge-revert button")).toHaveAttribute("title", "Revert") + ); }); it("folds unchanged lines away when collapsed, and offers Revert on a block", async () => {