Files
olivv-cs-ComfyUI-FunPack/app/tests-layout/_menu.js
T
digital-garbage 99ce537932 app: one Settings window instead of five menu items
Models and pipeline, Updates, Node packs, the log, and Temp files were
five separate dropdown entries with no way to search across them. One
button now opens a single searchable window; About is drawn in place,
everything else is a deep link -- each of those five already has real,
tested modal chrome of its own, so this reuses it rather than rebuilding
it inline.

Uses the existing composer.splitPane.h for the two-pane layout rather
than a new element -- an earlier pass added one, and its CSS collided
with splitPane's own .cx-split class, silently breaking the pipeline
window's own list/parameters split (caught by pipeline.spec.js before
this landed).
2026-09-07 00:40:45 +03:00

35 lines
1.4 KiB
JavaScript

/**
* Every settings surface (pipeline, updates, node packs, log, temp files)
* lives behind ONE Settings button now, found by name in its searchable list.
*/
export async function openSettingsSection(page, name) {
await page.getByRole("button", { name: "Settings" }).click();
await page.locator(".cx-filter-row", { hasText: name }).click();
}
/** The window moved into the unified Settings window when the app grew one. */
export async function openPipelineWindow(page) {
await openSettingsSection(page, "Models and pipeline");
}
/**
* The control that shows and hides a docked region.
*
* It used to be a glyph in a rail on the outer edge of the window; it is a
* named button in the timeline head now, which is where v4 keeps it. Written
* once here because six tests press it and none of them are about where it is.
*/
export const regionToggle = (page, name) =>
page.locator(".cx-panel-head").getByRole("button", { name, exact: true });
/**
* The same toggle from the menu bar, which nothing can cover.
*
* The way in and out at a width where the panels overlay the centre -- the
* named buttons live in the timeline head, and that is what gets covered.
*/
export const menuToggle = (page, region) => async () => {
await page.getByRole("button", { name: "View" }).click();
await page.getByRole("menuitem", { name: new RegExp(`(Show|Hide) ${region}`) }).click();
};