【发布时间】:2021-08-14 13:38:20
【问题描述】:
当我使用命令“page.waitForResponse”时,我的编剧测试从未通过。虽然执行了 API 调用,并且可以在 chrome 的网络选项卡中看到。我将 jest 超时设置为 30000,但这似乎不是问题。
it("Test", async () => {
await page.goto("http://localhost:8080/")
await Promise.all([
await page.waitForResponse("https://development/my/call", {
timeout: 1000,
}),
page.click("css=body")
])
})
网络
url: https://development/my/call
Status: 200
Type: xhr
错误
Async callback was not invoked within the 30000 ms timeout specified by jest.setTimeout.Error
【问题讨论】:
标签: reactjs playwright