mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
Project's Options menu groups its settings under Behavior, Appearance, and Sort By. Sort By includes the folder ordering toggle alongside the sort choices. The first level now has seven items, so the window controls stay visible in a short window.
21 lines
1.1 KiB
TypeScript
21 lines
1.1 KiB
TypeScript
import { expect, test } from "./fixtures";
|
|
|
|
test("gives the project name room before its path in a narrow tree", async ({ workbench: page }) => {
|
|
await page.evaluate(async () => {
|
|
const storeModule = "/src/features/project-tree/store.ts";
|
|
const { useProjectTree } = await import(/* @vite-ignore */ storeModule);
|
|
useProjectTree.setState({ name: "checkout-order-processing" });
|
|
});
|
|
|
|
const pane = page.getByRole("region", { name: "Project", exact: true });
|
|
await pane.getByRole("button", { name: "Options", exact: true }).click();
|
|
await page.getByRole("menuitem", { name: "Appearance", exact: true }).hover();
|
|
await page.getByRole("menuitemcheckbox", { name: "Horizontal Scrolling" }).click();
|
|
|
|
const tree = pane.getByRole("tree", { name: "Project" });
|
|
const name = tree.getByText("checkout-order-processing", { exact: true });
|
|
await expect(name).toBeVisible();
|
|
await expect.poll(() => name.evaluate((element) => element.scrollWidth <= element.clientWidth)).toBe(true);
|
|
await expect.poll(() => tree.evaluate((element) => element.scrollWidth <= element.clientWidth)).toBe(true);
|
|
});
|