-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blacklistHosts configuration not working with chrome #1154
Comments
This is a known issue that we just haven't had time to fix yet. I wrote these tests and they could be better. However, this has nothing to do with |
Closing because this is an issue with the recipes, not Cypress itself. |
After investigating it does appear that |
One more pointer, blacklist hosts work with chrome on cypress 1.2.0(we found it out recently) |
I figured out the root cause and will post back here with more information shortly. |
The root cause of this has to do with browser caching to disk. What's happening in the Recipes is that because we utilize the same Cypress profile in between runs - that a previous test was first causing a request to Then the browser would then cache the response to disk. In subsequent runs of the browser, the Cache had not expired yet - so instead of making a real HTTP request to the server (which would have been blacklisted), the browser serves the file immediately from the disk cache. We're going to be updating Cypress to automatically clear the disk cache whenever the browser is first spawned. The related issue is here: #1124 |
Unbelievable find, great work!
…Sent from my iPhone
On Feb 13, 2018, at 23:52, Brian Mann ***@***.***> wrote:
The root cause of this has to do with browser caching to disk.
What's happening in the Recipes is that because we utilize the same Cypress profile in between runs - that a previous test was first causing a request to https://www.google-analytics.com/analytics.js.
Then the browser would then cache the response to disk.
In subsequent runs of the browser, the Cache had not expired yet - so instead of making a real HTTP request to the server (which would have been blacklisted), the browser serves the file immediately from the disk cache.
We're going to be updating Cypress to automatically clear the disk cache whenever the browser is first spawned.
The related issue is here: #1124
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Fixed by #1310 |
Released in |
Is this a Feature or Bug?
Bug
Current behaviour:
https://docs.cypress.io/guides/references/configuration.html#blacklistHosts
blacklistHosts works well with Electron but isn't working with chrome.
i.e. - wouldn't block desired websites if we are using chrome for testing
Desired behavior:
blacklistHosts should work well with all browsers
How to reproduce:
npm run cypress:open
and selectstubbing-spying__google-analytics
Test code:
Additional Info (images, stack traces, etc)
The text was updated successfully, but these errors were encountered: