Skip to content

Commit 173d84b

Browse files
committed
test: fixing tests for landing page changes
1 parent 6ae3068 commit 173d84b

File tree

9 files changed

+30
-10
lines changed

9 files changed

+30
-10
lines changed

packages/@angular/cli/blueprints/ng/files/__path__/app/app.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!--The whole content below can be removed with the new code.-->
12
<div style="text-align:center">
23
<h1>
34
Welcome to {{title}}!!

tests/e2e/tests/build/assets.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ export default function () {
132132
});
133133
});`,
134134
}))
135-
// .then(() => !ejected && ng('test', '--single-run'))
136-
// .then(_ => killAllProcesses(), (err) => { killAllProcesses(); throw err; })
137-
.then(() => ng('e2e'));
135+
.then(() => !ejected && ng('test', '--single-run'))
136+
.then(() => !ejected && ng('e2e'));
138137
}

tests/e2e/tests/misc/default-port.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function() {
1212
.then(() => ngServe())
1313
.then(() => request('http://localhost:4201/'))
1414
.then(body => {
15-
if (!body.match(/<app-root>Loading...<\/app-root>/)) {
15+
if (!body.match(/<app-root><\/app-root>/)) {
1616
throw new Error('Response does not match expected value.');
1717
}
1818
})

tests/e2e/tests/misc/fallback.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function () {
1111
.then(() => ngServe())
1212
.then(() => request('http://localhost:4200/'))
1313
.then(body => {
14-
if (!body.match(/<app-root>Loading...<\/app-root>/)) {
14+
if (!body.match(/<app-root><\/app-root>/)) {
1515
throw new Error('Response does not match expected value.');
1616
}
1717
})
@@ -25,7 +25,7 @@ export default function () {
2525
.then(() => ngServe())
2626
.then(() => request('http://localhost:4200/'))
2727
.then(body => {
28-
if (!body.match(/<app-root>Loading...<\/app-root>/)) {
28+
if (!body.match(/<app-root><\/app-root>/)) {
2929
throw new Error('Response does not match expected value.');
3030
}
3131
})

tests/e2e/tests/misc/live-reload.ts

+20
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,26 @@ export default function () {
3636

3737
return Promise.resolve()
3838
.then(_ => writeMultipleFiles({
39+
'src/app/app.module.ts': `
40+
import { BrowserModule } from '@angular/platform-browser';
41+
import { NgModule } from '@angular/core';
42+
import { FormsModule } from '@angular/forms';
43+
import { HttpModule } from '@angular/http';
44+
import { AppComponent } from './app.component';
45+
@NgModule({
46+
declarations: [
47+
AppComponent
48+
],
49+
imports: [
50+
BrowserModule,
51+
FormsModule,
52+
HttpModule
53+
],
54+
providers: [],
55+
bootstrap: [AppComponent]
56+
})
57+
export class AppModule { }
58+
`,
3959
// e2e test that just opens the page and waits, so that the app runs.
4060
'./e2e/app.e2e-spec.ts': `
4161
import { browser } from 'protractor';

tests/e2e/tests/misc/ssl-default-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function() {
1212
.then(() => ngServe())
1313
.then(() => request('https://localhost:4200/'))
1414
.then(body => {
15-
if (!body.match(/<app-root>Loading...<\/app-root>/)) {
15+
if (!body.match(/<app-root><\/app-root>/)) {
1616
throw new Error('Response does not match expected value.');
1717
}
1818
})

tests/e2e/tests/misc/ssl-default.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function() {
88
.then(() => ngServe('--ssl', 'true'))
99
.then(() => request('https://localhost:4200/'))
1010
.then(body => {
11-
if (!body.match(/<app-root>Loading...<\/app-root>/)) {
11+
if (!body.match(/<app-root><\/app-root>/)) {
1212
throw new Error('Response does not match expected value.');
1313
}
1414
})

tests/e2e/tests/misc/ssl-with-cert-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function() {
1717
.then(() => ngServe())
1818
.then(() => request('https://localhost:4200/'))
1919
.then(body => {
20-
if (!body.match(/<app-root>Loading...<\/app-root>/)) {
20+
if (!body.match(/<app-root><\/app-root>/)) {
2121
throw new Error('Response does not match expected value.');
2222
}
2323
})

tests/e2e/tests/misc/ssl-with-cert.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function() {
1313
))
1414
.then(() => request('https://localhost:4200/'))
1515
.then(body => {
16-
if (!body.match(/<app-root>Loading...<\/app-root>/)) {
16+
if (!body.match(/<app-root><\/app-root>/)) {
1717
throw new Error('Response does not match expected value.');
1818
}
1919
})

0 commit comments

Comments
 (0)