diff options
| author | Andres Ornelas | 2010-08-05 15:44:54 -0700 | 
|---|---|---|
| committer | Andres Ornelas | 2010-08-05 15:44:54 -0700 | 
| commit | 643b43ffe5bd481b129484828fb35e2ab71a7d4c (patch) | |
| tree | a7f190a22ff1a12fcce4a4412daf1310f8ca98f0 | |
| parent | 6d0eeda1e231d0fbe515ce4cea8bf6245e1b72d3 (diff) | |
| download | angular.js-643b43ffe5bd481b129484828fb35e2ab71a7d4c.tar.bz2 | |
Added new files to Rakefile and consistently used .addFuture
| -rw-r--r-- | Rakefile | 4 | ||||
| -rw-r--r-- | src/scenario/DSL.js | 10 | 
2 files changed, 6 insertions, 8 deletions
@@ -45,8 +45,10 @@ task :compile_scenario do        src/apis.js \        src/services.js \        src/AngularPublic.js \ -      src/scenario/Runner.js \        src/scenario/DSL.js \ +      src/scenario/Future.js \ +      src/scenario/Matcher.js \ +      src/scenario/Runner.js \        src/scenario/angular.suffix \      )    css = %x(cat css/angular-scenario.css) diff --git a/src/scenario/DSL.js b/src/scenario/DSL.js index ef2f5553..944ca6f5 100644 --- a/src/scenario/DSL.js +++ b/src/scenario/DSL.js @@ -20,15 +20,11 @@ angular.scenario.dsl.browser = {    }  }; -function future(name, behavior) { -  return new Future(name, behavior); -}; -  angular.scenario.dsl.input = function(selector) {    var namePrefix = "input '" + selector + "'";    return {      enter: function(value) { -      return future(namePrefix + " enter '" + value + "'", function(done) { +    $scenario.addFuture(namePrefix + " enter '" + value + "'", function(done) {          var input = this.testDocument.find('input[name=' + selector + ']');          input.val(value);          this.testWindow.angular.element(input[0]).trigger('change'); @@ -36,7 +32,7 @@ angular.scenario.dsl.input = function(selector) {        });      },      select: function(value) { -      return future(namePrefix + " select '" + value + "'", function(done) { +      $scenario.addFuture(namePrefix + " select '" + value + "'", function(done) {          var input = this.testDocument.            find(':radio[name$=@' + selector + '][value=' + value + ']');          jqLiteWrap(input[0]).trigger('click'); @@ -51,7 +47,7 @@ angular.scenario.dsl.repeater = function(selector) {    var namePrefix = "repeater '" + selector + "'";    return {      count: function() { -      return future(namePrefix + ' count', function(done) { +    $scenario.addFuture(namePrefix + ' count', function(done) {            done(this.testDocument.find(selector).size());        });      }  | 
