fix(maestro): render accurate diffs

This commit is contained in:
Miguel Palhas
2026-09-05 09:18:05 +01:00
parent 9e59121eec
commit efb54750ed
5 changed files with 398 additions and 38 deletions
+11
View File
@@ -157,6 +157,17 @@ describe("buildTranscriptRow: tool diffs", () => {
// stylesheet keys `overflow-x: auto` off, not a computed style.
expect(el.querySelector(".st-diff")!.className).toBe("st-diff");
});
it("renders a visible marker for a removed final newline", () => {
const el = buildTranscriptRow(
row("tool_diff", {
title: "Edit(x.rs)",
content: [{ type: "diff", path: "/repo/x.rs", oldText: "same\n", newText: "same" }],
}),
);
(el.querySelector(".st-tool-head") as HTMLButtonElement).click();
expect(el.querySelector(".st-ln-eof")!.textContent).toBe("\\ No newline at end of file");
});
});
describe("buildTranscriptRow: approval", () => {