дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-08 19:02:17 +02:00
The page is no longer a table: pick the tool in the list, then act in its details pane. Fixes the Frontend CI failures since v0.1.7. Claude-Session: https://claude.ai/code/session_01B65qLEKnkeYTGdbwhLpjCu
36 рядки
1.8 KiB
TypeScript
36 рядки
1.8 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 list = dialog.getByRole("list", { name: /language servers/i });
|
|
await expect(list).toBeVisible();
|
|
|
|
await list.locator('[data-tool="gopls"]').click();
|
|
const details = dialog.getByLabel("gopls details");
|
|
await expect(details).toContainText("Missing");
|
|
await details.getByRole("button", { name: "Install gopls" }).click();
|
|
await expect(details.getByRole("progressbar", { name: "Installing gopls" })).toBeVisible();
|
|
await expect(details).toContainText("Installed");
|
|
await expect(details).toContainText("1.0.0");
|
|
await expect(details.getByRole("button", { name: "Uninstall" })).toBeVisible();
|
|
|
|
// Tools without an installer explain how to get them.
|
|
await list.locator('[data-tool="solargraph"]').click();
|
|
await expect(dialog.getByLabel("solargraph details")).toContainText("gem install solargraph");
|
|
});
|