Files
openidea/e2e/settings.spec.ts
T
l0ng-ai 909225858c test(e2e): Run specs with the macOS keymap on every host; update stale specs
CI runs Chromium on Linux, where the workbench picked the Linux keymap and
the ⌘-shortcut specs failed. Present a macOS user agent and platform.
Settings and workbench specs now match the current page tree and stripes.

Claude-Session: https://claude.ai/code/session_01B65qLEKnkeYTGdbwhLpjCu
2026-10-22 22:09:08 +08:00

34 lines
1.7 KiB
TypeScript

import { expect, test } from "./fixtures";
test("⌘, opens Settings with the page tree; Escape closes", async ({ workbench: page }) => {
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();
}
await page.keyboard.press("Escape");
await expect(dialog).toBeHidden();
});
test("Language Servers page installs a tool with progress (in-memory installer)", async ({ workbench: page }) => {
await page.keyboard.press("Meta+,");
const dialog = page.getByRole("dialog", { name: "Settings" });
// The page tree is virtualized; search brings the page into view.
await dialog.getByRole("textbox", { name: "Search settings" }).fill("Language Servers");
await dialog.getByRole("treeitem", { name: "Language Servers", exact: true }).click();
const table = dialog.getByRole("table", { name: /language servers/i });
await expect(table).toBeVisible();
const row = table.locator('tr[data-tool="gopls"]');
await expect(row).toContainText("Missing");
await row.getByRole("button", { name: "Install gopls" }).click();
await expect(table.getByRole("progressbar", { name: "Installing gopls" })).toBeVisible();
await expect(row).toContainText("Installed");
await expect(row).toContainText("1.0.0");
await expect(row.getByRole("button", { name: "Uninstall gopls" })).toBeVisible();
// Tools without an installer explain how to get them.
await expect(table).toContainText("gem install solargraph");
});