test(e2e): Drive the Language Servers page through its list and details
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
This commit is contained in:
1 parent
08d87c3903
commit
f38f63e397
2 files changed
+13
-11
No files matched your search
+1
-1
@@ -20,7 +20,7 @@ test("Search Everywhere finds and runs an action", async ({ workbench: page }) =
|
||||
await expect(option).toBeVisible();
|
||||
await page.keyboard.press("Enter");
|
||||
await expect(page.getByRole("dialog", { name: "Settings" })).toBeVisible();
|
||||
await expect(page.getByRole("table", { name: /language servers/i })).toBeVisible();
|
||||
await expect(page.getByRole("list", { name: /language servers/i })).toBeVisible();
|
||||
});
|
||||
|
||||
test("Search Everywhere finds a file and opens it", async ({ workbench: page }) => {
|
||||
|
||||
+12
-10
@@ -17,17 +17,19 @@ test("Language Servers page installs a tool with progress (in-memory installer)"
|
||||
// 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 list = dialog.getByRole("list", { name: /language servers/i });
|
||||
await expect(list).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();
|
||||
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 expect(table).toContainText("gem install solargraph");
|
||||
await list.locator('[data-tool="solargraph"]').click();
|
||||
await expect(dialog.getByLabel("solargraph details")).toContainText("gem install solargraph");
|
||||
});
|
||||
Reference in new issue
Block a user