diff options
Diffstat (limited to 'src/validators.js')
| -rw-r--r-- | src/validators.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/validators.js b/src/validators.js index 265d95de..ad76646b 100644 --- a/src/validators.js +++ b/src/validators.js @@ -27,7 +27,7 @@ extend(angularValidator, { </doc:source> <doc:scenario> it('should invalidate non ssn', function(){ - var textBox = element('.doc-example :input'); + var textBox = element('.doc-example-live :input'); expect(textBox.attr('className')).not().toMatch(/ng-validation-error/); expect(textBox.val()).toEqual('123-45-6789'); input('ssn').enter('123-45-67890'); @@ -68,15 +68,15 @@ extend(angularValidator, { </doc:source> <doc:scenario> it('should invalidate number', function(){ - var n1 = element('.doc-example :input[name=n1]'); + var n1 = element('.doc-example-live :input[name=n1]'); expect(n1.attr('className')).not().toMatch(/ng-validation-error/); input('n1').enter('1.x'); expect(n1.attr('className')).toMatch(/ng-validation-error/); - var n2 = element('.doc-example :input[name=n2]'); + var n2 = element('.doc-example-live :input[name=n2]'); expect(n2.attr('className')).not().toMatch(/ng-validation-error/); input('n2').enter('9'); expect(n2.attr('className')).toMatch(/ng-validation-error/); - var n3 = element('.doc-example :input[name=n3]'); + var n3 = element('.doc-example-live :input[name=n3]'); expect(n3.attr('className')).not().toMatch(/ng-validation-error/); input('n3').enter('201'); expect(n3.attr('className')).toMatch(/ng-validation-error/); @@ -122,15 +122,15 @@ extend(angularValidator, { </doc:source> <doc:scenario> it('should invalidate integer', function(){ - var n1 = element('.doc-example :input[name=n1]'); + var n1 = element('.doc-example-live :input[name=n1]'); expect(n1.attr('className')).not().toMatch(/ng-validation-error/); input('n1').enter('1.1'); expect(n1.attr('className')).toMatch(/ng-validation-error/); - var n2 = element('.doc-example :input[name=n2]'); + var n2 = element('.doc-example-live :input[name=n2]'); expect(n2.attr('className')).not().toMatch(/ng-validation-error/); input('n2').enter('10.1'); expect(n2.attr('className')).toMatch(/ng-validation-error/); - var n3 = element('.doc-example :input[name=n3]'); + var n3 = element('.doc-example-live :input[name=n3]'); expect(n3.attr('className')).not().toMatch(/ng-validation-error/); input('n3').enter('100.1'); expect(n3.attr('className')).toMatch(/ng-validation-error/); @@ -166,7 +166,7 @@ extend(angularValidator, { </doc:source> <doc:scenario> it('should invalidate date', function(){ - var n1 = element('.doc-example :input'); + var n1 = element('.doc-example-live :input'); expect(n1.attr('className')).not().toMatch(/ng-validation-error/); input('text').enter('123/123/123'); expect(n1.attr('className')).toMatch(/ng-validation-error/); @@ -204,7 +204,7 @@ extend(angularValidator, { </doc:source> <doc:scenario> it('should invalidate email', function(){ - var n1 = element('.doc-example :input'); + var n1 = element('.doc-example-live :input'); expect(n1.attr('className')).not().toMatch(/ng-validation-error/); input('text').enter('a@b.c'); expect(n1.attr('className')).toMatch(/ng-validation-error/); @@ -238,7 +238,7 @@ extend(angularValidator, { </doc:source> <doc:scenario> it('should invalidate phone', function(){ - var n1 = element('.doc-example :input'); + var n1 = element('.doc-example-live :input'); expect(n1.attr('className')).not().toMatch(/ng-validation-error/); input('text').enter('+12345678'); expect(n1.attr('className')).toMatch(/ng-validation-error/); @@ -275,7 +275,7 @@ extend(angularValidator, { </doc:source> <doc:scenario> it('should invalidate url', function(){ - var n1 = element('.doc-example :input'); + var n1 = element('.doc-example-live :input'); expect(n1.attr('className')).not().toMatch(/ng-validation-error/); input('text').enter('abc://server/path'); expect(n1.attr('className')).toMatch(/ng-validation-error/); @@ -310,7 +310,7 @@ extend(angularValidator, { </doc:source> <doc:scenario> it('should invalidate json', function(){ - var n1 = element('.doc-example :input'); + var n1 = element('.doc-example-live :input'); expect(n1.attr('className')).not().toMatch(/ng-validation-error/); input('json').enter('{name}'); expect(n1.attr('className')).toMatch(/ng-validation-error/); @@ -382,7 +382,7 @@ extend(angularValidator, { </doc:source> <doc:scenario> it('should change color in delayed way', function(){ - var textBox = element('.doc-example :input'); + var textBox = element('.doc-example-live :input'); expect(textBox.attr('className')).not().toMatch(/ng-input-indicator-wait/); expect(textBox.attr('className')).not().toMatch(/ng-validation-error/); input('text').enter('X'); |
