From 8f1e95e5a2d3e8190784bbd4e612c187ade36ac2 Mon Sep 17 00:00:00 2001 From: Vladislav Kuzmin <67874880+principalwater@users.noreply.github.com> Date: Fri, 27 Nov 2026 23:14:03 +0300 Subject: [PATCH] test(diff): align navigation fixtures with the initial difference (#6505) #6471 opens a diff at its first change when the caller gives no line, so the cross-file navigation test clicked Next once too often before checking the boundary hint. The tests that navigate from the top now pass an explicit starting line. Closes #6500 Co-authored-by: principalwater <67874880+principalwater@users.noreply.github.com> --- e2e/diff-navigation.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/diff-navigation.spec.ts b/e2e/diff-navigation.spec.ts index ef3b53ee5..9bad6c2ab 100644 --- a/e2e/diff-navigation.spec.ts +++ b/e2e/diff-navigation.spec.ts @@ -273,7 +273,6 @@ test("maximizes a diff preview tab and restores its previous layout", async ({ w test("continues between changed files from toolbar buttons and the keymap", async ({ workbench: page }) => { const toolbar = await openChain(page); const selected = page.getByRole("tablist", { name: "Editor tabs" }).locator('[aria-selected="true"]'); - await toolbar.getByRole("button", { name: "Next Difference", exact: true }).click(); await expect(toolbar).toContainText("1 of 1 differences"); await toolbar.getByRole("button", { name: "Next Difference", exact: true }).click(); await expect(page.getByRole("status").filter({ hasText: "Press again to go to the next file" })).toBeVisible(); @@ -359,6 +358,7 @@ for (const reducedMotion of ["reduce", "no-preference"] as const) { for (const i of [100, 400, 700]) right[i] = `const changed${i} = ${i};`; await openDiff({ path: "/dev/acme-api/navigation.ts", + line: 0, // Start before the first difference to exercise every navigation step. left: { type: "text", text: lines.join("\n"), label: "Before" }, right: { type: "text", text: right.join("\n"), label: "After" }, });