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

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -