-
Notifications
You must be signed in to change notification settings - Fork 12k
e2e respects publilcHost, but serve changes publicHost setting #14297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@alan-agius4 this is similar to #14165 right? |
Similar but this is a different bug which the above mentioned PR won’t address. |
I have been looking at this a bit and it seems that it is running as expected. The Looking at what you are passing as That said, the e2e builder is not handling the later option. |
The issue here appears to be that the dev server's The |
Should have been addressed by #14376 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
I dont know
Description
As it is now, e2e command is respecting the
publicHost
setting from serve command, and based on that it sets the baseUrl which is used by tests:angular-cli/packages/angular_devkit/build_angular/src/protractor/index.ts
Lines 123 to 131 in 7649214
However, the serve command itself modifies this value, and is getting rid of everything in the path, other than host:
angular-cli/packages/angular_devkit/build_angular/src/dev-server/index.ts
Line 154 in 7649214
Is it possible for the serve command to keep the configuration option intact? This way the
baseUrl
for e2e test run will be created correctly.Alternatively, the value of
baseUrl
option passed in protractor config could be respected, and concatenated with the calculated host frompublicHost
option. However, this way there is duplicate configuration: base url will be specified both for serve command and for e2e command.🔬 Minimal Reproduction
To reproduce, set the serve configuration options as following:
Then run
ng e2e
.🔥 Exception or Error
The browser will open with URL:
https://localhost/
instead ofhttps://localhost/custom-namespace/
🌍 Your Environment
It seems that my environment is older compared to the latest commit in this repository. However, it seems that the behaviour is largely similar, and
publicHost
is modified in the same way in older and newer versions.Anything else relevant?
The text was updated successfully, but these errors were encountered: