aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPedro Del Gallego2013-01-18 21:24:07 -0800
committerMisko Hevery2013-01-18 21:24:57 -0800
commit2f437e89781cb2b449abb685e36b26ca1cf0fff5 (patch)
tree76e5e6bb84750894e4bfae1a525fdab89d15df86 /test
parentfaf02f0c4db7962f863b0da2a82c8cafab2c706f (diff)
downloadangular.js-2f437e89781cb2b449abb685e36b26ca1cf0fff5.tar.bz2
feat(scenario): add mouseover method to the ngScenario dsl
Diffstat (limited to 'test')
-rw-r--r--test/ngScenario/dslSpec.js20
1 files changed, 20 insertions, 0 deletions
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('<div></div>');
+ 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('<div id="outer"><div id="inner"></div></div>');
+ doc.find('#outer').mouseover(function() {
+ mousedOver = true;
+ });
+ $root.dsl.element('#inner').mouseover();
+ expect(mousedOver).toBe(true);
+ });
+
it('should count matching elements', function() {
doc.append('<span></span><span></span>');
$root.dsl.element('span').count();