EventTarget.prototype.addEventListener is not overridden
See original GitHub issueWhat is your Test Scenario?
I’d like to test, whether screen size is bigger then 800px;
What is the Current behavior?
It works properly in regular browser (chrome without testcafe), but it does not when running testcafe test.
What is the Expected behavior?
My code should run consistently both in testcafe and in regular browser
What is your web application and your TestCafe test code?
https://github.com/bbonczek/testcafe-change-detection-issue
Steps to Reproduce:
You need to compare this app in regular browser and in testcafe browser. Clone repository and run
npm run install
Next thing you want to do is run application in normal browser. You can do it by running
npm run start
and navigating to localhost:4200
try to resize window, to change it’s height - you should see value switching beetween true and false:
You can see mp4 version here: https://ezgif.com/video-to-gif/ezgif-2-271f5333a3b8.mp4
Now let’s try to do the same, but in testcafe test. Don’t stop dev server. Open other console and run
npm run testcafe
Test will go into debug just after page loads. Click Unlock Page
and try resizing again- this time nothing will happen:
mp4 version is here:
https://ezgif.com/video-to-gif/ezgif-2-37d0daf5224f.mp4
Your Environment details:
- testcafe version: 0.23.3
- node.js version: v10.14.1
- command-line arguments: testcafe chrome e2e/testcafe-buggy-test.test.js
- browser name and version: Chrome 71.0.3578.98
- platform and version: Windows 10
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
Hello, @bbonczek. Thank you for your detailed description. I’ve reproduced this issue. Our team will research it and check for a suitable solution.
The issue seems to be connected to the
EventTarget
method patch:webpack:///./node_modules/zone.js/dist/zone.js
The test below is based on Chrome’s native behavior:
We will consider fixing this issue in future sprints.