fix(ui): collapse session lists and scope selection controls to panels

This commit is contained in:
Codex
2026-09-13 18:12:27 +02:00
parent 571a4bcaa2
commit cf90c1bd51
11 changed files with 119 additions and 47 deletions
+9 -1
View File
@@ -125,11 +125,19 @@ for (const width of [390, 1280]) {
const green = await workspaceButton.getByRole("img").evaluate(el => getComputedStyle(el).backgroundColor);
const active = page.getByRole("button", { name: "Active sessions", exact: true });
const archive = page.getByRole("button", { name: "Archive (40)", exact: true });
await expect(active).toHaveAttribute("aria-expanded", "true");
await expect(active).toHaveAttribute("aria-expanded", "false");
await expect(archive).toHaveAttribute("aria-expanded", "false");
await expect(page.getByRole("checkbox", { name: "Select all" })).toHaveCount(0);
await expect(page.getByText("Sessions", { exact: true })).toHaveCount(0);
const activeBox = await active.boundingBox();
const archiveBox = await archive.boundingBox();
expect(archiveBox!.y - activeBox!.y - activeBox!.height).toBeLessThan(8);
await page.screenshot({ path: testInfo.outputPath("session-accordions-closed.png"), animations: "disabled" });
await active.click();
await archive.click();
for (const name of ["Active sessions", "Archive (40)"]) {
const panel = page.getByRole("region", { name, exact: true });
await expect(panel.getByRole("checkbox", { name: "Select all" })).toBeVisible();
await expect(panel).toHaveCSS("overflow-y", "auto");
const dimensions = await panel.evaluate(el => ({ height: el.getBoundingClientRect().height, scroll: el.scrollHeight, client: el.clientHeight }));
expect(dimensions.height).toBeLessThanOrEqual(288);