使用 cypress 的官方指南如何进入离线模式
https://www.cypress.io/blog/2020/11/12/testing-application-in-offline-network-mode/
我遇到了这个错误=>
您的回调函数返回了一个从 Unresolved promise 。
回调函数是:
() => {
return Cypress.automation('remote:debugger:protocol', {
command: 'Network.emulateNetworkConditions',
params: {
offline: true,
latency: -1,
downloadThroughput: -1,
uploadThroughput: -1
}
});
}
也许有人可以帮助我?
最佳答案
这看起来像是从 7.3.0 开始的 Cypress 版本中的已知问题: https://github.com/cypress-io/cypress/issues/235#issuecomment-1009912083
作为一种解决方法,尝试使用 Electron 而不是 Chrome,它对我有用。
关于javascript - 使用 cypress 转移到离线模式返回了一个从 Unresolved promise ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70742901/