blob: f92d834e3cc156270ac35a87f7b26f4e7d646dc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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!!!');
});
});
})
|