You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The webkit and Firefox tests for "works offline when immediately setting browser to offline" fail, while the chrome version succeeds.
Additional context
I am not sure which behavior is correct. I ran in to this while trying to test an app in "offline mode" where I only allowed localhost requests and everything else failed. I also set context.setOffline(true) in order to trigger the navigator.online flag which my app uses internally. However, both webkit and firefox fail when setting them to offline before loading a page.
In addition, if you use the "show browsers" option, any subsequent tests will fail for Webkit after the "works offline when immediately setting browser to offline" test. This might be because the webkit browser is actually running into a bug itself.
In any case, I would expect these to behave the same across browsers. In addition, it might be useful to update the docs with instructions about how to test this scenario. I have included a working example using page.addlistener("load") to set the network offline only after the page loads.
Version
1.49.1
Steps to reproduce
npm install
npm run test
Expected behavior
All tests pass
Actual behavior
The webkit and Firefox tests for "works offline when immediately setting browser to offline" fail, while the chrome version succeeds.
Additional context
I am not sure which behavior is correct. I ran in to this while trying to test an app in "offline mode" where I only allowed
localhost
requests and everything else failed. I also setcontext.setOffline(true)
in order to trigger thenavigator.online
flag which my app uses internally. However, both webkit and firefox fail when setting them to offline before loading a page.In addition, if you use the "show browsers" option, any subsequent tests will fail for Webkit after the "works offline when immediately setting browser to offline" test. This might be because the webkit browser is actually running into a bug itself.
In any case, I would expect these to behave the same across browsers. In addition, it might be useful to update the docs with instructions about how to test this scenario. I have included a working example using
page.addlistener("load")
to set the network offline only after the page loads.Environment
The text was updated successfully, but these errors were encountered: