We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 679aea4 commit a72fcb4Copy full SHA for a72fcb4
1 file changed
app/js/timer.js
@@ -74,8 +74,11 @@ angular.module('timer', [])
74
$scope.seconds = Math.floor(($scope.millis / 1000) % 60);
75
$scope.minutes = Math.floor((($scope.millis / (1000 * 60)) % 60));
76
$scope.hours = Math.floor((($scope.millis / (1000 * 60 * 60)) % 24));
77
- $scope.timeoutId = $timeout(function () {
+ // Workaround to allow e2e tests ,we can't use $timout which make the
78
+ // e2e to hang
79
+ $scope.timeoutId = setTimeout(function() {
80
tick();
81
+ $scope.$apply();
82
}, $scope.interval);
83
84
$scope.$emit('timer-tick', {timeoutId: $scope.timeoutId, millis: $scope.millis});
0 commit comments