forked from angular/angular.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(docs): add protractor tests for docs app
Closes angular#5437
- Loading branch information
1 parent
5a9cb8b
commit 039b990
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ exports.config = { | |
|
||
specs: [ | ||
'build/docs/ptore2e/**/*.js', | ||
'test/e2e/docsAppE2E.js' | ||
], | ||
|
||
capabilities: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
describe('docs.angularjs.org', function () { | ||
describe('App', function () { | ||
// it('should filter the module list when searching', function () { | ||
// browser.get(); | ||
// browser.waitForAngular(); | ||
|
||
// var search = element(by.input('q')); | ||
// search.clear(); | ||
// search.sendKeys('ngBind'); | ||
|
||
// var firstModule = element(by.css('.search-results a')); | ||
// expect(firstModule.getText()).toEqual('ngBind'); | ||
// }); | ||
|
||
|
||
it('should change the page content when clicking a link to a service', function () { | ||
browser.get(''); | ||
|
||
var ngBindLink = element(by.css('.definition-table td a[href="api/ng.directive:ngClick"]')); | ||
ngBindLink.click(); | ||
|
||
var pageBody = element(by.css('.content h1 code')); | ||
expect(pageBody.getText()).toEqual('ngClick'); | ||
}); | ||
|
||
|
||
it('should show the functioning input directive example', function () { | ||
browser.get('index-nocache.html#!/api/ng.directive:input'); | ||
//Wait for animation | ||
browser.sleep(500); | ||
|
||
var nameInput = element(by.input('user.name')); | ||
nameInput.click(); | ||
nameInput.sendKeys('!!!'); | ||
|
||
var code = element(by.css('.doc-example-live tt')); | ||
expect(code.getText()).toContain('guest!!!'); | ||
}); | ||
}); | ||
}) |