Upgrade to 0.7.26 breaks d3-drag
See original GitHub issueAfter upgrading from 0.7.25, our tests started failing. It was really difficult to track down, but it seems to be related to changes in this addon.
Basically, we started getting a lot of errors like this:
Uncaught TypeError: Cannot read property \'document\' of null at http://localhost:7357/assets/vendor.js, line 78363'
This seems to be tied to the click
helper and https://github.com/d3/d3-drag.
Which somehow failed here: (it’s hard to say exactly since this was always minified in our app, but we tried to trace the steps as good as possible): https://github.com/d3/d3-drag/blob/ec20d5e35bfc6ad2b4266494aef475c94cc2e6c3/src/nodrag.js#L16
Which is called here: https://github.com/d3/d3-drag/blob/ec20d5e35bfc6ad2b4266494aef475c94cc2e6c3/src/drag.js#L74 (or, I guess it could also have been this code: https://github.com/d3/d3-drag/blob/ec20d5e35bfc6ad2b4266494aef475c94cc2e6c3/src/drag.js#L55)
Basically, our test just did this:
await click('[data-test-d3-circle-element]');
Which lead it to blow up. It works if I do it manually, it seems the click
listener has somehow changed to break d3. This used to work fine in 0.7.25.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
Hmm. This is a tad tricky to quickly debug since there are so many changes included between 0.7.25 and 0.7.26.
My guess (from the symptoms reported) is that its related to #387 somehow. I’ll try to clone the reproduction and step through…
@ember/test-helpers 0.7.27 published 🎉