@devries-cameron20 / t3code Mirror · read-only / commits / e58d0e9f03
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 07:15 UTC

test(web): /side attachments test no longer types a key at a time (#38833)

Julius Marminge committed Nov 18, 2026 at 18:24 UTC e58d0e9f038dee7aef5f3ab9eb890031e1845b42
1 file changed +8 -3
apps/web/src/components/ChatView.browser.test.tsx
+8 -3
@@ -85,6 +85,9 @@ function acceptAttachmentUploads(): Disposable {
85 };
86 }
87
88 +// One input event, where typing a key at a time takes seconds on a loaded CI runner.
89 +const insertText = (text: string) => cdp().send("Input.insertText", { text });
90 +
91 /** Holds every call to `method` until `release`, then ends it with `end`, until disposed. */
92 function holdRpc<Input>(method: string, end: Effect.Effect<never, Error>) {
93 let release = () => {};
@@ -818,7 +821,8 @@ it("/side sends the draft's attachments and context, and keeps them when it does
821 new ClipboardEvent("paste", { clipboardData, bubbles: true, cancelable: true }),
822 );
823 await expect.element(image).toBeVisible();
821 - await userEvent.keyboard("/side what is this?{Enter}");
824 + await insertText("/side what is this?");
825 + await userEvent.keyboard("{Enter}");
826 await expect.element(image).not.toBeInTheDocument();
827 };
828 // The tab opens once the start finished; until then `/side` refuses another side chat.
@@ -848,7 +852,8 @@ it("/side sends the draft's attachments and context, and keeps them when it does
852 // A reply alone is enough to send.
853 await page.getByRole("button", { name: "Reply to this response" }).first().click();
854 await userEvent.click(editor);
851 - await userEvent.keyboard("/side {Enter}");
855 + await insertText("/side ");
856 + await userEvent.keyboard("{Enter}");
857 await sentMessage(
858 {
859 context: expect.objectContaining({
@@ -861,7 +866,7 @@ it("/side sends the draft's attachments and context, and keeps them when it does
866 // A failed start puts the message back after the draft typed meanwhile.
867 holdFork = true;
868 await sendImageToSideChat();
864 - await userEvent.keyboard("next draft");
869 + await insertText("next draft");
870 await vi.waitFor(() =>
871 expect(dispatchedCommands().filter((command) => command.type === "thread.fork")).toHaveLength(
872 3,