diff options
| author | Igor Minar | 2011-09-16 00:09:33 +0200 |
|---|---|---|
| committer | Igor Minar | 2011-09-16 02:44:35 +0200 |
| commit | 3ace81b92ad00da73c89e7536ac7aa7c6681e30a (patch) | |
| tree | db2fc914f625a0f3acaf0392cc5318d4156ec48a /src/widgets.js | |
| parent | 9acf45127e96051e23f28af7650778fe444d8c86 (diff) | |
| download | angular.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 'src/widgets.js')
| -rw-r--r-- | src/widgets.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets.js b/src/widgets.js index f0376422..1d0217b8 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -244,11 +244,11 @@ function compileFormatter(expr) { </doc:source> <doc:scenario> it('should check ng:validate', function(){ - expect(element('.doc-example-live :input:last').attr('className')). + expect(element('.doc-example-live :input:last').prop('className')). toMatch(/ng-validation-error/); input('value').enter('123'); - expect(element('.doc-example-live :input:last').attr('className')). + expect(element('.doc-example-live :input:last').prop('className')). not().toMatch(/ng-validation-error/); }); </doc:scenario> @@ -276,9 +276,11 @@ function compileFormatter(expr) { </doc:source> <doc:scenario> it('should check ng:required', function(){ - expect(element('.doc-example-live :input').attr('className')).toMatch(/ng-validation-error/); + expect(element('.doc-example-live :input').prop('className')). + toMatch(/ng-validation-error/); input('value').enter('123'); - expect(element('.doc-example-live :input').attr('className')).not().toMatch(/ng-validation-error/); + expect(element('.doc-example-live :input').prop('className')). + not().toMatch(/ng-validation-error/); }); </doc:scenario> </doc:example> |
