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/ngRoute/route.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/ngRoute/route.js')
| -rw-r--r-- | src/ngRoute/route.js | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js index 278182da..51404fbc 100644 --- a/src/ngRoute/route.js +++ b/src/ngRoute/route.js @@ -345,17 +345,17 @@ function $RouteProvider(){           }         </file> -       <file name="scenario.js"> +       <file name="protractorTest.js">           it('should load and compile correct template', function() { -           element('a:contains("Moby: Ch1")').click(); -           var content = element('.doc-example-live [ng-view]').text(); +           element(by.linkText('Moby: Ch1')).click(); +           var content = element(by.css('.doc-example-live [ng-view]')).getText();             expect(content).toMatch(/controller\: ChapterCntl/);             expect(content).toMatch(/Book Id\: Moby/);             expect(content).toMatch(/Chapter Id\: 1/); -           element('a:contains("Scarlet")').click(); -           sleep(2); // promises are not part of scenario waiting -           content = element('.doc-example-live [ng-view]').text(); +           element(by.partialLinkText('Scarlet')).click(); + +           content = element(by.css('.doc-example-live [ng-view]')).getText();             expect(content).toMatch(/controller\: BookCntl/);             expect(content).toMatch(/Book Id\: Scarlet/);           }); | 
