The best way to control Claude Code, Codex and more from any computer or phone

main
ts 32 lines 1.02 KB
Raw
1 import { expect } from "e2e";
2
3 import {
4 clickAt,
5 findHittableRow,
6 openFileSuggestionsUnderTallDraft,
7 openThreadWithManyFiles,
8 wheelSuggestions,
9 } from "./composer-menu.ts";
10 import { test, WEB } from "./t3.ts";
11
12 test(
13 "After the window shrinks, file suggestions wheel up to a first suggestion the pointer can pick",
14 WEB,
15 async ({ t3, app, browser, screen }) => {
16 await browser.setViewport({ width: 375, height: 500 });
17 await openThreadWithManyFiles(t3);
18 await openFileSuggestionsUnderTallDraft(browser, screen);
19 await browser.keyboard.press("Escape");
20 await browser.keyboard.press("Backspace");
21 await browser.keyboard.type("@");
22
23 await browser.setViewport({ width: 375, height: 300 });
24 await wheelSuggestions(browser, "up");
25 await app.screenshot("scrolled-to-top");
26 const first = await findHittableRow(browser, "first");
27 expect(first.point).not.toBeNull();
28
29 await clickAt(browser, first.point!);
30 await expect(screen.getByRole("textbox")).toContainText(first.label!);
31 },
32 );