-
Notifications
You must be signed in to change notification settings - Fork 676
Selector waits eternally for elements to appear when the date is mocked by using client scripts. #5447
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
Comments
i have a similar issue when i mock date object in test cafe, I guess the testcafe timeouts use the same object we are mocking? |
I'm having the same issue when I try to avoid external dependencies with mocks and I'm dealing with dates. I'm interested |
I'm also having the same issue with the mock dates. I'm also interested, this also happens on Linux Mint 19.3 Tricia |
im having the exact same issue |
I'm also having the same issue |
I'm also having the same issue! And I see I'm not the only one |
Hi @Thormod Thank you for the detailed information. I've reproduced the problem. |
@miherlosev Do you know when the new version will be released? PD: Thank you for solving this bug! |
A release candidate version |
@AndreyBelym @miherlosev There are some TypeErrors in the new version: Uncaught TypeError: Cannot read property 'destUrl' of null
at Function.t._sameOriginCheck (worker-hammerhead.js:1)
at r.fetch (worker-hammerhead.js:1)
at u (b54a5bd5-05e5-4a32-97e0-f1d459ace1fb:2)
at b54a5bd5-05e5-4a32-97e0-f1d459ace1fb:2
at xt (b54a5bd5-05e5-4a32-97e0-f1d459ace1fb:2)
at Object.bt [as getArrayBuffer] (b54a5bd5-05e5-4a32-97e0-f1d459ace1fb:2)
at l.s [as loadVectorData] (b54a5bd5-05e5-4a32-97e0-f1d459ace1fb:2)
at l.loadTile (b54a5bd5-05e5-4a32-97e0-f1d459ace1fb:2)
at ke.loadTile (b54a5bd5-05e5-4a32-97e0-f1d459ace1fb:2)
at __call$ (b54a5bd5-05e5-4a32-97e0-f1d459ace1fb:1) |
I cannot reproduce the issue with Wikipedia.org. But I created my own example, which demonstrates a very similar issue: DevExpress/testcafe-hammerhead#2428. The version with the fix is already published to NPM as |
@AndreyBelym It worked! Thank u for solving this so fast! |
What is your Test Scenario?
For my Integration tests, I need to mock the browser date and to accomplish that I'm using
clientScripts
injecting themockdate
module:For this issue, I created a small project that goes to Wikipedia and tries to search for something but using an incorrect selector:
What is the Current behavior?
When the tests execute
.click(Selector('#this-selector-does-not-exist'))
theSelector
get stuck waiting for the element to appear, ignoring the default (and setted) selector timeouts:What is the Expected behavior?
To raise an error specifying that the selector does not exist.
What is your web application and your TestCafe test code?
You can access the code here:
https://github.com/Thormod/testcafe-issue
Your website URL (or attach your complete example):
Your complete test code (or attach your test files):
Your complete configuration file (if any):
Your complete test report:
Screenshots:
Steps to Reproduce:
Just run
npm run test
on the example project, or mock theDate.now()
function by usingclientScript
Your Environment details:
testcafe chrome
The text was updated successfully, but these errors were encountered: