aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShyam Seshadri2010-08-13 09:45:56 -0700
committerShyam Seshadri2010-08-13 09:45:56 -0700
commit2767d7773f2e480552e9968eded31bd2b08bec71 (patch)
tree542e0d22ec985da2cf93fa8a780d085263be9a24 /src
parent577ddaa5392dfad3b984515de0ad9262764a8721 (diff)
downloadangular.js-2767d7773f2e480552e9968eded31bd2b08bec71.tar.bz2
Revert click dsl, since what is returned by element is a jquery object
Diffstat (limited to 'src')
-rw-r--r--src/scenario/DSL.js35
1 files changed, 12 insertions, 23 deletions
diff --git a/src/scenario/DSL.js b/src/scenario/DSL.js
index ca944014..a64f8548 100644
--- a/src/scenario/DSL.js
+++ b/src/scenario/DSL.js
@@ -103,28 +103,17 @@ angular.scenario.dsl.repeater = function(selector) {
angular.scenario.dsl.element = function(selector) {
var nameSuffix = "element '" + selector + "'";
- return {
- find: function() {
- return $scenario.addFuture('Find ' + nameSuffix, function(done) {
- var self = this, repeaterArray = [], ngBindPattern;
- var startIndex = selector.search(angular.scenario.dsl.NG_BIND_PATTERN);
- if (startIndex >= 0) {
- ngBindPattern = selector.substring(startIndex + 2, selector.length - 2);
- var element = this.testDocument.find('*').filter(function() {
- return self.jQuery(this).attr('ng:bind') == ngBindPattern;
- });
- done(element);
- } else {
- done(this.testDocument.find(selector));
- }
- });
- },
- click: function() {
- var self = this;
- return $scenario.addFuture('Click ' + nameSuffix, function(done) {
- _jQuery(self).click();
- done();
- });
+ return $scenario.addFuture('Find ' + nameSuffix, function(done) {
+ var self = this, repeaterArray = [], ngBindPattern;
+ var startIndex = selector.search(angular.scenario.dsl.NG_BIND_PATTERN);
+ if (startIndex >= 0) {
+ ngBindPattern = selector.substring(startIndex + 2, selector.length - 2);
+ var element = this.testDocument.find('*').filter(function() {
+ return self.jQuery(this).attr('ng:bind') == ngBindPattern;
+ });
+ done(element);
+ } else {
+ done(this.testDocument.find(selector));
}
- };
+ });
};