@@ -13,12 +13,12 @@ describe('progressbar directive with no binding', function () {
13
13
expect ( element . hasClass ( 'progress' ) ) . toBe ( true ) ;
14
14
} ) ;
15
15
16
- it ( 'contains one child element with "bar" css class' , function ( ) {
16
+ it ( 'contains one child element with "progress- bar" css class' , function ( ) {
17
17
expect ( element . children ( ) . length ) . toBe ( 1 ) ;
18
- expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'bar' ) ) . toBe ( true ) ;
18
+ expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
19
19
} ) ;
20
20
21
- it ( 'has a "bar" element with expected width' , function ( ) {
21
+ it ( 'has a "progress- bar" element with expected width' , function ( ) {
22
22
expect ( element . children ( ) . eq ( 0 ) . css ( 'width' ) ) . toBe ( '22%' ) ;
23
23
} ) ;
24
24
} ) ;
@@ -39,12 +39,12 @@ describe('progressbar directive with data-binding', function () {
39
39
expect ( element . hasClass ( 'progress' ) ) . toBe ( true ) ;
40
40
} ) ;
41
41
42
- it ( 'contains one child element with "bar" css class' , function ( ) {
42
+ it ( 'contains one child element with "progress- bar" css class' , function ( ) {
43
43
expect ( element . children ( ) . length ) . toBe ( 1 ) ;
44
- expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'bar' ) ) . toBe ( true ) ;
44
+ expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
45
45
} ) ;
46
46
47
- it ( 'has a "bar" element with expected width' , function ( ) {
47
+ it ( 'has a "progress- bar" element with expected width' , function ( ) {
48
48
expect ( element . children ( ) . eq ( 0 ) . css ( 'width' ) ) . toBe ( '33%' ) ;
49
49
} ) ;
50
50
@@ -53,7 +53,7 @@ describe('progressbar directive with data-binding', function () {
53
53
$rootScope . $digest ( ) ;
54
54
expect ( element . children ( ) . length ) . toBe ( 1 ) ;
55
55
expect ( element . children ( ) . eq ( 0 ) . css ( 'width' ) ) . toBe ( '55%' ) ;
56
- expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'bar' ) ) . toBe ( true ) ;
56
+ expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
57
57
58
58
$rootScope . percent += 11 ;
59
59
$rootScope . $digest ( ) ;
@@ -76,8 +76,8 @@ describe('progressbar directive with data-binding', function () {
76
76
77
77
var barElement = element . children ( ) . eq ( 0 ) ;
78
78
expect ( barElement . css ( 'width' ) ) . toBe ( '45%' ) ;
79
- expect ( barElement . hasClass ( 'bar' ) ) . toBe ( true ) ;
80
- expect ( barElement . hasClass ( 'bar-warning' ) ) . toBe ( true ) ;
79
+ expect ( barElement . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
80
+ expect ( barElement . hasClass ( 'progress- bar-warning' ) ) . toBe ( true ) ;
81
81
} ) ;
82
82
83
83
} ) ;
@@ -98,11 +98,11 @@ describe('stacked progressbar directive', function () {
98
98
expect ( element . hasClass ( 'progress' ) ) . toBe ( true ) ;
99
99
} ) ;
100
100
101
- it ( 'contains tree child elements with "bar" css class each' , function ( ) {
101
+ it ( 'contains tree child elements with "progress- bar" css class each' , function ( ) {
102
102
expect ( element . children ( ) . length ) . toBe ( 3 ) ;
103
- expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'bar' ) ) . toBe ( true ) ;
104
- expect ( element . children ( ) . eq ( 1 ) . hasClass ( 'bar' ) ) . toBe ( true ) ;
105
- expect ( element . children ( ) . eq ( 2 ) . hasClass ( 'bar' ) ) . toBe ( true ) ;
103
+ expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
104
+ expect ( element . children ( ) . eq ( 1 ) . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
105
+ expect ( element . children ( ) . eq ( 2 ) . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
106
106
} ) ;
107
107
108
108
it ( 'has a elements with expected width' , function ( ) {
@@ -144,18 +144,18 @@ describe('stacked progressbar directive', function () {
144
144
145
145
barElement = element . children ( ) . eq ( 0 ) ;
146
146
expect ( barElement . css ( 'width' ) ) . toBe ( '12%' ) ;
147
- expect ( barElement . hasClass ( 'bar' ) ) . toBe ( true ) ;
148
- expect ( barElement . hasClass ( 'bar-danger' ) ) . toBe ( false ) ;
147
+ expect ( barElement . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
148
+ expect ( barElement . hasClass ( 'progress- bar-danger' ) ) . toBe ( false ) ;
149
149
150
150
barElement = element . children ( ) . eq ( 1 ) ;
151
151
expect ( barElement . css ( 'width' ) ) . toBe ( '29%' ) ;
152
- expect ( barElement . hasClass ( 'bar' ) ) . toBe ( true ) ;
153
- expect ( barElement . hasClass ( 'bar-danger' ) ) . toBe ( true ) ;
152
+ expect ( barElement . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
153
+ expect ( barElement . hasClass ( 'progress- bar-danger' ) ) . toBe ( true ) ;
154
154
155
155
barElement = element . children ( ) . eq ( 2 ) ;
156
156
expect ( barElement . css ( 'width' ) ) . toBe ( '33%' ) ;
157
- expect ( barElement . hasClass ( 'bar' ) ) . toBe ( true ) ;
158
- expect ( barElement . hasClass ( 'bar-danger' ) ) . toBe ( false ) ;
157
+ expect ( barElement . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
158
+ expect ( barElement . hasClass ( 'progress- bar-danger' ) ) . toBe ( false ) ;
159
159
} ) ;
160
160
161
161
it ( 'can handle mixed objects with custom classes' , function ( ) {
@@ -174,23 +174,23 @@ describe('stacked progressbar directive', function () {
174
174
175
175
barElement = element . children ( ) . eq ( 0 ) ;
176
176
expect ( barElement . css ( 'width' ) ) . toBe ( '15%' ) ;
177
- expect ( barElement . hasClass ( 'bar-info' ) ) . toBe ( true ) ;
177
+ expect ( barElement . hasClass ( 'progress- bar-info' ) ) . toBe ( true ) ;
178
178
179
179
barElement = element . children ( ) . eq ( 1 ) ;
180
180
expect ( barElement . css ( 'width' ) ) . toBe ( '11%' ) ;
181
- expect ( barElement . hasClass ( 'bar-info' ) ) . toBe ( false ) ;
181
+ expect ( barElement . hasClass ( 'progress- bar-info' ) ) . toBe ( false ) ;
182
182
183
183
barElement = element . children ( ) . eq ( 2 ) ;
184
184
expect ( barElement . css ( 'width' ) ) . toBe ( '9%' ) ;
185
- expect ( barElement . hasClass ( 'bar-danger' ) ) . toBe ( true ) ;
185
+ expect ( barElement . hasClass ( 'progress- bar-danger' ) ) . toBe ( true ) ;
186
186
187
187
barElement = element . children ( ) . eq ( 3 ) ;
188
188
expect ( barElement . css ( 'width' ) ) . toBe ( '22%' ) ;
189
- expect ( barElement . hasClass ( 'bar-warning' ) ) . toBe ( true ) ;
189
+ expect ( barElement . hasClass ( 'progress- bar-warning' ) ) . toBe ( true ) ;
190
190
191
191
barElement = element . children ( ) . eq ( 4 ) ;
192
192
expect ( barElement . css ( 'width' ) ) . toBe ( '5%' ) ;
193
- expect ( barElement . hasClass ( 'bar-warning' ) ) . toBe ( false ) ;
193
+ expect ( barElement . hasClass ( 'progress- bar-warning' ) ) . toBe ( false ) ;
194
194
} ) ;
195
195
196
196
} ) ;
@@ -256,10 +256,10 @@ describe('stacked progressbar directive with auto-types', function () {
256
256
expect ( element . hasClass ( 'progress' ) ) . toBe ( true ) ;
257
257
} ) ;
258
258
259
- it ( 'contains tree child elements with "bar" css class each' , function ( ) {
259
+ it ( 'contains tree child elements with "progress- bar" css class each' , function ( ) {
260
260
expect ( element . children ( ) . length ) . toBe ( 5 ) ;
261
261
for ( var i = 0 ; i < 5 ; i ++ ) {
262
- expect ( element . children ( ) . eq ( i ) . hasClass ( 'bar' ) ) . toBe ( true ) ;
262
+ expect ( element . children ( ) . eq ( i ) . hasClass ( 'progress- bar' ) ) . toBe ( true ) ;
263
263
}
264
264
} ) ;
265
265
@@ -275,7 +275,7 @@ describe('stacked progressbar directive with auto-types', function () {
275
275
var stackedTypes = config . stackedTypes ;
276
276
277
277
for ( var i = 0 ; i < stackedTypes . length ; i ++ ) {
278
- expect ( element . children ( ) . eq ( i ) . hasClass ( 'bar-' + stackedTypes [ i ] ) ) . toBe ( true ) ;
278
+ expect ( element . children ( ) . eq ( i ) . hasClass ( 'progress- bar-' + stackedTypes [ i ] ) ) . toBe ( true ) ;
279
279
}
280
280
} ) ;
281
281
@@ -290,8 +290,8 @@ describe('stacked progressbar directive with auto-types', function () {
290
290
291
291
var bar = element . children ( ) . eq ( 1 ) ;
292
292
expect ( bar . css ( 'width' ) ) . toBe ( '18%' ) ;
293
- expect ( bar . hasClass ( 'bar-' + stackedTypes [ 1 ] ) ) . toBe ( false ) ;
294
- expect ( bar . hasClass ( 'bar-something' ) ) . toBe ( true ) ;
293
+ expect ( bar . hasClass ( 'progress- bar-' + stackedTypes [ 1 ] ) ) . toBe ( false ) ;
294
+ expect ( bar . hasClass ( 'progress- bar-something' ) ) . toBe ( true ) ;
295
295
} ) ;
296
296
297
297
@@ -306,8 +306,8 @@ describe('stacked progressbar directive with auto-types', function () {
306
306
307
307
var bar = element . children ( ) . eq ( 1 ) ;
308
308
expect ( bar . css ( 'width' ) ) . toBe ( '18%' ) ;
309
- expect ( bar . hasClass ( 'bar-' + stackedTypes [ 1 ] ) ) . toBe ( false ) ;
310
- expect ( bar . hasClass ( 'bar-something' ) ) . toBe ( true ) ;
309
+ expect ( bar . hasClass ( 'progress- bar-' + stackedTypes [ 1 ] ) ) . toBe ( false ) ;
310
+ expect ( bar . hasClass ( 'progress- bar-something' ) ) . toBe ( true ) ;
311
311
} ) ;
312
312
313
313
it ( 'can bypass default configuration for stacked classes from attribute' , function ( ) {
@@ -316,11 +316,11 @@ describe('stacked progressbar directive with auto-types', function () {
316
316
317
317
var stackedTypes = config . stackedTypes ;
318
318
319
- expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'bar-danger' ) ) . toBe ( true ) ;
320
- expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'bar-' + stackedTypes [ 0 ] ) ) . toBe ( false ) ;
319
+ expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'progress- bar-danger' ) ) . toBe ( true ) ;
320
+ expect ( element . children ( ) . eq ( 0 ) . hasClass ( 'progress- bar-' + stackedTypes [ 0 ] ) ) . toBe ( false ) ;
321
321
322
- expect ( element . children ( ) . eq ( 1 ) . hasClass ( 'bar-warning' ) ) . toBe ( true ) ;
323
- expect ( element . children ( ) . eq ( 2 ) . hasClass ( 'bar-success' ) ) . toBe ( true ) ;
322
+ expect ( element . children ( ) . eq ( 1 ) . hasClass ( 'progress- bar-warning' ) ) . toBe ( true ) ;
323
+ expect ( element . children ( ) . eq ( 2 ) . hasClass ( 'progress- bar-success' ) ) . toBe ( true ) ;
324
324
} ) ;
325
325
326
326
} ) ;
0 commit comments