Using official guideline from cypress how to go in offline mode
https://www.cypress.io/blog/2020/11/12/testing-application-in-offline-network-mode/
I got this error =>
Your callback function returned a promise that never resolved.
The callback function was:
() => {
return Cypress.automation('remote:debugger:protocol', {
command: 'Network.emulateNetworkConditions',
params: {
offline: true,
latency: -1,
downloadThroughput: -1,
uploadThroughput: -1
}
});
}
Maybe someone can help me?
It looks like known issue in Cypress versions starting from 7.3.0: https://github.com/cypress-io/cypress/issues/235#issuecomment-1009912083
As a workaround try using Electron instead of Chrome, it works for me.