diff options
| author | Julie | 2014-01-11 16:59:15 -0800 |
|---|---|---|
| committer | Caitlin Potter | 2014-01-28 14:14:20 -0500 |
| commit | 7aef2d54e0a48fae18a289813f699962d8310565 (patch) | |
| tree | 60d1d559510c17e879aff798f298e6bcc262d3ab /src/ng/directive/select.js | |
| parent | ce37ae28687167f7b4274ba547f013980126a219 (diff) | |
| download | angular.js-7aef2d54e0a48fae18a289813f699962d8310565.tar.bz2 | |
test(docs): convert example end to end doc tests from scenario runner to protractor
Thanks to jeffbcross, petebacondarwin, btford, jdeboer, tbosch for contributions!
Closes #6023
Diffstat (limited to 'src/ng/directive/select.js')
| -rw-r--r-- | src/ng/directive/select.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js index 0e64cc43..c4498f81 100644 --- a/src/ng/directive/select.js +++ b/src/ng/directive/select.js @@ -120,15 +120,17 @@ var ngOptionsMinErr = minErr('ngOptions'); </div> </div> </doc:source> - <doc:scenario> + <doc:protractor> it('should check ng-options', function() { - expect(binding('{selected_color:color}')).toMatch('red'); - select('color').option('0'); - expect(binding('{selected_color:color}')).toMatch('black'); - using('.nullable').select('color').option(''); - expect(binding('{selected_color:color}')).toMatch('null'); + expect(element(by.binding('{selected_color:color}')).getText()).toMatch('red'); + element.all(by.select('color')).first().click(); + element.all(by.css('select[ng-model="color"] option')).first().click(); + expect(element(by.binding('{selected_color:color}')).getText()).toMatch('black'); + element(by.css('.nullable select[ng-model="color"]')).click(); + element.all(by.css('.nullable select[ng-model="color"] option')).first().click(); + expect(element(by.binding('{selected_color:color}')).getText()).toMatch('null'); }); - </doc:scenario> + </doc:protractor> </doc:example> */ |
