|
103 | 103 | * <file name="protractor.js" type="protractor"> |
104 | 104 | * it('should check controller as', function() { |
105 | 105 | * var container = element(by.id('ctrl-as-exmpl')); |
106 | | - * expect(container.findElement(by.model('settings.name')) |
| 106 | + * expect(container.element(by.model('settings.name')) |
107 | 107 | * .getAttribute('value')).toBe('John Smith'); |
108 | 108 | * |
109 | 109 | * var firstRepeat = |
110 | | - * container.findElement(by.repeater('contact in settings.contacts').row(0)); |
| 110 | + * container.element(by.repeater('contact in settings.contacts').row(0)); |
111 | 111 | * var secondRepeat = |
112 | | - * container.findElement(by.repeater('contact in settings.contacts').row(1)); |
| 112 | + * container.element(by.repeater('contact in settings.contacts').row(1)); |
113 | 113 | * |
114 | | - * expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value')) |
| 114 | + * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) |
115 | 115 | * .toBe('408 555 1212'); |
116 | 116 | * |
117 | | - * expect(secondRepeat.findElement(by.model('contact.value')).getAttribute('value')) |
| 117 | + * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value')) |
118 | 118 | * .toBe('john.smith@example.org'); |
119 | 119 | * |
120 | | - * firstRepeat.findElement(by.linkText('clear')).click(); |
| 120 | + * firstRepeat.element(by.linkText('clear')).click(); |
121 | 121 | * |
122 | | - * expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value')) |
| 122 | + * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) |
123 | 123 | * .toBe(''); |
124 | 124 | * |
125 | | - * container.findElement(by.linkText('add')).click(); |
| 125 | + * container.element(by.linkText('add')).click(); |
126 | 126 | * |
127 | | - * expect(container.findElement(by.repeater('contact in settings.contacts').row(2)) |
128 | | - * .findElement(by.model('contact.value')) |
| 127 | + * expect(container.element(by.repeater('contact in settings.contacts').row(2)) |
| 128 | + * .element(by.model('contact.value')) |
129 | 129 | * .getAttribute('value')) |
130 | 130 | |
131 | 131 | * }); |
|
184 | 184 | * it('should check controller', function() { |
185 | 185 | * var container = element(by.id('ctrl-exmpl')); |
186 | 186 | * |
187 | | - * expect(container.findElement(by.model('name')) |
| 187 | + * expect(container.element(by.model('name')) |
188 | 188 | * .getAttribute('value')).toBe('John Smith'); |
189 | 189 | * |
190 | 190 | * var firstRepeat = |
191 | | - * container.findElement(by.repeater('contact in contacts').row(0)); |
| 191 | + * container.element(by.repeater('contact in contacts').row(0)); |
192 | 192 | * var secondRepeat = |
193 | | - * container.findElement(by.repeater('contact in contacts').row(1)); |
| 193 | + * container.element(by.repeater('contact in contacts').row(1)); |
194 | 194 | * |
195 | | - * expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value')) |
| 195 | + * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) |
196 | 196 | * .toBe('408 555 1212'); |
197 | | - * expect(secondRepeat.findElement(by.model('contact.value')).getAttribute('value')) |
| 197 | + * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value')) |
198 | 198 | * .toBe('john.smith@example.org'); |
199 | 199 | * |
200 | | - * firstRepeat.findElement(by.linkText('clear')).click(); |
| 200 | + * firstRepeat.element(by.linkText('clear')).click(); |
201 | 201 | * |
202 | | - * expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value')) |
| 202 | + * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) |
203 | 203 | * .toBe(''); |
204 | 204 | * |
205 | | - * container.findElement(by.linkText('add')).click(); |
| 205 | + * container.element(by.linkText('add')).click(); |
206 | 206 | * |
207 | | - * expect(container.findElement(by.repeater('contact in contacts').row(2)) |
208 | | - * .findElement(by.model('contact.value')) |
| 207 | + * expect(container.element(by.repeater('contact in contacts').row(2)) |
| 208 | + * .element(by.model('contact.value')) |
209 | 209 | * .getAttribute('value')) |
210 | 210 | |
211 | 211 | * }); |
|
0 commit comments