Skip to content

Commit b4de730

Browse files
test(docs): add extra docs e2e tests
1 parent 9b9a30c commit b4de730

File tree

4 files changed

+34
-7
lines changed

4 files changed

+34
-7
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
describe("provider pages", function() {
4+
5+
it("should show the related service", function() {
6+
browser.get('index-debug.html#!/api/ng/provider/$compileProvider');
7+
var serviceLink = element.all(by.css('ol.api-profile-header-structure li a')).first();
8+
expect(serviceLink.getText()).toEqual('- $compile');
9+
expect(serviceLink.getAttribute('href')).toMatch('api/ng/service/$compile');
10+
});
11+
12+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
'use strict';
2+
3+
describe("service pages", function() {
4+
5+
it("should show the related provider if there is one", function() {
6+
browser.get('index-debug.html#!/api/ng/service/$compile');
7+
var providerLink = element.all(by.css('ol.api-profile-header-structure li a')).first();
8+
expect(providerLink.getText()).toEqual('- $compileProvider');
9+
expect(providerLink.getAttribute('href')).toMatch('api/ng/provider/$compileProvider');
10+
11+
browser.get('index-debug.html#!/api/ng/service/$q');
12+
providerLink = element.all(by.css('ol.api-profile-header-structure li a')).first();
13+
expect(providerLink.getText()).not.toEqual('- $qProvider');
14+
expect(providerLink.getAttribute('href')).not.toMatch('api/ng/provider/$compileProvider');
15+
});
16+
17+
it("should show parameter defaults", function() {
18+
browser.get('index-debug.html#!/api/ng/service/$timeout');
19+
expect(element.all(by.css('.input-arguments p em')).first().getText()).toContain('(default: 0)');
20+
});
21+
22+
});

docs/app/e2e/app.scenario.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,4 @@ describe('docs.angularjs.org', function () {
6060
});
6161
});
6262

63-
describe("templates", function() {
64-
it("should show parameter defaults", function() {
65-
browser.get('index-debug.html#!/api/ng/service/$timeout');
66-
expect(element.all(by.css('.input-arguments p em')).first().getText()).toContain('(default: 0)');
67-
});
68-
});
69-
7063
});

0 commit comments

Comments
 (0)