I'm having trouble writing a npm script for starting my protractor tests. Following the documentation https://github.com/angular/protractor/blob/master/docs/server-setup.md seems that first I have to run
webdriver-manager start
and leave it running while I'm starting the actual tests
./node_modules/.bin/protractor test/integration/conf.js
I want these two steps to execute inside one npm script, so I would end up with something like this:
"scripts": {
"protractor-update": "./node_modules/.bin/webdriver-manager update",
"protractor-start": "./node_modules/.bin/webdriver-manager start",
"protractor-init": "npm run protractor-update && npm run protractor-start",
"test-protractor": "npm run protractor-start && ./node_modules/.bin/protractor test/integration/conf.js",
},
Now obviously the problem is that ./node_modules/.bin/webdriver-manager start doesn't return an exit code so it never makes to the next command.
What would be the proper way of achieving this?