Skip to content

Commit b0e8a96

Browse files
committed
Use other utilization than 50% for bar chart test
When using 50% utilization in bar chart test, it is not possible to properly differentiate between remaining and actual values. This patch changes to 80% utilization.
1 parent 426d619 commit b0e8a96

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/charts/utilization-bar/utilization-bar.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('Directive: pfUtilizationBarChart', function() {
1717

1818
$scope.data = {
1919
'used': '8',
20-
'total': '16'
20+
'total': '10'
2121
};
2222

2323
$scope.title = 'CPU Usage';
@@ -33,22 +33,22 @@ describe('Directive: pfUtilizationBarChart', function() {
3333
return el;
3434
};
3535

36-
it("should set the width of the inner bar to be 50%", function() {
36+
it("should set the width of the inner bar to be 80%", function() {
3737
utilizationBar = angular.element(element).find('.progress-bar').css('width');
38-
expect(utilizationBar).toBe("50%");
38+
expect(utilizationBar).toBe("80%");
3939
});
4040

4141
it("should set the charts title and usage label", function() {
4242
title = angular.element(element).find('.progress-description').html();
4343
expect(title).toBe("CPU Usage");
4444

4545
subTitle = angular.element(element).find('.progress-bar span').text();
46-
expect(subTitle).toBe("8 of 16 GB Used");
46+
expect(subTitle).toBe("8 of 10 GB Used");
4747

4848
//test 'percent' used-label-format
4949
element = compileChart("<div pf-utilization-bar-chart chart-data=data footer-label-format='percent' chart-title=title units=units></div>", $scope);
5050
subTitle = angular.element(element).find('.progress-bar span').text();
51-
expect(subTitle).toBe("50% Used");
51+
expect(subTitle).toBe("80% Used");
5252
});
5353

5454
it("should set the layout to be 'inline', and use custom widths", function() {

0 commit comments

Comments
 (0)