Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/e2e/tests/i18n/extract-default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function() {
.then(() => writeFile(
join('src/app/i18n-test', 'i18n-test.component.html'),
'<p i18n>Hello world</p>'))
.then(() => ng('xi18n', '--no-progress'))
.then(() => ng('xi18n'))
.then(() => expectFileToExist(join('src', 'messages.xlf')))
.then(() => expectFileToMatch(join('src', 'messages.xlf'), /Hello world/));
}
2 changes: 1 addition & 1 deletion tests/e2e/tests/i18n/extract-output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function() {
.then(() => writeFile(
join('src/app/i18n-test', 'i18n-test.component.html'),
'<p i18n>Hello world</p>'))
.then(() => ng('xi18n', '--no-progress', '--output-path', 'src/locale'))
.then(() => ng('xi18n', '--output-path', 'src/locale'))
.then(() => expectFileToExist(join('src', 'locale', 'messages.xlf')))
.then(() => expectFileToMatch(join('src', 'locale', 'messages.xlf'), /Hello world/));
}
2 changes: 1 addition & 1 deletion tests/e2e/tests/i18n/extract-xmb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function() {
.then(() => writeFile(
join('src/app/i18n-test', 'i18n-test.component.html'),
'<p i18n>Hello world</p>'))
.then(() => ng('xi18n', '--no-progress', '--i18n-format', 'xmb'))
.then(() => ng('xi18n', '--i18n-format', 'xmb'))
.then(() => expectFileToExist(join('src', 'messages.xmb')))
.then(() => expectFileToMatch(join('src', 'messages.xmb'), /Hello world/));
}
4 changes: 2 additions & 2 deletions tests/e2e/tests/misc/minimal-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function () {
}],
e2e: { protractor: { config: './protractor.conf.js' } }
})))
.then(() => ng('e2e', '--no-progress'))
.then(() => ng('e2e'))
.then(() => writeMultipleFiles({
'./src/script.js': `
document.querySelector('app-root').innerHTML = '<h1>app works!</h1>';
Expand All @@ -40,5 +40,5 @@ export default function () {
e2e: { protractor: { config: './protractor.conf.js' } }
}),
}))
.then(() => ng('e2e', '--no-progress'));
.then(() => ng('e2e'));
}
12 changes: 6 additions & 6 deletions tests/e2e/tests/test/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ export default function () {
// Should fail without serving
.then(() => expectToFail(() => ng('e2e', '--no-serve')))
// These should work.
.then(() => ng('e2e', '--no-progress'))
.then(() => ng('e2e', '--prod', '--no-progress'))
.then(() => ng('e2e'))
.then(() => ng('e2e', '--prod'))
// Should use port in baseUrl
.then(() => ng('e2e', '--port', '4400', '--no-progress'))
.then(() => ng('e2e', '--port', '4400'))
// Should accept different config file
.then(() => moveFile('./protractor.conf.js', './renamed-protractor.conf.js'))
.then(() => ng('e2e', '--config', './renamed-protractor.conf.js', '--no-progress'))
.then(() => ng('e2e', '--config', './renamed-protractor.conf.js'))
.then(() => moveFile('./renamed-protractor.conf.js', './protractor.conf.js'))
// Should accept different multiple spec files
.then(() => moveFile('./e2e/app.e2e-spec.ts', './e2e/renamed-app.e2e-spec.ts'))
.then(() => copyFile('./e2e/renamed-app.e2e-spec.ts', './e2e/another-app.e2e-spec.ts'))
.then(() => ng('e2e', '--specs', './e2e/renamed-app.e2e-spec.ts',
'--specs', './e2e/another-app.e2e-spec.ts', '--no-progress'))
'--specs', './e2e/another-app.e2e-spec.ts'))
// Should start up Element Explorer
.then(() => execAndWaitForOutputToMatch('ng', ['e2e', '--element-explorer', '--no-progress'],
.then(() => execAndWaitForOutputToMatch('ng', ['e2e', '--element-explorer'],
/Element Explorer/))
.then(() => killAllProcesses(), (err: any) => {
killAllProcesses();
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/utils/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ export function silentExecAndWaitForOutputToMatch(cmd: string, args: string[], m
}

export function ng(...args: string[]) {
if (args[0] == 'build' || args[0] == 'serve' || args[0] == 'test') {
// Auto-add --no-progress to commands that build the app, otherwise we get thousands of lines.
if (['build', 'serve', 'test', 'e2e', 'xi18n'].indexOf(args[0]) != -1) {
return silentNg(...args, '--no-progress');
} else {
return _exec({}, 'ng', args);
Expand Down