commit 6886eb160dd5311164288f2547f49aa41cf90de9
parent 0e7cf8157cfc88e54d146d5b1c1196262f75da85
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 10 Nov 2026 15:14:07 -0500
umtool e2e: a block's menu at phone width (390) opens inside the window, its ⋯ toggles it, and Play from here works; what is typed in a block's form survives the palette's page context arriving after it (the context's answer held until the typing is done) (L8b review 8)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 51 insertions(+), 0 deletions(-)
diff --git a/umtool/e2e/block-menus.spec.ts b/umtool/e2e/block-menus.spec.ts
@@ -290,3 +290,54 @@ test("links from a Rumble clip's menu writes the draft (target project): the run
await expect(page.locator("[data-ws-undo-said]")).toContainText("Undone");
await expect.poll(() => readFileSync(file, "utf8"), { timeout: 15_000 }).toBe(before);
});
+
+test("at phone width (390): the menu opens inside the window, its ⋯ toggles it, and it works", async ({ page }) => {
+ await page.setViewportSize({ width: 390, height: 844 });
+ await open(page);
+ // The inspector is a sheet at the bottom: folded, the strip is in reach.
+ await page.locator("[data-ws-sheet-toggle]").click();
+ await expect(page.locator("[data-ws-inspector]")).toHaveAttribute("data-ws-sheet", "closed");
+ await block(page, "c02").scrollIntoViewIfNeeded();
+ const more = page.locator('[data-ws-block-more="c02"]');
+ await more.click();
+ const menu = menuOf(page, "c02");
+ await expect(menu).toBeVisible();
+ const box = await menu.boundingBox();
+ expect(box!.x).toBeGreaterThanOrEqual(0);
+ expect(box!.x + box!.width).toBeLessThanOrEqual(390);
+ expect(box!.y).toBeGreaterThanOrEqual(0);
+ expect(box!.y + box!.height).toBeLessThanOrEqual(844);
+ await shot(page, "block-menu-phone");
+ // Its ⋯ again closes it (a toggle), and opens it again.
+ await more.click();
+ await expect(menu).toHaveCount(0);
+ await more.click();
+ await expect(menu).toBeVisible();
+ await menu.locator('[data-ws-menu-action="play"]').click();
+ await expect(menu).toHaveCount(0);
+ await expect(page.locator("[data-workspace]")).toHaveAttribute("data-ws-selected", "c02");
+});
+
+test("what is typed in a block's form survives the palette's page context arriving after it", async ({ page }) => {
+ await open(page);
+ let release: () => void = () => {};
+ const gate = new Promise<void>((r) => (release = r));
+ await page.route(/\/api\/cli\?path=/, async (route) => {
+ await gate;
+ await route.continue();
+ });
+ await block(page, "c01").click({ button: "right" });
+ await menuOf(page, "c01").locator('[data-ws-menu-verb="timeline teaser-insert"]').click();
+ const form = palette(page).locator('[data-cli-form="timeline teaser-insert"]');
+ await expect(form).toBeVisible();
+ await form.locator('[data-cli-arg="--line"] textarea').fill("Typed before the context");
+ // Now the page's context answers.
+ const answered = page.waitForResponse(/\/api\/cli\?path=/);
+ release();
+ await answered;
+ await page.evaluate(() => new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r))));
+ await expect(form.locator('[data-cli-arg="--line"] textarea')).toHaveValue("Typed before the context");
+ await expect(form.locator('[data-cli-arg="--after"] input')).toHaveValue("c01");
+ await page.keyboard.press("Escape");
+ await page.unroute(/\/api\/cli\?path=/);
+});