Files
openidea/e2e/workbench.spec.ts
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

30 lines
1.5 KiB
TypeScript

import { expect, PROJECT, test } from "./fixtures";
test("renders title bar, stripes, tool window and status bar", async ({ workbench: page }) => {
const title = page.locator("header").first();
await expect(title.getByRole("button", { name: PROJECT })).toBeVisible();
await expect(title.getByRole("button", { name: "Search Everywhere" })).toBeVisible();
const left = page.getByRole("toolbar", { name: "Tool windows" });
for (const name of ["Project", "Commit", "Git", "Terminal", "Problems"]) {
await expect(left.getByRole("button", { name, exact: true })).toBeVisible();
}
await expect(page.getByRole("toolbar", { name: "Right tool windows" })).toBeVisible();
await expect(page.getByRole("region", { name: "Project" })).toBeVisible();
const status = page.getByRole("contentinfo", { name: "Status bar" });
await expect(status).toBeVisible();
// Empty editor area shows the IDEA-style hints.
await expect(page.getByText("Search Everywhere", { exact: true }).last()).toBeVisible();
});
test("stripe buttons toggle tool windows", async ({ workbench: page }) => {
const stripe = page.getByRole("toolbar", { name: "Tool windows" });
const problems = page.getByRole("region", { name: "Problems" });
await expect(problems).toBeHidden();
await stripe.getByRole("button", { name: "Problems", exact: true }).click();
await expect(problems).toBeVisible();
await stripe.getByRole("button", { name: "Problems", exact: true }).click();
await expect(problems).toBeHidden();
});