aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/cookbook/form.ngdoc
diff options
context:
space:
mode:
authorIgor Minar2011-09-16 00:09:33 +0200
committerIgor Minar2011-09-16 02:44:35 +0200
commit3ace81b92ad00da73c89e7536ac7aa7c6681e30a (patch)
treedb2fc914f625a0f3acaf0392cc5318d4156ec48a /docs/content/cookbook/form.ngdoc
parent9acf45127e96051e23f28af7650778fe444d8c86 (diff)
downloadangular.js-3ace81b92ad00da73c89e7536ac7aa7c6681e30a.tar.bz2
fix(e2e tests): use prop() instead of attr() and quote attributes
Because of changes in jQuery, we need to use element().prop() instead of element().attr() to retrieve className and other element properties. Additionally all attribute selectors (e.g. input[name=value]) must have value quoted if it contains dots (".").
Diffstat (limited to 'docs/content/cookbook/form.ngdoc')
-rw-r--r--docs/content/cookbook/form.ngdoc8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/content/cookbook/form.ngdoc b/docs/content/cookbook/form.ngdoc
index 08f8971d..2aeafc4d 100644
--- a/docs/content/cookbook/form.ngdoc
+++ b/docs/content/cookbook/form.ngdoc
@@ -68,18 +68,18 @@ ng:validate="regexp:zip"/><br/><br/>
});
it('should validate zip', function(){
- expect(using('.example').element(':input[name=user.address.zip]').attr('className'))
+ expect(using('.example').element(':input[name="user.address.zip"]').prop('className'))
.not().toMatch(/ng-validation-error/);
using('.example').input('user.address.zip').enter('abc');
- expect(using('.example').element(':input[name=user.address.zip]').attr('className'))
+ expect(using('.example').element(':input[name="user.address.zip"]').prop('className'))
.toMatch(/ng-validation-error/);
});
it('should validate state', function(){
- expect(using('.example').element(':input[name=user.address.state]').attr('className'))
+ expect(using('.example').element(':input[name="user.address.state"]').prop('className'))
.not().toMatch(/ng-validation-error/);
using('.example').input('user.address.state').enter('XXX');
- expect(using('.example').element(':input[name=user.address.state]').attr('className'))
+ expect(using('.example').element(':input[name="user.address.state"]').prop('className'))
.toMatch(/ng-validation-error/);
});
</doc:scenario>