diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js index 95fe5ad7..a6ff78ce 100644 --- a/src/ng/directive/select.js +++ b/src/ng/directive/select.js @@ -83,7 +83,7 @@ var ngOptionsMinErr = minErr('ngOptions'); {name:'blue', shade:'dark'}, {name:'yellow', shade:'light'} ]; - $scope.color = $scope.colors[2]; // red + $scope.myColor = $scope.colors[2]; // red }
@@ -98,37 +98,37 @@ var ngOptionsMinErr = minErr('ngOptions');
Color (null not allowed): -
+
Color (null allowed): -
Color grouped by shade: -
- Select bogus.
+ Select bogus.

- Currently selected: {{ {selected_color:color} }} + Currently selected: {{ {selected_color:myColor} }}
+ ng-style="{'background-color':myColor.name}">
it('should check ng-options', function() { - 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'); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red'); + element.all(by.select('myColor')).first().click(); + element.all(by.css('select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black'); + element(by.css('.nullable select[ng-model="myColor"]')).click(); + element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null'); });