commit da4ed5aff09593ced004482c41268ef72fc3169f
parent c41195043401f712091d11914b7e239192614250
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 10 Nov 2026 11:22:26 -0500
umtool e2e: the workspace under ~900 px -- the inspector a sheet at the bottom, folded by its head, no sideways scroll
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/umtool/e2e/workspace.spec.ts b/umtool/e2e/workspace.spec.ts
@@ -155,3 +155,17 @@ test("the piece page's tabs stay at ?tab=; the Overview is written out", async (
// ...and the piece page's own Workspace link goes back to it.
await expect(page.locator("[data-primary-workspace]")).toHaveAttribute("href", urls.workspaceHref(P));
});
+
+test("under ~900 px the inspector is a sheet at the bottom, folded and unfolded by its head", async ({ page }) => {
+ await page.setViewportSize({ width: 820, height: 900 });
+ await page.goto(urls.workspaceHref(P, { block: "c02" }));
+ const sheet = page.locator("aside[data-ws-inspector]");
+ await expect(sheet).toHaveAttribute("data-ws-sheet", "open");
+ expect(await sheet.evaluate((el) => getComputedStyle(el).position)).toBe("fixed");
+ await expect(page.locator("[data-ws-sheet-toggle]")).toContainText("c02");
+ await page.screenshot({ path: path.join(process.env.WS_SHOTS ?? path.join(DIR, ".."), "ws-sheet.png") }).catch(() => {});
+ await page.locator("[data-ws-sheet-toggle]").click();
+ await expect(sheet).toHaveAttribute("data-ws-sheet", "closed");
+ const fit = await page.evaluate(() => document.documentElement.scrollWidth - window.innerWidth);
+ expect(fit).toBeLessThanOrEqual(0);
+});