Skip to content

Commit 0df3f7c

Browse files
sumitarorahansl
authored andcommitted
test: e2e test for "--base-href"
1 parent 81403e8 commit 0df3f7c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/e2e/tests/test/e2e-baseurl.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
import { ng, killAllProcesses } from '../../utils/process';
22
import { expectToFail } from '../../utils/utils';
3+
import { ngServe } from '../../utils/project';
4+
import { updateJsonFile } from '../../utils/project';
35

46
export default function () {
57
return Promise.resolve()
6-
.then(() => ng('serve', '--port', '4400'))
7-
.then(() => expectToFail(() => ng('e2e')))
8-
.then(() => ng('e2e', '--no-serve', '--base-url=http://localhost:4400'))
8+
.then(() => expectToFail(() => ng('e2e', '--no-serve')))
9+
.then(() => updateJsonFile('.angular-cli.json', configJson => {
10+
const app = configJson.defaults;
11+
app.serve = { port: 4400 };
12+
}))
13+
.then(() => ngServe())
14+
.then(() => expectToFail(() => ng('e2e', '--no-serve')))
15+
.then(() => ng('e2e', '--no-serve', '--base-href=http://localhost:4400'))
916
.then(() => killAllProcesses(), (err: any) => {
1017
killAllProcesses();
1118
throw err;

0 commit comments

Comments
 (0)