diff --git a/site/e2e/playwright.config.ts b/site/e2e/playwright.config.ts index 359a5bca9b1bc..26eb0a7d42f9d 100644 --- a/site/e2e/playwright.config.ts +++ b/site/e2e/playwright.config.ts @@ -34,6 +34,9 @@ export default defineConfig({ use: { baseURL: `http://localhost:${port}`, video: "retain-on-failure", + launchOptions: { + args: ["--disable-webgl"], + }, }, webServer: { url: `http://localhost:${port}/api/v2/deployment/config`, diff --git a/site/e2e/tests/webTerminal.spec.ts b/site/e2e/tests/webTerminal.spec.ts index 9c4f283b80136..01d40c03d8a96 100644 --- a/site/e2e/tests/webTerminal.spec.ts +++ b/site/e2e/tests/webTerminal.spec.ts @@ -41,19 +41,18 @@ test("web terminal", async ({ context, page }) => { const terminal = await pagePromise; await terminal.waitForLoadState("domcontentloaded"); + const xtermRows = await terminal.waitForSelector("div.xterm-rows", { + state: "visible", + }); + // Ensure that we can type in it - await terminal.keyboard.type("echo hello"); + await terminal.keyboard.type("echo he${justabreak}llo"); await terminal.keyboard.press("Enter"); - const locator = terminal.locator("text=hello"); + // Check if "echo" command was executed + await xtermRows.waitForSelector('div:text-matches("hello")', { + state: "visible", + }); - for (let i = 0; i < 10; i++) { - const items = await locator.all(); - // Make sure the text came back - if (items.length === 2) { - break; - } - await new Promise((r) => setTimeout(r, 250)); - } await stopAgent(agent); });