Update step.timeout to have the same params as onStepTimeout
Showing
2 changed files
with
2 additions
and
2 deletions
... | @@ -437,7 +437,7 @@ Emitted when a navigation step has been started. | ... | @@ -437,7 +437,7 @@ Emitted when a navigation step has been started. |
437 | ``step.timeout`` | 437 | ``step.timeout`` |
438 | ~~~~~~~~~~~~~~~~ | 438 | ~~~~~~~~~~~~~~~~ |
439 | 439 | ||
440 | **Arguments:** ``None`` | 440 | **Arguments:** ``[step, timeout]`` |
441 | 441 | ||
442 | Emitted when a navigation step has been executed. | 442 | Emitted when a navigation step has been executed. |
443 | 443 | ... | ... |
... | @@ -1504,7 +1504,7 @@ Casper.prototype.runStep = function runStep(step) { | ... | @@ -1504,7 +1504,7 @@ Casper.prototype.runStep = function runStep(step) { |
1504 | var stepTimeoutCheckInterval = setInterval(function _check(self, start, stepNum) { | 1504 | var stepTimeoutCheckInterval = setInterval(function _check(self, start, stepNum) { |
1505 | if (new Date().getTime() - start > self.options.stepTimeout) { | 1505 | if (new Date().getTime() - start > self.options.stepTimeout) { |
1506 | if (getCurrentSuiteId(self) === stepNum) { | 1506 | if (getCurrentSuiteId(self) === stepNum) { |
1507 | self.emit('step.timeout'); | 1507 | self.emit('step.timeout', stepNum, self.options.onStepTimeout); |
1508 | if (utils.isFunction(self.options.onStepTimeout)) { | 1508 | if (utils.isFunction(self.options.onStepTimeout)) { |
1509 | self.options.onStepTimeout.call(self, self.options.stepTimeout, stepNum); | 1509 | self.options.onStepTimeout.call(self, self.options.stepTimeout, stepNum); |
1510 | } | 1510 | } | ... | ... |
-
Please register or sign in to post a comment