Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions site/e2e/tests/webTerminal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,30 @@ test("web terminal", async ({ context, page }) => {
const terminal = await pagePromise;
await terminal.waitForLoadState("domcontentloaded");

const xtermRows = await terminal.waitForSelector("div.xterm-rows", {
await terminal.waitForSelector("div.xterm-rows", {
state: "visible",
});

// Ensure that we can type in it
await terminal.keyboard.type("echo he${justabreak}llo");
await terminal.keyboard.type("echo he${justabreak}llo123456");
await terminal.keyboard.press("Enter");

// Check if "echo" command was executed
await xtermRows.waitForSelector('div:text-matches("hello")', {
state: "visible",
});
// try-catch is used temporarily to find the root cause: https://github.com/coder/coder/actions/runs/6176958762/job/16767089943
try {
await terminal.waitForSelector(
'div.xterm-rows div:text-matches("hello123456")',
{
state: "visible",
timeout: 10 * 1000,
},
);
} catch (error) {
const pageContent = await terminal.content();
// eslint-disable-next-line no-console -- Let's see what is inside of xterm-rows
console.log("Unable to find echoed text:", pageContent);
throw error;
}

await stopAgent(agent);
});
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy