DomEvent functions not covered by tests
See original GitHub issueWe have some DomEvent tests here: https://github.com/Leaflet/Leaflet/blob/master/spec/suites/dom/DomEventSpec.js, but not all functions are covered.
Here the list of lacking tests:
on(<HTMLElement> el, <String> types, <Function> fn, <Object> context?)
(wheretypes
has several events)on(<HTMLElement> el, <Object> eventMap, <Object> context?)
off(<HTMLElement> el, <String> types, <Function> fn, <Object> context?)
(wheretypes
has several events)off(<HTMLElement> el, <Object> eventMap, <Object> context?)
Note: some on
/off
tests implemented in #7125.
stop(<DOMEvent> ev)
getMousePosition(<DOMEvent> ev, <HTMLElement> container?)
getWheelDelta(<DOMEvent> ev)
Ref: https://leafletjs.com/reference-1.7.1.html#domevent
Note:
When implementing required test cases consider minor refactoring in #7438 (which already has tests for disableScrollPropagation
and disableClickPropagation
).
Related:
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Passing a mock DOM event to component method in Angular ...
I cannot find a way to pass the event object to the method in the unit test case for example: test('it should call...
Read more >Listen To The Application Events From Cypress Tests
This blog post shows how to receive the custom DOM events and jQuery events. In every case, it is important to set up...
Read more >Testing Components – Testing Angular
Introduction to testing Angular Components with Angular's TestBed. ... that triggerEventHandler does not dispatch a synthetic DOM event.
Read more >.dispatchEvent() | TestController | Test API | API | Docs
dispatchEvent method in Internet Explorer, since IE does not support event constructors. Fires a DOM event at the specified target . Use the...
Read more >Component testing scenarios - Angular
There is no nested syntax (like a Promise.then() ) to disrupt the flow of control. Limitation: The fakeAsync() function won't work if the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
See also #7126.
Ok, #7453 is up and based on #7438 but it seems like I cannot link that PR to this issue