diff options
| author | Pedro Del Gallego | 2013-01-18 21:24:07 -0800 |
|---|---|---|
| committer | Misko Hevery | 2013-01-18 21:24:57 -0800 |
| commit | 2f437e89781cb2b449abb685e36b26ca1cf0fff5 (patch) | |
| tree | 76e5e6bb84750894e4bfae1a525fdab89d15df86 /src/ngScenario/dsl.js | |
| parent | faf02f0c4db7962f863b0da2a82c8cafab2c706f (diff) | |
| download | angular.js-2f437e89781cb2b449abb685e36b26ca1cf0fff5.tar.bz2 | |
feat(scenario): add mouseover method to the ngScenario dsl
Diffstat (limited to 'src/ngScenario/dsl.js')
| -rw-r--r-- | src/ngScenario/dsl.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ngScenario/dsl.js b/src/ngScenario/dsl.js index 81d74233..9d46e0cf 100644 --- a/src/ngScenario/dsl.js +++ b/src/ngScenario/dsl.js @@ -327,6 +327,7 @@ angular.scenario.dsl('select', function() { * Usage: * element(selector, label).count() get the number of elements that match selector * element(selector, label).click() clicks an element + * element(selector, label).mouseover() mouseover an element * element(selector, label).query(fn) executes fn(selectedElements, done) * element(selector, label).{method}() gets the value (as defined by jQuery, ex. val) * element(selector, label).{method}(value) sets the value (as defined by jQuery, ex. val) @@ -383,6 +384,14 @@ angular.scenario.dsl('element', function() { }); }; + chain.mouseover = function() { + return this.addFutureAction("element '" + this.label + "' mouseover", function($window, $document, done) { + var elements = $document.elements(); + elements.trigger('mouseover'); + done(); + }); + }; + chain.query = function(fn) { return this.addFutureAction('element ' + this.label + ' custom query', function($window, $document, done) { fn.call(this, $document.elements(), done); |
