question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng e2e no longer supports specifying a project name

See original GitHub issue

Bug Report or Feature Request (mark with an x)

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

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [x] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node -v
v10.9.0

npm -v
6.4.1

ng -v
Angular CLI: 6.2.1
Node: 10.9.0
OS: win32 x64
Angular: 6.1.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.8.1
@angular-devkit/build-angular      0.8.1
@angular-devkit/build-ng-packagr   0.8.1
@angular-devkit/build-optimizer    0.8.1
@angular-devkit/build-webpack      0.8.1
@angular-devkit/core               0.7.4
@angular-devkit/schematics         0.7.4
@angular/cli                       6.2.1
@angular/pwa                       0.7.4
@ngtools/json-schema               1.1.0
@ngtools/webpack                   6.2.1
@schematics/angular                0.7.4
@schematics/update                 0.8.1
ng-packagr                         4.1.1
rxjs                               6.2.2
typescript                         2.9.2
webpack                            4.18.0

Repro steps

  • Install angular-cli 6.2.1
  • Create an angular workspace with three projects:
    • project1
    • project2
    • project2-e2e - configured with a protractor.conf.js file to run tests against project2
  • Try to run ng e2e project2-e2e
  • The cli ignores the project name parameter, and tries to find an e2e architect node in angular.json, instead of running the actual project2-e2e configuration specified in angular.json
  • Re-order the projects in angular.json to:
    • project2
    • project1
    • project2-e2e
  • Re-run ng e2e project2-e2e
    • Because project2 is first in the list, it seems to run e2e tests for that project
  • Run ng e2e -h and notice that <project> is no longer an accepted paramter, even thought the docs say that it is still valid.
$ ng e2e -h
usage: ng e2e [options]
options:
  --configuration (-c)
    Specify the configuration to use.
  --prod
    Flag to set configuration to 'production'.

Desired functionality

This seems to work fine in Angular 6.1.4:

  • Run ng e2e -h and notice that <project> is an accepted parameter:
$ ng e2e -h
usage: ng e2e <project> [options]
options:
  --configuration (-c)
    Specify the configuration to use.
  --prod
    Flag to set configuration to 'production'.

Mention any other details that might be useful

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:7

github_iconTop GitHub Comments

2reactions
babealcommented, Sep 18, 2018

6.1.5 works as well, the problem starts at 6.2.0

0reactions
angular-automatic-lock-bot[bot]commented, Sep 8, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng e2e - Angular
The name of the project to build. Can be an application or a library. string. Options. Option, Description, Value Type, Default Value ...
Read more >
How to run e2e tests if Angular project is generated in NX ...
yarn run v1.22.10 $ nx e2e No project name specified. Using default project : web ​ ERROR Cannot find target 'e2e' for project...
Read more >
ng e2e - Angular
Option Description Value Type ‑‑base‑url Base URL for protractor to connect to. string ‑‑host Host to listen on. string ‑‑port The port to use to serve...
Read more >
Setting up End-to-End Testing in Angular Project ... - Medium
This means Selenium + WebDriver are no longer required. 1. Create a new Angular project with Angular CLI. $ ng new <project name>....
Read more >
Migrating an Angular CLI project to Nx
The automated migration supports Angular CLI workspaces with a standard ... Moves your e2e suites into the apps/<app name>-e2e folder, and updates the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found