Skip to content

Commit 48737c4

Browse files
authored
Merge pull request patternfly#272 from priley86/fix-tests
bootstrap-select tests
2 parents a78c4d6 + b26e571 commit 48737c4

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ module.exports = function (grunt) {
129129
'lib/bootstrap-combobox/js/bootstrap-combobox.js',
130130
'lib/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',
131131
'lib/bootstrap-select/js/bootstrap-select.js',
132-
'lib/bootstrap-treeview/src/js/bootstrap-treeview.js',
132+
'lib/patternfly-bootstrap-treeview/src/js/bootstrap-treeview.js',
133133
'lib/c3/c3.js',
134134
'lib/d3/d3.js',
135135
'lib/patternfly/dist/js/patternfly.js',

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"angular-sanitize": "1.3.0 - 1.5.*",
4040
"angular-bootstrap": "0.13.x",
4141
"lodash": "3.x",
42-
"patternfly": "~3.7.0"
42+
"patternfly": "~3.8.0"
4343
},
4444
"devDependencies": {
4545
"angular-mocks": "1.3.0 - 1.5.*"

test/charts/heatmap/heatmap.spec.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ describe('Directive: pfHeatmap', function() {
5454
expect(tooltip).toBe('Node 8 : My OpenShift Provider<br>96% : 96 Used of 100 Total<br>4 Available');
5555

5656
color = block.attr('style');
57-
expect(color.trim()).toBe('fill: #ce0000;');
57+
var result = color.trim() == 'fill: #ce0000;' || color.trim() == 'fill: rgb(206, 0, 0);';
58+
expect(result).toBe(true);
5859
});
5960

6061
it("should block color based on color pattern overrides", function() {
@@ -67,7 +68,9 @@ describe('Directive: pfHeatmap', function() {
6768
block = angular.element(element).find('.heatmap-pf-svg').children().first();
6869

6970
color = block.attr('style');
70-
expect(color.trim()).toBe('fill: #ff0000;');
71+
72+
var result = color.trim() == 'fill: #ff0000;' || color.trim() == 'fill: rgb(255, 0, 0);';
73+
expect(result).toBe(true);
7174
});
7275

7376
it("should set color based on threshold overrides", function() {
@@ -78,7 +81,9 @@ describe('Directive: pfHeatmap', function() {
7881
element = compileChart('<div pf-heatmap chart-title="title" data="data" legend-labels="legendLabels" heatmap-color-pattern="heatmapColorPattern" thresholds="thresholds"></div>',$scope);
7982
block = angular.element(element).find('.heatmap-pf-svg').children().first();
8083
color = block.attr('style');
81-
expect(color.trim()).toBe('fill: #ce0000;');
84+
85+
var result = color.trim() == 'fill: #ce0000;' || color.trim() == 'fill: rgb(206, 0, 0);';
86+
expect(result).toBe(true);
8287
});
8388

8489
it("should show a legend by default", function() {

test/select/select.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('pf-select', function () {
3030
expect(select.text()).toBe('abc');
3131
expect(select).toEqualSelect(['a', ['b'], 'c']);
3232

33-
var bsSelect = angular.element(select).siblings('.bootstrap-select');
33+
var bsSelect = angular.element(select).siblings('.dropdown-menu');
3434
var bsSelItems = bsSelect.find('li');
3535
expect(bsSelItems.length).toBe($scope.options.length);
3636
expect(bsSelItems.text()).toBe('abc');
@@ -49,7 +49,7 @@ describe('pf-select', function () {
4949
expect(select.text()).toBe('abc');
5050
expect(select).toEqualSelect([['a'], 'b', 'c']);
5151

52-
var bsSelect = angular.element(select).siblings('.bootstrap-select');
52+
var bsSelect = angular.element(select).siblings('.dropdown-menu');
5353
var bsSelItems = bsSelect.find('li');
5454
expect(bsSelItems.length).toBe($scope.options.length);
5555
expect(bsSelItems.text()).toBe('abc');
@@ -63,7 +63,7 @@ describe('pf-select', function () {
6363
expect(select.text()).toBe('abcd');
6464
expect(select).toEqualSelect([['a'], 'b', 'c', 'd']);
6565

66-
bsSelect = angular.element(select).siblings('.bootstrap-select');
66+
bsSelect = angular.element(select).siblings('.dropdown-menu');
6767
bsSelItems = bsSelect.find('li');
6868
expect(bsSelItems.length).toBe($scope.options.length);
6969
expect(bsSelItems.text()).toBe('abcd');
@@ -78,7 +78,7 @@ describe('pf-select', function () {
7878
expect(select.text()).toBe('abc');
7979
expect(select).toEqualSelect([['a'], 'b', 'c']);
8080

81-
var bsSelect = angular.element(select).siblings('.bootstrap-select');
81+
var bsSelect = angular.element(select).siblings('.dropdown-menu');
8282
var bsSelItems = bsSelect.find('li');
8383
expect(bsSelItems.length).toBe($scope.options.length);
8484
expect(bsSelItems.text()).toBe('abc');

0 commit comments

Comments
 (0)