From 06f2ba899fac8ad004bf65dce39a3b05e2387c0f Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Wed, 12 Feb 2014 22:47:42 +0000 Subject: docs(bike-shed-migration): fix invalid HTML in examples --- src/ng/directive/booleanAttrs.js | 12 ++++++------ src/ng/directive/form.js | 2 +- src/ng/directive/input.js | 20 ++++++++++---------- src/ng/directive/ngBind.js | 4 ++-- src/ng/directive/ngCloak.js | 2 +- src/ng/directive/ngController.js | 4 ++-- src/ng/directive/ngEventDirs.js | 4 ++-- src/ng/directive/ngInit.js | 2 +- src/ng/directive/ngNonBindable.js | 2 +- src/ng/directive/ngPluralize.js | 2 +- src/ng/directive/ngTransclude.js | 2 +- src/ng/directive/script.js | 2 +- src/ng/directive/select.js | 2 +- 13 files changed, 30 insertions(+), 30 deletions(-) (limited to 'src/ng/directive') diff --git a/src/ng/directive/booleanAttrs.js b/src/ng/directive/booleanAttrs.js index e1d46bc1..099bdbbb 100644 --- a/src/ng/directive/booleanAttrs.js +++ b/src/ng/directive/booleanAttrs.js @@ -41,7 +41,7 @@ anchor (no link)
link (link, change location) - + it('should execute ng-click but not reload when href without value', function() { element(by.id('link-1')).click(); expect(element(by.model('value')).getAttribute('value')).toEqual('1'); @@ -174,7 +174,7 @@ Click me to toggle:
- + it('should toggle button', function() { expect(element(by.css('.doc-example-live button')).getAttribute('disabled')).toBeFalsy(); element(by.model('checked')).click(); @@ -209,7 +209,7 @@ Check me to check both:
- + it('should check both checkBoxes', function() { expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy(); element(by.model('master')).click(); @@ -244,7 +244,7 @@ Check me to make text readonly:
- + it('should toggle readonly attr', function() { expect(element(by.css('.doc-example-live [type="text"]')).getAttribute('readonly')).toBeFalsy(); element(by.model('checked')).click(); @@ -283,7 +283,7 @@ - + it('should select Greetings!', function() { expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy(); element(by.model('selected')).click(); @@ -319,7 +319,7 @@ Show/Hide me - + it('should toggle open', function() { expect(element(by.id('details')).getAttribute('open')).toBeFalsy(); element(by.model('open')).click(); diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js index 963ef04d..b6919836 100644 --- a/src/ng/directive/form.js +++ b/src/ng/directive/form.js @@ -300,7 +300,7 @@ function FormController(element, attrs) { myForm.$error.required = {{!!myForm.$error.required}}
- + it('should initialize to model', function() { var userType = element(by.binding('userType')); var valid = element(by.binding('myForm.input.$valid')); diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 60cf6dfe..0e7eb6d8 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -62,7 +62,7 @@ var inputType = { myForm.$error.required = {{!!myForm.$error.required}}
- + var text = element(by.binding('text')); var valid = element(by.binding('myForm.input.$valid')); var input = element(by.model('text')); @@ -140,7 +140,7 @@ var inputType = { myForm.$error.required = {{!!myForm.$error.required}}
- + var value = element(by.binding('value')); var valid = element(by.binding('myForm.input.$valid')); var input = element(by.model('value')); @@ -215,7 +215,7 @@ var inputType = { myForm.$error.url = {{!!myForm.$error.url}}
- + var text = element(by.binding('text')); var valid = element(by.binding('myForm.input.$valid')); var input = element(by.model('text')); @@ -291,7 +291,7 @@ var inputType = { myForm.$error.email = {{!!myForm.$error.email}}
- + var text = element(by.binding('text')); var valid = element(by.binding('myForm.input.$valid')); var input = element(by.model('text')); @@ -355,7 +355,7 @@ var inputType = { Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. - + it('should change state', function() { var color = element(by.binding('color')); @@ -402,7 +402,7 @@ var inputType = { value2 = {{value2}}
- + it('should change state', function() { var value1 = element(by.binding('value1')); var value2 = element(by.binding('value2')); @@ -771,7 +771,7 @@ function checkboxInputType(scope, element, attr, ctrl) { myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
- + var user = element(by.binding('{{user}}')); var userNameValid = element(by.binding('myForm.userName.$valid')); var lastNameValid = element(by.binding('myForm.lastName.$valid')); @@ -1280,7 +1280,7 @@ var ngModelDirective = function() { * counter = {{counter}}
* *
- * + * * var counter = element(by.binding('counter')); * var debug = element(by.binding('confirmed')); * @@ -1372,7 +1372,7 @@ var requiredDirective = function() { myForm.$error.required = {{!!myForm.$error.required}}
- + var listInput = element(by.model('names')); var names = element(by.binding('{{names}}')); var valid = element(by.binding('myForm.namesInput.$valid')); @@ -1473,7 +1473,7 @@ var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;
You chose {{my.favorite}}
- + var favorite = element(by.binding('my.favorite')); it('should initialize to model', function() { diff --git a/src/ng/directive/ngBind.js b/src/ng/directive/ngBind.js index 8e787a64..43611c5a 100644 --- a/src/ng/directive/ngBind.js +++ b/src/ng/directive/ngBind.js @@ -38,7 +38,7 @@ Hello ! - + it('should check ng-bind', function() { var exampleContainer = $('.doc-example-live'); var nameInput = element(by.model('name')); @@ -94,7 +94,7 @@ var ngBindDirective = ngDirective(function(scope, element, attr) {

        
      
- + it('should check ng-bind', function() { var salutationElem = element(by.binding('salutation')); var salutationInput = element(by.model('salutation')); diff --git a/src/ng/directive/ngCloak.js b/src/ng/directive/ngCloak.js index 4b63dfd1..21a32801 100644 --- a/src/ng/directive/ngCloak.js +++ b/src/ng/directive/ngCloak.js @@ -45,7 +45,7 @@
{{ 'hello' }}
{{ 'hello IE7' }}
- + it('should remove the template directive and css class', function() { expect($('.doc-example-live #template1').getAttribute('ng-cloak')). toBeNull(); diff --git a/src/ng/directive/ngController.js b/src/ng/directive/ngController.js index 29cbc3fc..01558d2d 100644 --- a/src/ng/directive/ngController.js +++ b/src/ng/directive/ngController.js @@ -82,7 +82,7 @@ - + it('should check controller as', function() { var container = element(by.id('ctrl-as-exmpl')); @@ -159,7 +159,7 @@ - + it('should check controller', function() { var container = element(by.id('ctrl-exmpl')); diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js index 17d32f80..6361a309 100644 --- a/src/ng/directive/ngEventDirs.js +++ b/src/ng/directive/ngEventDirs.js @@ -21,7 +21,7 @@ count: {{count}} - + it('should check ng-click', function() { expect(element(by.binding('count')).getText()).toMatch('0'); element(by.css('.doc-example-live button')).click(); @@ -327,7 +327,7 @@ forEach(
list={{list}}
- + it('should check ng-submit', function() { expect(element(by.binding('list')).getText()).toBe('list=[]'); element(by.css('.doc-example-live #submit')).click(); diff --git a/src/ng/directive/ngInit.js b/src/ng/directive/ngInit.js index 05ded684..6371733d 100644 --- a/src/ng/directive/ngInit.js +++ b/src/ng/directive/ngInit.js @@ -44,7 +44,7 @@ - + it('should alias index positions', function() { var elements = element.all(by.css('.example-init')); expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;'); diff --git a/src/ng/directive/ngNonBindable.js b/src/ng/directive/ngNonBindable.js index 3690f2df..0fce757c 100644 --- a/src/ng/directive/ngNonBindable.js +++ b/src/ng/directive/ngNonBindable.js @@ -24,7 +24,7 @@
Normal: {{1 + 2}}
Ignored: {{1 + 2}}
- + it('should check ng-non-bindable', function() { expect(element(by.binding('1 + 2')).getText()).toContain('3'); expect(element.all(by.css('.doc-example-live div')).last().getText()).toMatch(/1 \+ 2/); diff --git a/src/ng/directive/ngPluralize.js b/src/ng/directive/ngPluralize.js index ea5f2779..477e507e 100644 --- a/src/ng/directive/ngPluralize.js +++ b/src/ng/directive/ngPluralize.js @@ -123,7 +123,7 @@ - + it('should show correct pluralized string', function() { var withoutOffset = element.all(by.css('ng-pluralize')).get(0); var withOffset = element.all(by.css('ng-pluralize')).get(1); diff --git a/src/ng/directive/ngTransclude.js b/src/ng/directive/ngTransclude.js index e9b31bfb..44d50e03 100644 --- a/src/ng/directive/ngTransclude.js +++ b/src/ng/directive/ngTransclude.js @@ -40,7 +40,7 @@ {{text}} - + it('should have transcluded', function() { var titleElement = element(by.model('title')); titleElement.clear(); diff --git a/src/ng/directive/script.js b/src/ng/directive/script.js index 84550568..e811617a 100644 --- a/src/ng/directive/script.js +++ b/src/ng/directive/script.js @@ -25,7 +25,7 @@ Load inlined template
- + it('should load template defined inside script tag', function() { element(by.css('#tpl-link')).click(); expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/); diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js index cf0e4cae..3846d18a 100644 --- a/src/ng/directive/select.js +++ b/src/ng/directive/select.js @@ -120,7 +120,7 @@ var ngOptionsMinErr = minErr('ngOptions'); - + it('should check ng-options', function() { expect(element(by.binding('{selected_color:color}')).getText()).toMatch('red'); element.all(by.select('color')).first().click(); -- cgit v1.2.3