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

Commit 22b817e

Browse files
petebacondarwincaitp
authored andcommitted
chore(docs): fix path to docs-app e2e tests
These tests are not generated by dgeni and so needed to have the paths to the pages updated manually. Closes #9680
1 parent 762713e commit 22b817e

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

docs/app/e2e/api-docs/api-pages.scenario.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ describe("doc.angularjs.org", function() {
55
describe("API pages", function() {
66

77
it("should display links to code on GitHub", function() {
8-
browser.get('index-debug.html#!/api/ng/service/$http');
8+
browser.get('build/docs/index.html#!/api/ng/service/$http');
99
expect(element(by.css('.improve-docs')).getAttribute('href')).toMatch(/https?:\/\/github\.com\/angular\/angular\.js\/edit\/.+\/src\/ng\/http\.js/);
1010

11-
browser.get('index-debug.html#!/api/ng/service/$http');
11+
browser.get('build/docs/index.html#!/api/ng/service/$http');
1212
expect(element(by.css('.view-source')).getAttribute('href')).toMatch(/https?:\/\/github\.com\/angular\/angular\.js\/tree\/.+\/src\/ng\/http\.js#L\d+/);
1313
});
1414

1515
it('should change the page content when clicking a link to a service', function () {
16-
browser.get('');
16+
browser.get('build/docs/index.html');
1717

1818
var ngBindLink = element(by.css('.definition-table td a[href="api/ng/directive/ngClick"]'));
1919
ngBindLink.click();
@@ -24,7 +24,7 @@ describe("doc.angularjs.org", function() {
2424

2525

2626
it('should show the functioning input directive example', function () {
27-
browser.get('index-debug.html#!/api/ng/directive/input');
27+
browser.get('build/docs/index.html#!/api/ng/directive/input');
2828

2929
// Ensure that the page is loaded before trying to switch frames.
3030
browser.waitForAngular();
@@ -39,7 +39,7 @@ describe("doc.angularjs.org", function() {
3939
});
4040

4141
it("should trim indentation from code blocks", function() {
42-
browser.get('index-debug.html#!/api/ng/type/$rootScope.Scope');
42+
browser.get('build/docs/index.html#!/api/ng/type/$rootScope.Scope');
4343

4444
var codeBlocks = element.all(by.css('pre > code.lang-js'));
4545
codeBlocks.each(function(codeBlock) {

docs/app/e2e/api-docs/provider-pages.scenario.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
describe("provider pages", function() {
44

55
it("should show the related service", function() {
6-
browser.get('index-debug.html#!/api/ng/provider/$compileProvider');
6+
browser.get('build/docs/index.html#!/api/ng/provider/$compileProvider');
77
var serviceLink = element.all(by.css('ol.api-profile-header-structure li a')).first();
88
expect(serviceLink.getText()).toEqual('- $compile');
99
expect(serviceLink.getAttribute('href')).toMatch(/api\/ng\/service\/\$compile/);

docs/app/e2e/api-docs/service-pages.scenario.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
describe("service pages", function() {
44

55
it("should show the related provider if there is one", function() {
6-
browser.get('index-debug.html#!/api/ng/service/$compile');
6+
browser.get('build/docs/index.html#!/api/ng/service/$compile');
77
var providerLink = element.all(by.css('ol.api-profile-header-structure li a')).first();
88
expect(providerLink.getText()).toEqual('- $compileProvider');
99
expect(providerLink.getAttribute('href')).toMatch(/api\/ng\/provider\/\$compileProvider/);
1010

11-
browser.get('index-debug.html#!/api/ng/service/$q');
11+
browser.get('build/docs/index.html#!/api/ng/service/$q');
1212
providerLink = element.all(by.css('ol.api-profile-header-structure li a')).first();
1313
expect(providerLink.getText()).not.toEqual('- $qProvider');
1414
expect(providerLink.getAttribute('href')).not.toMatch(/api\/ng\/provider\/\$compileProvider/);
1515
});
1616

1717
it("should show parameter defaults", function() {
18-
browser.get('index-debug.html#!/api/ng/service/$timeout');
18+
browser.get('build/docs/index.html#!/api/ng/service/$timeout');
1919
expect(element.all(by.css('.input-arguments p em')).first().getText()).toContain('(default: 0)');
2020
});
2121

docs/app/e2e/app.scenario.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('docs.angularjs.org', function () {
3939

4040

4141
it('should change the page content when clicking a link to a service', function () {
42-
browser.get('');
42+
browser.get('build/docs/index.html');
4343

4444
var ngBindLink = element(by.css('.definition-table td a[href="api/ng/directive/ngClick"]'));
4545
ngBindLink.click();
@@ -51,33 +51,33 @@ describe('docs.angularjs.org', function () {
5151

5252

5353
it('should be resilient to trailing slashes', function() {
54-
browser.get('index-debug.html#!/api/ng/function/angular.noop/');
54+
browser.get('build/docs/index.html#!/api/ng/function/angular.noop/');
5555
var pageBody = element(by.css('h1'));
5656
expect(pageBody.getText()).toEqual('angular.noop');
5757
});
5858

5959

6060
it('should be resilient to trailing "index"', function() {
61-
browser.get('index-debug.html#!/api/ng/function/angular.noop/index');
61+
browser.get('build/docs/index.html#!/api/ng/function/angular.noop/index');
6262
var pageBody = element(by.css('h1'));
6363
expect(pageBody.getText()).toEqual('angular.noop');
6464
});
6565

6666

6767
it('should be resilient to trailing "index/"', function() {
68-
browser.get('index-debug.html#!/api/ng/function/angular.noop/index/');
68+
browser.get('build/docs/index.html#!/api/ng/function/angular.noop/index/');
6969
var pageBody = element(by.css('h1'));
7070
expect(pageBody.getText()).toEqual('angular.noop');
7171
});
7272

7373

7474
it('should display formatted error messages on error doc pages', function() {
75-
browser.get('index-debug.html#!error/ng/areq?p0=Missing&p1=not%20a%20function,%20got%20undefined');
75+
browser.get('build/docs/index.html#!error/ng/areq?p0=Missing&p1=not%20a%20function,%20got%20undefined');
7676
expect(element(by.css('.minerr-errmsg')).getText()).toEqual("Argument 'Missing' is not a function, got undefined");
7777
});
7878

7979
it("should display an error if the page does not exist", function() {
80-
browser.get('index-debug.html#!/api/does/not/exist');
80+
browser.get('build/docs/index.html#!/api/does/not/exist');
8181
expect(element(by.css('h1')).getText()).toBe('Oops!');
8282
});
8383

0 commit comments

Comments
 (0)