We are making tests over a product which uses workers. One of which fetches an url with a location grabbed by self.location.origin.
As testcafe works over the proxy, that self.location.origin returns the testcafe proxy url and not the host of where the website is at. I believe testcafe overrides most window.location methods to return the real host of where the page is located, but it seems self.location were not overriden.
self.location.origin should return the real hosts origin where the testing page is being tested.
I've reproduced the issue. It looks like we don't override WorkerLocation. Thank you for bringing this issue to our attention.
For team:
Steps for reproducing the issue:
ServiceWorkerGlobalScope instance with WorkerLocation properties that are not overwritten:
This is the repository with the code.
Thanks!! Just checked also and that seems to be the problem , thanks for the fast response!
We upgraded to testcafe 1.8.7 to be prepared for future updates though we faced a problem upgrading.
On 1.8.6 everything worked just fine but on 1.8.7 one of our main website components failed to load with a script error.
I created issue : https://github.com/DevExpress/testcafe-hammerhead/issues/2368 for the same matter
Thanks for the support!
Hello,
Thank you for the update and for creating an issue for the bug you found. We appreciate your contribution.
Most helpful comment
I've reproduced the issue. It looks like we don't override WorkerLocation. Thank you for bringing this issue to our attention.
For team:
Steps for reproducing the issue:
ServiceWorkerGlobalScopeinstance withWorkerLocationproperties that are not overwritten:This is the repository with the code.