дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 01:01:17 +02:00
The Settings window's title bar was 8px taller than the platform dialog, the search field, breadcrumb and content sat a few pixels off, the tree drew 12px chevrons, untitled sections were indented away from the group titles, checkbox rows were 26px apart and the button bar had no separator. The window is now titled "Settings – <project>", uses a 32px dialog title bar on macOS (--h-dialog-titlebar), 16px tree chevrons, 22px group and indent insets, 11/16/16/16 content padding, field-height checkbox rows and a hairline above the buttons. Also types the label/box pairs of the Appearance e2e check. Closes #7817 Co-authored-by: wildcatDownstairs <[email protected]>
40 рядки
1.8 KiB
TypeScript
40 рядки
1.8 KiB
TypeScript
import { expect, test } from "./fixtures";
|
|
|
|
test("Settings aligns search results with their parent pages and honors smaller tree indents", async ({
|
|
workbench: page,
|
|
}) => {
|
|
await page.keyboard.press("Meta+,");
|
|
const dialog = page.getByRole("dialog", { name: "Settings", exact: true });
|
|
const search = dialog.getByRole("textbox", { name: "Search settings" });
|
|
const tree = dialog.getByRole("tree", { name: "Settings pages" });
|
|
await search.fill("Language Defaults");
|
|
|
|
const editor = tree.getByRole("treeitem", { name: "Editor", exact: true });
|
|
const scheme = tree.getByRole("treeitem", { name: "Color Scheme", exact: true });
|
|
const defaults = tree.getByRole("treeitem", { name: "Language Defaults", exact: true });
|
|
await expect(defaults).toHaveAttribute("aria-selected", "true");
|
|
await expect(defaults.locator("mark")).toHaveText(["Language", "Defaults"]);
|
|
|
|
const insets = () =>
|
|
Promise.all(
|
|
[editor, scheme, defaults].map((row) =>
|
|
row.locator(":scope > span:last-child").evaluate((label) => {
|
|
const left = label.closest('[role="tree"]')!.getBoundingClientRect().left;
|
|
return Math.round(label.getBoundingClientRect().left - left);
|
|
}),
|
|
),
|
|
);
|
|
// WebStorm 2026.3 draws the labels at 30/46/62: the 16px chevron (Tree.expandedIcon) and 16px per level.
|
|
await expect.poll(insets).toEqual([30, 46, 62]);
|
|
await page.setViewportSize({ width: 580, height: 720 });
|
|
await expect.poll(insets).toEqual([30, 46, 62]);
|
|
await page.evaluate(() => document.documentElement.style.setProperty("--tree-indent", "12px"));
|
|
await expect.poll(insets).toEqual([30, 42, 54]);
|
|
|
|
await search.press("ArrowUp");
|
|
await expect(scheme).toHaveAttribute("aria-selected", "true");
|
|
await search.press("ArrowUp");
|
|
await expect(editor).toHaveAttribute("aria-selected", "true");
|
|
await expect(search).toBeFocused();
|
|
});
|