-
Notifications
You must be signed in to change notification settings - Fork 12k
e2e devServerTarget doesn't seem to be working correctly #10697
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
Same issue here, when I tried to add the options to the
Only overriding the Are we misunderstanding what the |
Same issue here. I was surprised to see that the port for e2e is different than what I specified in myapp:serve. For now overriding just port is fine, but I am confused nevertheless. |
I am confused too. Documentation is very minimal and there needs to be more verbose examples of how to configure the angular.json file. Especially since the basic examples only show the argument way to define options, e.g --public-host, but doesnt explain if this is "publicHost" in the angular.json |
I am a god damn legend. I got it working, here is an example for you guys.
Output message from Angular: Angular Live Development Server is listening on myproject.com: 8000, open your browser on http://myproject.com:8000/ ** |
You've misunderstood the original issue. It's not about setting a port for serve target. |
Earlier we run --serve=false with --base-url or baseUrl(protractor.conf) for remote testing, but now that don't work. Any news about this bug? |
And i dont know why devServerTarget is a requirement either. --sever=false is a valid use case and now its gone |
I was able to delete Angular 6.0.8 |
With @tongfa's comment i was able to change host and port. Remove the But really it should be picking it up as intended from the serve:options in angular.json. |
I make it work and below is the stackoverflow link and details how it works |
Related: #11089 |
Heya, we weren't computing host and port correctly in our Protractor setup. #12507 should fix it. Sorry about that! |
This doesn't work for me, because it strips the appended path. When I run the tests it opens I can get Please add the previous functionality back. "e2e": {
"configurations": {
"noserve": {
"devServerTarget": "",
"baseUrl": "https://localhost/test/local/"
}
}, |
@MRHarrison You will have to take a look at your Can you post the result of that file? |
@Bjeaurn I changed the const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'https://localhost/test/local/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
}; |
Alright, you can still leave the I bet somewhere in your Only reason I know this by the way, is I ran into the exact same issue a week ago. I'm quite sure the application and framework are behaving as intended. |
@Bjeaurn What version are you using? Can't find another reference. When I switch from |
I confirm problem with URL stripping. We deployed many projects on a single Web server and using some path to access deployment. For example, having project A with version 1.2 and 1.3, next project B with version 0.0.1 and 0.0.2, then web server on http://dev.mycompany.com. Finally a target URL is http://dev.mycompany.com/A/1.2 but test failed because http://dev.mycompany.com/ is not an Angular application ... However as I have try to put baseUrl in Protractor configuration file, I suspect problem is on its side ? |
I found solution ... or the problem. Default generated E2E is accessing |
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. |
Versions
Repro steps
This may not be an issue, but rather a lack of understanding of how the new cli config works.
Again, maybe I am not understanding how this works, but I would think that if I set the devServerTarget e2e option then whatever configuration that server has it should pull through during the e2e task.
Observed behavior
Desired behavior
I would expect server to startup on the specified port that is set in myapp-app:serve.
Mention any other details that might be useful (optional)
If I set the port option directly in the myapp-app-e2e:e2e options section, then it does respect that and starts up the server on that port.
The text was updated successfully, but these errors were encountered: