Skip to content

The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.

test(e2e): wait for xterm to open before pasting into the terminal

l0ng-ai915fec598f16
diff --git a/e2e/terminal-clipboard.spec.ts b/e2e/terminal-clipboard.spec.ts
index 1127762f5..4e8e1d7df 100644
--- a/e2e/terminal-clipboard.spec.ts
+++ b/e2e/terminal-clipboard.spec.ts
@@ -29,6 +29,11 @@ test("local terminal stores clipboard media and pastes one shell-quoted argument
try {
session.attach(container);
await session.start();
+ // xterm opens on a later frame, once the pane has a size.
+ const openDeadline = Date.now() + 5000;
+ while (!container.querySelector("textarea") && Date.now() < openDeadline) {
+ await new Promise((resolve) => requestAnimationFrame(resolve));
+ }
const transfer = new DataTransfer();
transfer.items.add(new File([new Uint8Array([137, 80, 78, 71])], "image.png", { type: "image/png" }));
const event = new ClipboardEvent("paste", { bubbles: true, cancelable: true, clipboardData: transfer });