Skip to content

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

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

Closed
1 of 2 tasks
victornoel opened this issue Sep 1, 2017 · 5 comments · Fixed by #7902
Closed
1 of 2 tasks

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

victornoel opened this issue Sep 1, 2017 · 5 comments · Fixed by #7902
Assignees
Labels
help wanted P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity2: inconvenient type: bug/fix

Comments

@victornoel
Copy link

Bug Report or Feature Request (mark with an x)

  • bug report -> please search issues before submitting
  • 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.

@filipesilva
Copy link
Contributor

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

@filipesilva filipesilva self-assigned this Sep 5, 2017
@filipesilva filipesilva added help wanted P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity2: inconvenient type: bug/fix labels Sep 5, 2017
@adityaparab
Copy link
Contributor

adityaparab commented Sep 5, 2017

@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

@maxime1992
Copy link
Contributor

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

@adityaparab
Copy link
Contributor

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

hansl pushed a commit that referenced this issue Oct 6, 2017
when ng e2e --serve=true is run and the build is not successful e2e task
should not be run

previously the e2e task was run even if build was a failure which will
obviously result in failure of test cases
now if errors are detected in build the e2e task will not be run
update docs as well to reflect this behaviour

Closes #7567
hansl pushed a commit that referenced this issue Oct 10, 2017
when ng e2e --serve=true is run and the build is not successful e2e task
should not be run

previously the e2e task was run even if build was a failure which will
obviously result in failure of test cases
now if errors are detected in build the e2e task will not be run
update docs as well to reflect this behaviour

Closes #7567
hansl pushed a commit that referenced this issue Oct 10, 2017
when ng e2e --serve=true is run and the build is not successful e2e task
should not be run

previously the e2e task was run even if build was a failure which will
obviously result in failure of test cases
now if errors are detected in build the e2e task will not be run
update docs as well to reflect this behaviour

Closes #7567
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this issue Apr 23, 2018
when ng e2e --serve=true is run and the build is not successful e2e task
should not be run

previously the e2e task was run even if build was a failure which will
obviously result in failure of test cases
now if errors are detected in build the e2e task will not be run
update docs as well to reflect this behaviour

Closes angular#7567
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity2: inconvenient type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants