From 2f437e89781cb2b449abb685e36b26ca1cf0fff5 Mon Sep 17 00:00:00 2001 From: Pedro Del Gallego Date: Fri, 18 Jan 2013 21:24:07 -0800 Subject: feat(scenario): add mouseover method to the ngScenario dsl --- test/ngScenario/dslSpec.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test') diff --git a/test/ngScenario/dslSpec.js b/test/ngScenario/dslSpec.js index e955b017..28c9ffdc 100644 --- a/test/ngScenario/dslSpec.js +++ b/test/ngScenario/dslSpec.js @@ -347,6 +347,26 @@ describe("angular.scenario.dsl", function() { dealoc(elm); }); + it('should execute mouseover', function() { + var mousedOver; + doc.append('
'); + doc.find('div').mouseover(function() { + mousedOver = true; + }); + $root.dsl.element('div').mouseover(); + expect(mousedOver).toBe(true); + }); + + it('should bubble up the mouseover event', function() { + var mousedOver; + doc.append('
'); + doc.find('#outer').mouseover(function() { + mousedOver = true; + }); + $root.dsl.element('#inner').mouseover(); + expect(mousedOver).toBe(true); + }); + it('should count matching elements', function() { doc.append(''); $root.dsl.element('span').count(); -- cgit v1.2.3