angularjs - Angular test - DOM updating on element click -
i have test , before test i'm doing such stuff. - going element - hovering element , small tooltip 2 button gonna show - i'm clicking on 1 of buttons , modal
var fireevent = function(element, event) { if (element.fireevent) { element.fireevent('on' + event); } else { var evobj = document.createevent('events'); evobj.initevent(event, true, false); element.dispatchevent(evobj); } }; beforeeach(function(){ browser().navigateto('/'); sleep(5); var promise = function() { element('.browse-packshot-item').query(function(elements, done) { var first_element = elements.eq(0); fireevent(first_element[0],'mouseover'); sleep(2); element('#browse-packshots-flyout .browse-packshots-flyout-action').click(); done(); }); }; promise(); });
my question are: - seem lots going on in before have test if there elements in model window , action must take place before. - can guide me better solution - maybe use angular events on elements rather looking elements?
cheers,
Comments
Post a Comment