fix(ui): collapse session lists and scope selection controls to panels
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user