aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngScenario/dsl.js
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 /src/ngScenario/dsl.js
parentfaf02f0c4db7962f863b0da2a82c8cafab2c706f (diff)
downloadangular.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.js9
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);