From 17400ade3d676b196e99613bf6a7356a6c07c2b4 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Tue, 27 Oct 2026 13:00:37 +0800 Subject: [PATCH] test(e2e): Reach later Settings groups in the virtualized page tree (#65) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Settings page tree only renders rows near the viewport. Editor › Vim (#55) pushed Version Control past the rendered rows on CI's Linux runner, so the e2e failed on main. Collapse Editor before checking the later groups. Claude-Session: https://claude.ai/code/session_01VUYsdXA2nkF5v6zsC93dpn --- e2e/settings.spec.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/e2e/settings.spec.ts b/e2e/settings.spec.ts index 278bcee55..88fd1aeac 100644 --- a/e2e/settings.spec.ts +++ b/e2e/settings.spec.ts @@ -4,8 +4,16 @@ test("⌘, opens Settings with the page tree; Escape closes", async ({ workbench await page.keyboard.press("Meta+,"); const dialog = page.getByRole("dialog", { name: "Settings" }); await expect(dialog).toBeVisible(); - for (const name of ["Appearance & Behavior", "Keymap", "Editor", "Plugins", "Version Control"]) { - await expect(dialog.getByRole("treeitem", { name, exact: true })).toBeVisible(); + const item = (name: string) => dialog.getByRole("treeitem", { name, exact: true }); + for (const name of ["Appearance & Behavior", "Keymap", "Editor"]) { + await expect(item(name)).toBeVisible(); + } + // The tree is virtualized: collapse Editor (expanded by default) so the later groups render. + await item("Editor").click(); + await page.keyboard.press("ArrowLeft"); + await expect(item("Editor")).not.toHaveAttribute("aria-expanded", "true"); + for (const name of ["Plugins", "Version Control"]) { + await expect(item(name)).toBeVisible(); } await page.keyboard.press("Escape"); await expect(dialog).toBeHidden();