@@ -61,10 +61,10 @@ extend(angularValidator, {
61
61
<doc:scenario>
62
62
it('should invalidate non ssn', function(){
63
63
var textBox = element('.doc-example-live :input');
64
- expect(textBox.attr ('className')).not().toMatch(/ng-validation-error/);
64
+ expect(textBox.prop ('className')).not().toMatch(/ng-validation-error/);
65
65
expect(textBox.val()).toEqual('123-45-6789');
66
66
input('ssn').enter('123-45-67890');
67
- expect(textBox.attr ('className')).toMatch(/ng-validation-error/);
67
+ expect(textBox.prop ('className')).toMatch(/ng-validation-error/);
68
68
});
69
69
</doc:scenario>
70
70
</doc:example>
@@ -102,17 +102,17 @@ extend(angularValidator, {
102
102
<doc:scenario>
103
103
it('should invalidate number', function(){
104
104
var n1 = element('.doc-example-live :input[name=n1]');
105
- expect(n1.attr ('className')).not().toMatch(/ng-validation-error/);
105
+ expect(n1.prop ('className')).not().toMatch(/ng-validation-error/);
106
106
input('n1').enter('1.x');
107
- expect(n1.attr ('className')).toMatch(/ng-validation-error/);
107
+ expect(n1.prop ('className')).toMatch(/ng-validation-error/);
108
108
var n2 = element('.doc-example-live :input[name=n2]');
109
- expect(n2.attr ('className')).not().toMatch(/ng-validation-error/);
109
+ expect(n2.prop ('className')).not().toMatch(/ng-validation-error/);
110
110
input('n2').enter('9');
111
- expect(n2.attr ('className')).toMatch(/ng-validation-error/);
111
+ expect(n2.prop ('className')).toMatch(/ng-validation-error/);
112
112
var n3 = element('.doc-example-live :input[name=n3]');
113
- expect(n3.attr ('className')).not().toMatch(/ng-validation-error/);
113
+ expect(n3.prop ('className')).not().toMatch(/ng-validation-error/);
114
114
input('n3').enter('201');
115
- expect(n3.attr ('className')).toMatch(/ng-validation-error/);
115
+ expect(n3.prop ('className')).toMatch(/ng-validation-error/);
116
116
});
117
117
</doc:scenario>
118
118
</doc:example>
@@ -156,17 +156,17 @@ extend(angularValidator, {
156
156
<doc:scenario>
157
157
it('should invalidate integer', function(){
158
158
var n1 = element('.doc-example-live :input[name=n1]');
159
- expect(n1.attr ('className')).not().toMatch(/ng-validation-error/);
159
+ expect(n1.prop ('className')).not().toMatch(/ng-validation-error/);
160
160
input('n1').enter('1.1');
161
- expect(n1.attr ('className')).toMatch(/ng-validation-error/);
161
+ expect(n1.prop ('className')).toMatch(/ng-validation-error/);
162
162
var n2 = element('.doc-example-live :input[name=n2]');
163
- expect(n2.attr ('className')).not().toMatch(/ng-validation-error/);
163
+ expect(n2.prop ('className')).not().toMatch(/ng-validation-error/);
164
164
input('n2').enter('10.1');
165
- expect(n2.attr ('className')).toMatch(/ng-validation-error/);
165
+ expect(n2.prop ('className')).toMatch(/ng-validation-error/);
166
166
var n3 = element('.doc-example-live :input[name=n3]');
167
- expect(n3.attr ('className')).not().toMatch(/ng-validation-error/);
167
+ expect(n3.prop ('className')).not().toMatch(/ng-validation-error/);
168
168
input('n3').enter('100.1');
169
- expect(n3.attr ('className')).toMatch(/ng-validation-error/);
169
+ expect(n3.prop ('className')).toMatch(/ng-validation-error/);
170
170
});
171
171
</doc:scenario>
172
172
</doc:example>
@@ -200,9 +200,9 @@ extend(angularValidator, {
200
200
<doc:scenario>
201
201
it('should invalidate date', function(){
202
202
var n1 = element('.doc-example-live :input');
203
- expect(n1.attr ('className')).not().toMatch(/ng-validation-error/);
203
+ expect(n1.prop ('className')).not().toMatch(/ng-validation-error/);
204
204
input('text').enter('123/123/123');
205
- expect(n1.attr ('className')).toMatch(/ng-validation-error/);
205
+ expect(n1.prop ('className')).toMatch(/ng-validation-error/);
206
206
});
207
207
</doc:scenario>
208
208
</doc:example>
@@ -238,9 +238,9 @@ extend(angularValidator, {
238
238
<doc:scenario>
239
239
it('should invalidate email', function(){
240
240
var n1 = element('.doc-example-live :input');
241
- expect(n1.attr ('className')).not().toMatch(/ng-validation-error/);
241
+ expect(n1.prop ('className')).not().toMatch(/ng-validation-error/);
242
242
input('text').enter('a@b .c');
243
- expect(n1.attr ('className')).toMatch(/ng-validation-error/);
243
+ expect(n1.prop ('className')).toMatch(/ng-validation-error/);
244
244
});
245
245
</doc:scenario>
246
246
</doc:example>
@@ -272,9 +272,9 @@ extend(angularValidator, {
272
272
<doc:scenario>
273
273
it('should invalidate phone', function(){
274
274
var n1 = element('.doc-example-live :input');
275
- expect(n1.attr ('className')).not().toMatch(/ng-validation-error/);
275
+ expect(n1.prop ('className')).not().toMatch(/ng-validation-error/);
276
276
input('text').enter('+12345678');
277
- expect(n1.attr ('className')).toMatch(/ng-validation-error/);
277
+ expect(n1.prop ('className')).toMatch(/ng-validation-error/);
278
278
});
279
279
</doc:scenario>
280
280
</doc:example>
@@ -310,9 +310,9 @@ extend(angularValidator, {
310
310
<doc:scenario>
311
311
it('should invalidate url', function(){
312
312
var n1 = element('.doc-example-live :input');
313
- expect(n1.attr ('className')).not().toMatch(/ng-validation-error/);
313
+ expect(n1.prop ('className')).not().toMatch(/ng-validation-error/);
314
314
input('text').enter('abc://server/path');
315
- expect(n1.attr ('className')).toMatch(/ng-validation-error/);
315
+ expect(n1.prop ('className')).toMatch(/ng-validation-error/);
316
316
});
317
317
</doc:scenario>
318
318
</doc:example>
@@ -345,9 +345,9 @@ extend(angularValidator, {
345
345
<doc:scenario>
346
346
it('should invalidate json', function(){
347
347
var n1 = element('.doc-example-live :input');
348
- expect(n1.attr ('className')).not().toMatch(/ng-validation-error/);
348
+ expect(n1.prop ('className')).not().toMatch(/ng-validation-error/);
349
349
input('json').enter('{name}');
350
- expect(n1.attr ('className')).toMatch(/ng-validation-error/);
350
+ expect(n1.prop ('className')).toMatch(/ng-validation-error/);
351
351
});
352
352
</doc:scenario>
353
353
</doc:example>
@@ -417,13 +417,13 @@ extend(angularValidator, {
417
417
<doc:scenario>
418
418
it('should change color in delayed way', function(){
419
419
var textBox = element('.doc-example-live :input');
420
- expect(textBox.attr ('className')).not().toMatch(/ng-input-indicator-wait/);
421
- expect(textBox.attr ('className')).not().toMatch(/ng-validation-error/);
420
+ expect(textBox.prop ('className')).not().toMatch(/ng-input-indicator-wait/);
421
+ expect(textBox.prop ('className')).not().toMatch(/ng-validation-error/);
422
422
input('text').enter('X');
423
- expect(textBox.attr ('className')).toMatch(/ng-input-indicator-wait/);
423
+ expect(textBox.prop ('className')).toMatch(/ng-input-indicator-wait/);
424
424
sleep(.6);
425
- expect(textBox.attr ('className')).not().toMatch(/ng-input-indicator-wait/);
426
- expect(textBox.attr ('className')).toMatch(/ng-validation-error/);
425
+ expect(textBox.prop ('className')).not().toMatch(/ng-input-indicator-wait/);
426
+ expect(textBox.prop ('className')).toMatch(/ng-validation-error/);
427
427
});
428
428
</doc:scenario>
429
429
</doc:example>
0 commit comments