javascript - Jasmine Test for ng-mouseenter -
I'm having trouble testing my directions with the NG-MouseSenter directive.
I like it
Description (describe 'hover tests'), function () (this (' triggered popover The method should be called on the hover ', function () {spyOn ($ scope,' triggeropopover '); var ars = jQuery (view.find (' article.the-class-im- (- 'looking for' -) ); jQuery (ARS [0]) Trigger ('mouseenter'); Hopefully ($ scope.triggerPopover) .tohaveBeenCalled ();});}); Usage:
& lt; article my-directive ng-mouseenter = "trigger popova ();" & gt; & lt; / article & gt; < p> Result: Expected Detective The ng-mouse arrow content has been called.
does not seem to call If you are using Fimentmos S for some of your tests, some mouse events that work in common browsers will not work. If this is actually the case, then you can run your test with Chrome or Firefox, or Alternately similar to the related question Can implement the solution.
Comments
Post a Comment