unit testing - AngularJS e2e tests protractor setup -
i spent day trying setup test setup angularjs. had generated angular app yo angular , modified grunt conf file so:
// test settings karma: { e2e: { configfile: 'karma-e2e.conf.js' }, unit: { configfile: 'karma.conf.js' } } carma config file: https://gist.github.com/trkisf2/10919353
karma e2e conf file: https://gist.github.com/trkisf2/10919425
the unit tests work (grunt karma:unit) don't know how setup e2e tests , after day pretty desperate.
first should setup protractor right? (plus setup phantomjs well? browser not open always)
i had reinstalled node today few times...
i came here: https://github.com/angular/protractor/blob/master/docs/getting-started.md
and tried install protractor
npm http 304 https://registry.npmjs.org/minimatch npm http https://registry.npmjs.org/lru-cache npm http https://registry.npmjs.org/sigmund npm http 304 https://registry.npmjs.org/sigmund npm http 304 https://registry.npmjs.org/lru-cache /home/trki/npm/bin/protractor -> /home/trki/npm/lib/node_modules/protractor/bin/protractor /home/trki/npm/bin/webdriver-manager -> /home/trki/npm/lib/node_modules/protractor/bin/webdriver-manager protractor@0.21.0 /home/trki/npm/lib/node_modules/protractor ├── saucelabs@0.1.1 ├── q@1.0.0 ├── minijasminenode@0.2.7 ├── adm-zip@0.4.4 ├── lodash@2.4.1 ├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.8) ├── glob@3.2.9 (inherits@2.0.1, minimatch@0.2.14) └── selenium-webdriver@2.40.0 and point lost. next?
webdriver-manager update zsh: command not found: webdriver-manager
you should use full path call webdriver-manager. in 1 of node_modules directories:
node_modules/protractor/bin/webdriver-manager update and true protractor:
node_modules/protractor/bin/protractor configfile (protractor won't without config file. should create 1 first , tests well.)
you can find prebuil/example environment here: https://github.com/angular/angular-seed
(actually me project needed setting: npm config set strict-ssl false , had remove ^~ characters version numbers in package.json file, otherwise contains example configs/settings/test skeletons.)
Comments
Post a Comment