and also for changing jquery selections to d3 selections:
$('.foo').d3().selectAll('.bar');
Used those to fix the broken test. Tried to get the test fixes to work without the test utils and couldn't seem to get that right, so I'm guessing there were two issues:
there was no endpoint4
d3 event simulation wasn't working
I might make a new PR for using these test utils to move over the current tests where we are doing things like .trigger('vumigo:dragstart', ...), but that might take a bit more work than its worth. At the very least, I'll try clean up and test the setup code that is making that possible (in a different PR to this one).
@andreit ready for review
I added test utils for simulating events with d3:
and also for changing jquery selections to d3 selections:
Used those to fix the broken test. Tried to get the test fixes to work without the test utils and couldn't seem to get that right, so I'm guessing there were two issues:
endpoint4
I might make a new PR for using these test utils to move over the current tests where we are doing things like
.trigger('vumigo:dragstart', ...)
, but that might take a bit more work than its worth. At the very least, I'll try clean up and test the setup code that is making that possible (in a different PR to this one).