Skip to content

Project generated with Angular CLI ng new command fails e2e test out of the box if you use the --prefix option (angular-cli: 1.0.0-beta.11-webpack.2) #2046

Closed
@jrschmidt

Description

@jrschmidt

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Linux Ubuntu 16.04
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:

$ ng --version
angular-cli: 1.0.0-beta.11-webpack.2
node: 6.5.0
os: linux x64

3 Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.

I generated a new project with angular-cli 1.0.0-beta.11-webpack.2 using the command

ng new pftest --prefix pft.

Then I successfully ran ng serve and ng test, but encountered a failure when I ran ng e2e.

4 The log given by the failure. Normally this include a stack trace and some
more information.

Results of command ng e2e:

Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.

> pftest@0.0.0 pree2e /home/john/projects/pftest
> webdriver-manager update

selenium standalone is up to date.
chromedriver is up to date.

> pftest@0.0.0 e2e /home/john/projects/pftest
> protractor "config/protractor.conf.js"

[14:36:55] I/direct - Using ChromeDriver directly...
[14:36:55] I/launcher - Running 1 instances of WebDriver
Spec started

pftest App
✗ should display message saying app works
- Expected 'app works!' to equal 'pft works!'.

**************************************************
* Failures *
**************************************************

1) pftest App should display message saying app works
- Expected 'app works!' to equal 'pft works!'.

Executed 1 of 1 spec (1 FAILED) in 0.905 sec.
[14:36:56] I/launcher - 0 instance(s) of WebDriver still running
[14:36:56] I/launcher - chrome #01 failed 1 test(s)
[14:36:56] I/launcher - overall: 1 failed spec(s)
[14:36:56] E/launcher - Process exited with error code 1

npm ERR! Linux 4.6.0-040600-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "e2e" "--" "config/protractor.conf.js"
npm ERR! node v6.5.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! pftest@0.0.0 e2e: protractor "config/protractor.conf.js"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pftest@0.0.0 e2e script 'protractor "config/protractor.conf.js"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pftest package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! protractor "config/protractor.conf.js"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pftest
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pftest
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/john/projects/pftest/npm-debug.log

Some end-to-end tests failed, see above.

5 Mention any other details that might be useful.

From e2e/app.e2e-spec.ts:

it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('pft works!');
});

After encountering this error with a new project and the prefix 'fam', I reproduced it by starting a brand new project (named pftest) with the ng new command and the --prefix option, using the prefix pft.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenteffort1: easy (hours)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions