angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Do not run e2e if build fails with "ng e2e --serve=true"

Open victornoel opened this issue 9 years ago • 5 comments

Bug Report or Feature Request (mark with an x)

  • [ ] bug report -> please search issues before submitting
  • [x] feature request

Versions.

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.3.2
node: 8.4.0
os: linux x64
@angular/animations: 4.3.6
@angular/cdk: 2.0.0-beta.8
@angular/common: 4.3.6
@angular/compiler: 4.3.6
@angular/core: 4.3.6
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 4.3.6
@angular/http: 4.3.6
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 4.3.6
@angular/platform-browser-dynamic: 4.3.6
@angular/router: 4.3.6
@angular/cli: 1.3.2
@angular/compiler-cli: 4.3.6
@angular/language-service: 4.3.6

Repro steps.

With an application that does not build, if you run ng e2e, it will build it, the build will be shown as failed, but the e2e tests will be run nevertheless, which doesn't make any sense.

Desired functionality.

Simply fail ng e2e as soon as we detect the application can't be built.

victornoel avatar Sep 01 '17 09:09 victornoel

This sounds like a bug actually. I agree we shouldn't even try to run the e2e if the build failed.

filipesilva avatar Sep 05 '17 09:09 filipesilva

@filipesilva : I'd like to work on this defect and I identified the problematic part. Can you do me a small favor and tell me how can I test these changes locally?

If I am on right track, these are the files I need to change @angular/cli/commands/e2e.ts Where I need to change this line to catch the rejection handler.

And most likely also change the way the promise resolves in @angular/cli/tasks/serve.ts

I'm just having trouble figuring out how do I run my changes locally. Any help would be appreciated.

TIA

adityaparab avatar Sep 05 '17 11:09 adityaparab

@adityaparab you should take a look here https://github.com/angular/angular-cli#development-hints-for-working-on-angular-cli

maxime1992 avatar Sep 05 '17 11:09 maxime1992

@maxime1992 : Sweet! Thanks mate! That indeed is helpful.. I will submit a PR soon. :)

adityaparab avatar Sep 05 '17 11:09 adityaparab

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.