























@@ -105,11 +105,14 @@ describe("qa web runtime", () => {
105105expect(launch).toHaveBeenCalledWith(
106106expect.objectContaining({ channel: "chrome", headless: true }),
107107);
108-expect(goto).toHaveBeenCalledWith("http://127.0.0.1:3000/chat", expect.any(Object));
109-expect(pageWaitForSelector).toHaveBeenCalledWith("textarea", expect.any(Object));
108+expect(goto).toHaveBeenCalledWith("http://127.0.0.1:3000/chat", {
109+waitUntil: "domcontentloaded",
110+timeout: 20_000,
111+});
112+expect(pageWaitForSelector).toHaveBeenCalledWith("textarea", { timeout: 20_000 });
110113expect(pageWaitForFunction).toHaveBeenCalled();
111-expect(locatorFill).toHaveBeenCalledWith("hello", expect.any(Object));
112-expect(locatorPress).toHaveBeenCalledWith("Enter", expect.any(Object));
114+expect(locatorFill).toHaveBeenCalledWith("hello", { timeout: 20_000 });
115+expect(locatorPress).toHaveBeenCalledWith("Enter", { timeout: 20_000 });
113116expect(snapshot.text).toBe("hello");
114117expect(evaluated).toBe("ok");
115118expect(contextClose).toHaveBeenCalledTimes(1);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。