From e8c76de8e04600800bb6eadbbc9f124a94174dbb Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 9 May 2026 06:00:09 +0100 Subject: [PATCH] test: tighten qa web runtime options --- extensions/qa-lab/src/web-runtime.test.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/extensions/qa-lab/src/web-runtime.test.ts b/extensions/qa-lab/src/web-runtime.test.ts index df819c81d28..b919979c145 100644 --- a/extensions/qa-lab/src/web-runtime.test.ts +++ b/extensions/qa-lab/src/web-runtime.test.ts @@ -105,11 +105,14 @@ describe("qa web runtime", () => { expect(launch).toHaveBeenCalledWith( expect.objectContaining({ channel: "chrome", headless: true }), ); - expect(goto).toHaveBeenCalledWith("http://127.0.0.1:3000/chat", expect.any(Object)); - expect(pageWaitForSelector).toHaveBeenCalledWith("textarea", expect.any(Object)); + expect(goto).toHaveBeenCalledWith("http://127.0.0.1:3000/chat", { + waitUntil: "domcontentloaded", + timeout: 20_000, + }); + expect(pageWaitForSelector).toHaveBeenCalledWith("textarea", { timeout: 20_000 }); expect(pageWaitForFunction).toHaveBeenCalled(); - expect(locatorFill).toHaveBeenCalledWith("hello", expect.any(Object)); - expect(locatorPress).toHaveBeenCalledWith("Enter", expect.any(Object)); + expect(locatorFill).toHaveBeenCalledWith("hello", { timeout: 20_000 }); + expect(locatorPress).toHaveBeenCalledWith("Enter", { timeout: 20_000 }); expect(snapshot.text).toBe("hello"); expect(evaluated).toBe("ok"); expect(contextClose).toHaveBeenCalledTimes(1);