aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario/dsl.js
diff options
context:
space:
mode:
authorDi Peng2011-06-03 15:22:43 -0700
committerDi Peng2011-06-05 12:00:45 -0700
commit1eebb771e3940ddd6640ddc064d5fa6e539c536d (patch)
treee9dd762dcfd512837646ac95deacd334bc766ffc /src/scenario/dsl.js
parent9250fce19c39203c702f22fde43724e1a7a19544 (diff)
downloadangular.js-1eebb771e3940ddd6640ddc064d5fa6e539c536d.tar.bz2
renamed $pause to $sleep AND $wait to $pause
Closes #207
Diffstat (limited to 'src/scenario/dsl.js')
-rw-r--r--src/scenario/dsl.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/scenario/dsl.js b/src/scenario/dsl.js
index 13101fe9..9bd0caf7 100644
--- a/src/scenario/dsl.js
+++ b/src/scenario/dsl.js
@@ -4,12 +4,12 @@
/**
* Usage:
- * wait() waits until you call resume() in the console
+ * pause() pauses until you call resume() in the console
*/
-angular.scenario.dsl('wait', function() {
+angular.scenario.dsl('pause', function() {
return function() {
- return this.addFuture('waiting for you to resume', function(done) {
- this.emit('InteractiveWait', this.spec, this.step);
+ return this.addFuture('pausing for you to resume', function(done) {
+ this.emit('InteractivePause', this.spec, this.step);
this.$window.resume = function() { done(); };
});
};
@@ -17,11 +17,11 @@ angular.scenario.dsl('wait', function() {
/**
* Usage:
- * pause(seconds) pauses the test for specified number of seconds
+ * sleep(seconds) pauses the test for specified number of seconds
*/
-angular.scenario.dsl('pause', function() {
+angular.scenario.dsl('sleep', function() {
return function(time) {
- return this.addFuture('pause for ' + time + ' seconds', function(done) {
+ return this.addFuture('sleep for ' + time + ' seconds', function(done) {
this.$window.setTimeout(function() { done(null, time * 1000); }, time * 1000);
});
};