aboutsummaryrefslogtreecommitdiffstats
path: root/src/validators.js
diff options
context:
space:
mode:
authorIgor Minar2010-11-05 21:12:37 -0700
committerIgor Minar2010-11-09 22:27:31 -0800
commit324694a58b6d0ed33e05b511be4767573d9187dd (patch)
tree0b7243e721da17e9b5c5a1111ed9c0d28829b309 /src/validators.js
parenteffcd340e9d41a2ab8368e4de06a1a83a206ac32 (diff)
downloadangular.js-324694a58b6d0ed33e05b511be4767573d9187dd.tar.bz2
Better example widget
- syntax highlighting - tabless design - rename widget to doc:example - rename widget files (wiki_widget.* -> doc_widget.*) - example section is now optional
Diffstat (limited to 'src/validators.js')
-rw-r--r--src/validators.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/validators.js b/src/validators.js
index 9715be59..f4874e68 100644
--- a/src/validators.js
+++ b/src/validators.js
@@ -17,7 +17,7 @@ extend(angularValidator, {
*
* @scenario
* it('should invalidate non ssn', function(){
- * var textBox = element('.example :input');
+ * var textBox = element('.doc-example :input');
* expect(textBox.attr('className')).not().toMatch(/ng-validation-error/);
* expect(textBox.val()).toEqual('123-45-6789');
*
@@ -54,17 +54,17 @@ extend(angularValidator, {
*
* @scenario
* it('should invalidate number', function(){
- * var n1 = element('.example :input[name=n1]');
+ * var n1 = element('.doc-example :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('.example :input[name=n2]');
+ * var n2 = element('.doc-example :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('.example :input[name=n3]');
+ * var n3 = element('.doc-example :input[name=n3]');
* expect(n3.attr('className')).not().toMatch(/ng-validation-error/);
* input('n3').enter('201');
* expect(n3.attr('className')).toMatch(/ng-validation-error/);
@@ -106,17 +106,17 @@ extend(angularValidator, {
*
* @scenario
* it('should invalidate integer', function(){
- * var n1 = element('.example :input[name=n1]');
+ * var n1 = element('.doc-example :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('.example :input[name=n2]');
+ * var n2 = element('.doc-example :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('.example :input[name=n3]');
+ * var n3 = element('.doc-example :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/);
@@ -148,7 +148,7 @@ extend(angularValidator, {
*
* @scenario
* it('should invalidate date', function(){
- * var n1 = element('.example :input');
+ * var n1 = element('.doc-example :input');
* expect(n1.attr('className')).not().toMatch(/ng-validation-error/);
* input('text').enter('123/123/123');
* expect(n1.attr('className')).toMatch(/ng-validation-error/);
@@ -180,7 +180,7 @@ extend(angularValidator, {
*
* @scenario
* it('should invalidate email', function(){
- * var n1 = element('.example :input');
+ * var n1 = element('.doc-example :input');
* expect(n1.attr('className')).not().toMatch(/ng-validation-error/);
* input('text').enter('a@b.c');
* expect(n1.attr('className')).toMatch(/ng-validation-error/);
@@ -209,7 +209,7 @@ extend(angularValidator, {
*
* @scenario
* it('should invalidate phone', function(){
- * var n1 = element('.example :input');
+ * var n1 = element('.doc-example :input');
* expect(n1.attr('className')).not().toMatch(/ng-validation-error/);
* input('text').enter('+12345678');
* expect(n1.attr('className')).toMatch(/ng-validation-error/);
@@ -241,7 +241,7 @@ extend(angularValidator, {
*
* @scenario
* it('should invalidate url', function(){
- * var n1 = element('.example :input');
+ * var n1 = element('.doc-example :input');
* expect(n1.attr('className')).not().toMatch(/ng-validation-error/);
* input('text').enter('abc://server/path');
* expect(n1.attr('className')).toMatch(/ng-validation-error/);
@@ -271,7 +271,7 @@ extend(angularValidator, {
*
* @scenario
* it('should invalidate json', function(){
- * var n1 = element('.example :input');
+ * var n1 = element('.doc-example :input');
* expect(n1.attr('className')).not().toMatch(/ng-validation-error/);
* input('json').enter('{name}');
* expect(n1.attr('className')).toMatch(/ng-validation-error/);
@@ -344,7 +344,7 @@ extend(angularValidator, {
*
* @scenario
* it('should change color in delayed way', function(){
- * var textBox = element('.example :input');
+ * var textBox = element('.doc-example :input');
* expect(textBox.attr('className')).not().toMatch(/ng-input-indicator-wait/);
* expect(textBox.attr('className')).not().toMatch(/ng-validation-error/);
*