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 /docs/content/guide/dev_guide.services.injecting_controllers.ngdoc | |
| 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 'docs/content/guide/dev_guide.services.injecting_controllers.ngdoc')
| -rw-r--r-- | docs/content/guide/dev_guide.services.injecting_controllers.ngdoc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc b/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc index 64fa0aaf..3dce7672 100644 --- a/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc +++ b/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc @@ -53,18 +53,19 @@ function myController(scope, notifyService) { myController.$inject = ['$scope','notify']; </script> -<div ng-controller="myController"> +<div id="simple" ng-controller="myController"> <p>Let's try this simple notify service, injected into the controller...</p> <input ng-init="message='test'" ng-model="message" > <button ng-click="callNotify(message);">NOTIFY</button> <p>(you have to click 3 times to see an alert)</p> </div> </doc:source> -<doc:scenario> +<doc:protractor> it('should test service', function() { - expect(element(':input[ng\\:model="message"]').val()).toEqual('test'); + expect(element(by.id('simple')).element(by.model('message')).getAttribute('value')) + .toEqual('test'); }); -</doc:scenario> +</doc:protractor> </doc:example> ## Implicit Dependency Injection @@ -95,7 +96,7 @@ function myController($scope, notify) { }; } </script> -<div ng-controller="myController"> +<div id="implicit" ng-controller="myController"> <p>Let's try the notify service, that is implicitly injected into the controller...</p> <input ng-init="message='test'" ng-model="message"> <button ng-click="callNotify(message);">NOTIFY</button> |
