Skip to content

Commit

Permalink
fix(@angular/cli): allow e2e tests to run if no-serve and port is pro…
Browse files Browse the repository at this point in the history
…vided
  • Loading branch information
sumitarora authored and Brocco committed May 24, 2017
1 parent 169dc9e commit 3f10c5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/@angular/cli/tasks/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ export const E2eTask = Task.extend({
});
} else if (e2eTaskOptions.baseHref) {
additionalProtractorConfig.baseUrl = e2eTaskOptions.baseHref;
} else if (e2eTaskOptions.port) {
additionalProtractorConfig.baseUrl = url.format({
protocol: e2eTaskOptions.ssl ? 'https' : 'http',
hostname: e2eTaskOptions.host,
port: e2eTaskOptions.port.toString()
});
}

if (e2eTaskOptions.specs.length !== 0) {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/tests/test/e2e-baseurl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function () {
.then(() => ngServe())
.then(() => expectToFail(() => ng('e2e', '--no-serve')))
.then(() => ng('e2e', '--no-serve', '--base-href=http://localhost:4400'))
.then(() => ng('e2e', '--no-serve', '--port=4400'))
.then(() => killAllProcesses(), (err: any) => {
killAllProcesses();
throw err;
Expand Down

0 comments on commit 3f10c5a

Please sign in to comment.