Skip to content
Prev Previous commit
Add --base-href e2e tests with expected fail and spec changes to make…
… it pass
  • Loading branch information
suau committed Nov 22, 2016
commit 0bfd9ca840169621d053bd9ccf35e33d2ad3f37f
7 changes: 7 additions & 0 deletions tests/e2e/tests/test/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {ng, killAllProcesses} from '../../utils/process';
import {expectToFail} from '../../utils/utils';
import {ngServe} from '../../utils/project';
import {replaceInFile} from "../../utils/fs";


function _runServeAndE2e(...args: string[]) {
Expand All @@ -20,5 +21,11 @@ export default function() {
.then(() => _runServeAndE2e('--prod'))
.then(() => _runServeAndE2e('--aot'))
.then(() => _runServeAndE2e('--aot', '--prod'))
// this should fail because we haven't changed the e2e test yet
.then(() => expectToFail(() => _runServeAndE2e('--base-href /test-base-href/')))
.then(() => replaceInFile('e2e/app.po.ts',
'browser.get(\'/\');',
'browser.get(\'/test-base-href/\');'))
// now it should pass
.then(() => _runServeAndE2e('--base-href /test-base-href/'));
}