Skip to content

Commit 5fe300d

Browse files
committed
Fix integration test
1 parent 54619ae commit 5fe300d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/fixtures/charts.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@
3333
}, 0);
3434
}]);
3535

36-
app.controller('DoughnutCtrl', function ($scope) {
36+
app.controller('DoughnutCtrl', ['$scope', '$timeout', function ($scope, $timeout) {
3737
$scope.labels = ['Download Sales', 'In-Store Sales', 'Mail-Order Sales'];
38-
$scope.data = [350, 450, 100];
39-
});
38+
$scope.data = [0, 0, 0];
39+
// TODO: investigate why chart was not showing up without this hack
40+
$timeout(function () {
41+
$scope.data = [350, 450, 100];
42+
}, 0);
43+
}]);
4044

4145
app.controller('PieCtrl', ['$scope', '$timeout', function ($scope, $timeout) {
4246
$scope.labels = ['Download Sales', 'In-Store Sales', 'Mail Sales'];

0 commit comments

Comments
 (0)