mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-07 22:37:28 +08:00
Update the Travis and Jenkins configs to run protractor tests on Safari and Firefox as well, and make the Travis tests run output XML and turn off color. Fix tests which were failing in Firefox due to clear() not working as expected. Fix tests which were failing in Safari due to SafariDriver not understanding the minus key, and disable tests which SafariDriver has no support for.
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
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.sendKeys('!!!');
|
|
|
|
var code = element(by.css('.doc-example-live tt'));
|
|
expect(code.getText()).toContain('guest!!!');
|
|
});
|
|
});
|
|
})
|