Skip to content

Commit 0bfd9ca

Browse files
committed
Add --base-href e2e tests with expected fail and spec changes to make it pass
1 parent d2fc15a commit 0bfd9ca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/e2e/tests/test/e2e.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {ng, killAllProcesses} from '../../utils/process';
22
import {expectToFail} from '../../utils/utils';
33
import {ngServe} from '../../utils/project';
4+
import {replaceInFile} from "../../utils/fs";
45

56

67
function _runServeAndE2e(...args: string[]) {
@@ -20,5 +21,11 @@ export default function() {
2021
.then(() => _runServeAndE2e('--prod'))
2122
.then(() => _runServeAndE2e('--aot'))
2223
.then(() => _runServeAndE2e('--aot', '--prod'))
24+
// this should fail because we haven't changed the e2e test yet
25+
.then(() => expectToFail(() => _runServeAndE2e('--base-href /test-base-href/')))
26+
.then(() => replaceInFile('e2e/app.po.ts',
27+
'browser.get(\'/\');',
28+
'browser.get(\'/test-base-href/\');'))
29+
// now it should pass
2330
.then(() => _runServeAndE2e('--base-href /test-base-href/'));
2431
}

0 commit comments

Comments
 (0)