PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

The issues when i run 'npm run e2e'

Open mengxiw opened this issue 10 years ago • 2 comments

The other steps can run, but when i run 'npm run e2e'. The following is error details.

[launcher] Running 1 instances of WebDriver Started FFFF

Failures:

  1. App should have a title Message: Expected '???? http://localhost:3000/' to equal 'Angular2 Webpack Starter by @gdi2990 from @AngularClass'. Stack: Error: Failed expectation at Object. (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\test\app\app.e2e.js:14:21) at C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasminewd2\index.js:96:23 at new wrappedCtr (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\selenium-webdriver\lib\goog\base.js:2468:26) at controlFlowExecute (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasminewd2\index.js:82:18) at goog.async.run.processWorkQueue (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\selenium-webdriver\lib\goog\async\run.j s:124:15) at process._tickCallback (node.js:382:9)

  2. App should have

    Message: Expected false to equal true. Stack: Error: Failed expectation at Object. (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\test\app\app.e2e.js:20:21) at C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasminewd2\index.js:96:23 at new wrappedCtr (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\selenium-webdriver\lib\goog\base.js:2468:26) at controlFlowExecute (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasminewd2\index.js:82:18) at goog.async.run.processWorkQueue (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\selenium-webdriver\lib\goog\async\run.j s:124:15) at process._tickCallback (node.js:382:9)

  3. App should have

    Message: Expected false to equal true. Stack: Error: Failed expectation at Object. (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\test\app\app.e2e.js:26:21) at C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasminewd2\index.js:96:23 at new wrappedCtr (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\selenium-webdriver\lib\goog\base.js:2468:26) at controlFlowExecute (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasminewd2\index.js:82:18) at goog.async.run.processWorkQueue (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\selenium-webdriver\lib\goog\async\run.j s:124:15) at process._tickCallback (node.js:382:9)

  4. App should have

    Message: Failed: No element found using locator: By.cssSelector("* /deep/ app /deep/footer") Stack: NoSuchElementError: No element found using locator: By.cssSelector("* /deep/app /deep/ footer") at new bot.Error (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\selenium-webdriver\lib\atoms\error.js:108:18) at C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\protractor\lib\element.js:676:15 at goog.async.run.processWorkQueue (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\selenium-webdriver\lib\goog\async\run.js:124:15) at process.tickCallback (node.js:382:9) Error at [object Object].ElementArrayFinder.applyAction (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\protractor\lib\element.js:382:21) at [object Object].ElementArrayFinder.(anonymous function) as getText at [object Object].ElementFinder.(anonymous function) [as getText](C:UsersAdministrator.XZ-20140618RVRFangular2-webpack-starternode_modulesprotrac torlibelement.js:711:7) at Object. (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\test\app\app.e2e.js:30:60) at C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasminewd2\index.js:96:23 at new wrappedCtr (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\selenium-webdriver\lib\goog\base.js:2468:26) at controlFlowExecute (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasminewd2\index.js:82:18) From: Task: Run it("should have
    ") in control flow at Object. (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasminewd2\index.js:81:14) at attemptAsync (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1819:24) at QueueRunner.run (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1774:9) at C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1801:16 at C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1745:9 at C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasminewd2\index.js:18:5 at goog.async.run.processWorkQueue (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\selenium-webdriver\lib\goog\async\run.j s:124:15) From asynchronous test: Error at Suite. (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\test\app\app.e2e.js:29:3) at addSpecsToSuite (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:743:25) at Env.describe (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:713:7) at jasmineInterface.describe (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:3219 :18) at Object. (C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\test\app\app.e2e.js:4:1)

4 specs, 4 failures Finished in 9.553 seconds [launcher] 0 instance(s) of WebDriver still running [launcher] chrome #1 failed 4 test(s) [launcher] overall: 4 failed spec(s) [launcher] Process exited with error code 1

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "run" "e2e" npm ERR! node v5.2.0 npm ERR! npm v3.3.12 npm ERR! code ELIFECYCLE npm ERR! [email protected] e2e: protractor npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] e2e script 'protractor'. 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 angular2-webpack-starter package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! protractor npm ERR! You can get their info via: npm ERR! npm owner ls angular2-webpack-starter npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Administrator.XZ-20140618RVRF\angular2-webpack-starter\npm-debug.log

I haven't seen this before, does anyone meet the same problem.

mengxiw avatar Jan 12 '16 13:01 mengxiw

you need to have webdriver running

PatrickJS avatar Jan 12 '16 19:01 PatrickJS

you need 3 terminals open. make sure you have we webdriver running https://github.com/AngularClass/angular2-webpack-starter#run-webdriver-for-end-to-end and the server https://github.com/AngularClass/angular2-webpack-starter#server and finially protractor https://github.com/AngularClass/angular2-webpack-starter#run-end-to-end-tests I'm closing this for now. You can reopen the issue or open another one if you run into anymore problems

PatrickJS avatar Jan 15 '16 06:01 PatrickJS