Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 19871d2

Browse files
test(docs): add extra docs e2e tests
1 parent 63761fd commit 19871d2

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
@@ -83,11 +83,4 @@ describe('docs.angularjs.org', function () {
8383
});
8484
});
8585

86-
describe("templates", function() {
87-
it("should show parameter defaults", function() {
88-
browser.get('index-debug.html#!/api/ng/service/$timeout');
89-
expect(element.all(by.css('.input-arguments p em')).first().getText()).toContain('(default: 0)');
90-
});
91-
});
92-
9386
});

0 commit comments

Comments
 (0)