Skip to content

The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.

test(e2e): Drive the Language Servers page through its list and details

l0ng-aif38f63e3976b
diff --git a/e2e/search.spec.ts b/e2e/search.spec.ts
index 6cc3b5f3e..cdf4fefc8 100644
--- a/e2e/search.spec.ts
+++ b/e2e/search.spec.ts
@@ -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 }) => {
diff --git a/e2e/settings.spec.ts b/e2e/settings.spec.ts
index b25143a7a..278bcee55 100644
--- a/e2e/settings.spec.ts
+++ b/e2e/settings.spec.ts
@@ -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");
});