am-date-picker
am-date-picker copied to clipboard
unit and e2e tests failing
Unit and e2e tests are failing here. I'm on a mac, tried to run with node 4.2.1
and 6.2.1
.
Maybe the problem were with a conflict of dependencies version during the bower install:
Unable to find a suitable version for angular, please choose one by typing one of the numbers below:
1) angular#~1.4.7 which resolved to 1.4.11 and is required by angular-material-date-picker
2) angular#^1.4.8 which resolved to 1.4.11 and is required by angular-material#1.0.9
3) angular#1.4.11 which resolved to 1.4.11 and is required by angular-mocks#1.4.11
4) angular#1.5.6 which resolved to 1.5.6 and is required by angular-animate#1.5.6, angular-aria#1.5.6, angular-messages#1.5.6
Prefix the choice with ! to persist it to bower.json
I tried all of the options above.
Unit test output:
> node node_modules/karma/bin/karma start test/karma.conf.js
06 06 2016 18:01:53.715:WARN [plugin]: Cannot find plugin "karma-firefox-launcher".
Did you forget to install it ?
npm install karma-firefox-launcher --save-dev
06 06 2016 18:01:53.720:WARN [plugin]: Cannot find plugin "karma-junit-reporter".
Did you forget to install it ?
npm install karma-junit-reporter --save-dev
06 06 2016 18:01:53.839:WARN [karma]: No captured browser, open http://localhost:9876/
06 06 2016 18:01:53.852:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
06 06 2016 18:01:53.865:INFO [launcher]: Starting browser Chrome
06 06 2016 18:01:55.454:INFO [Chrome 50.0.2661 (Mac OS X 10.11.5)]: Connected on socket /#3aXeeyuy1c9ZT424AAAA with id 89242995
Chrome 50.0.2661 (Mac OS X 10.11.5) am.date-picker directive unit tests should generate calendar FAILED
Expected 6 to be 2.
at Object.<anonymous> (/Users/william.martins/proj/am-date-picker/test/unit/am-date-picker.dialog.spec.js:142:50)
Expected false to be true.
at Object.<anonymous> (/Users/william.martins/proj/am-date-picker/test/unit/am-date-picker.dialog.spec.js:144:45)
Expected 2 to be 5.
at Object.<anonymous> (/Users/william.martins/proj/am-date-picker/test/unit/am-date-picker.dialog.spec.js:142:50)
Expected 31 to be 28.
at Object.<anonymous> (/Users/william.martins/proj/am-date-picker/test/unit/am-date-picker.dialog.spec.js:143:40)
Expected false to be true.
at Object.<anonymous> (/Users/william.martins/proj/am-date-picker/test/unit/am-date-picker.dialog.spec.js:144:45)
Chrome 50.0.2661 (Mac OS X 10.11.5) am.date-picker directive unit tests should generate calendar with disabled days FAILED
Expected false to be true.
at Object.<anonymous> (/Users/william.martins/proj/am-date-picker/test/unit/am-date-picker.dialog.spec.js:183:45)
Expected true to be false.
at Object.<anonymous> (/Users/william.martins/proj/am-date-picker/test/unit/am-date-picker.dialog.spec.js:193:45)
Chrome 50.0.2661 (Mac OS X 10.11.5) am.date-picker directive unit tests should generate calendar for next month FAILED
Expected 31 to be 29.
at Object.<anonymous> (/Users/william.martins/proj/am-date-picker/test/unit/am-date-picker.dialog.spec.js:284:36)
Chrome 50.0.2661 (Mac OS X 10.11.5): Executed 40 of 40 (3 FAILED) (1.194 secs / 1.174 secs)
E2e test output:
> webdriver-manager update
selenium standalone is up to date.
chromedriver is up to date.
> [email protected] protractor /Users/william.martins/proj/am-date-picker
> protractor test/protractor-conf.js
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
/Users/william.martins/proj/am-date-picker/node_modules/selenium-webdriver/http/index.js:172
callback(new Error(message));
^
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (/Users/william.martins/proj/am-date-picker/node_modules/selenium-webdriver/http/index.js:172:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:306:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1272:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (/Users/william.martins/proj/am-date-picker/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
at Function.webdriver.WebDriver.createSession (/Users/william.martins/proj/am-date-picker/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
at Builder.build (/Users/william.martins/proj/am-date-picker/node_modules/selenium-webdriver/builder.js:445:22)
at DriverProvider.getNewDriver (/Users/william.martins/proj/am-date-picker/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
at Runner.createBrowser (/Users/william.martins/proj/am-date-picker/node_modules/protractor/lib/runner.js:182:37)
at /Users/william.martins/proj/am-date-picker/node_modules/protractor/lib/runner.js:263:21
at _fulfilled (/Users/william.martins/proj/am-date-picker/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/Users/william.martins/proj/am-date-picker/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/Users/william.martins/proj/am-date-picker/node_modules/q/q.js:759:13)
at /Users/william.martins/proj/am-date-picker/node_modules/q/q.js:525:49
[launcher] Process exited with error code 1
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/william.martins/.nvm/versions/node/v6.2.1/bin/node" "/Users/william.martins/.nvm/versions/node/v6.2.1/bin/npm" "run" "protractor"
npm ERR! node v6.2.1
npm ERR! npm v3.9.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] protractor: `protractor test/protractor-conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] protractor script 'protractor test/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 angular-material-datepicker package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! protractor test/protractor-conf.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-material-datepicker
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-material-datepicker
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/william.martins/proj/am-date-picker/npm-debug.log
Hi,
Did you get this errors on branch master
?
I've just run unit and e2e tests, and everything seems fine. I'm running OS X 10.11 with npm 3.9.3
and node 6.2.1
.
Yes, I'm on branch master
. It is probably a conflict version problem, between the newer versions of the dependencies, as they are not exactly marked on package.json
and bower.json
.
Maybe you will see the same errors if you delete the dependencies folders and install again, or just clone and run it again in another place.
I cloned master branch. Ran npm install
. In the dependencies dialog, I chose
1) angular#~1.4.7 which resolved to 1.4.11 and is required by angular-material-date-picker
Then I ran unit and e2e tests and everything went fine.
If it helps, here is my output for npm --versions
:
{ 'angular-material-datepicker': '0.2.0',
npm: '3.9.3',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '57.1',
modules: '48',
node: '6.2.1',
openssl: '1.0.2h',
uv: '1.9.1',
v8: '5.0.71.52',
zlib: '1.2.8' }
I have the same versions and also on OS X 10.11
~/proj/am-date-picker [master] » npm --versions
{ 'angular-material-datepicker': '0.2.0',
npm: '3.9.3',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '57.1',
modules: '48',
node: '6.2.1',
openssl: '1.0.2h',
uv: '1.9.1',
v8: '5.0.71.52',
zlib: '1.2.8' }
Maybe your local npm and bower still have some resolution cache. Can you try clean their out with this commands below?
npm cache clean && bower cache clean
It's all the same, all tests completed with success. For the sake of clarity, I'll try to run tests on Ubuntu tomorrow.
Sorry, I didn't have time to run tests on Ubuntu, but I'll try it as soon as possible. I've also noticed that I've got Chrome 51.0.2704 installed and you are using Chrome 50.0.2661.