This package was serving two purposes: * Install chromedriver automatically. * Start chromedriver automatically when using the 'npm run selenium' entry point (e.g. for local development). For the CI entry points (selenium-test, selenium-daily) the chromedriver is skipped. For those, we expect the CI runner to have started a chromedriver server already, which allows the server to continue running between different the test suites of different extensions etc. By letting WDIO start the chromedriver for local development, we had the benefit of 'npm run selenium' directly being an alias to the 'wdio' command. This made it easy to pass additional arguments like --spec or --mochaOpts for running specific tests only and overall makes things easier to reason about from a developer perspective with fewer (required) layers of indirection you see and need to understand when debugging. But, this has also caused problems. Specifically, it means developers have to use the same version of Chrome locally as we specify in package.json which isn't very flexible. While we could try to keep this up-to-date roughly, that too isn't an option because the secure environments we recommend for local use (Quibble and Fresh-node) both use a Debian distro with typically older versions of Chromium than your local auto-updating Google Chrome. For now, let's go back to moving the responsibility of installing chromedriver together with the responsibility to install Chrome itself. == Changes == For CI, nothing changes (it already installs both). For developers using Quibble, Vagrant or Fresh nothing changes (already installs both). For developers who make their own secure environment, they will need to make sure chromedriver is installed, just as we required between 2017 and Aug 2019 before my commit1955a8aa56. == How == wdio-chromedriver cannot start a foreign install because the protocol can change between versions, so unfortunately together with not using chromedriver from npm, we also can't use the wdio-chromedriver autostart mechanism. Instead, I'm bringing back Antoine's shell script that did this prior toebda397c54. But, with a few tweaks so that it forwards shell arguments, this way developers continue to enjoy the benefit of1955a8aa56, which is that 'npm run selenium -- --spec foo.js' works. Bug: T234610 Change-Id: I03ca94315d0611d2b6abccc12cf9076d41b2c00e
45 lines
1.4 KiB
JSON
45 lines
1.4 KiB
JSON
{
|
|
"private": true,
|
|
"scripts": {
|
|
"api-testing": "mocha --timeout 0 --recursive tests/api-testing",
|
|
"build": "grunt minify",
|
|
"test": "grunt lint",
|
|
"qunit": "grunt qunit",
|
|
"doc": "jsduck",
|
|
"postdoc": "grunt copy:jsduck",
|
|
"selenium": "./tests/selenium/selenium.sh",
|
|
"selenium-daily": "npm run selenium-test -- --mochaOpts.grep @daily",
|
|
"selenium-test": "wdio ./tests/selenium/wdio.conf.js"
|
|
},
|
|
"devDependencies": {
|
|
"@wdio/cli": "5.13.2",
|
|
"@wdio/devtools-service": "5.13.2",
|
|
"@wdio/dot-reporter": "5.13.2",
|
|
"@wdio/junit-reporter": "5.13.2",
|
|
"@wdio/local-runner": "5.13.2",
|
|
"@wdio/mocha-framework": "5.13.2",
|
|
"@wdio/sauce-service": "5.13.2",
|
|
"@wdio/sync": "5.13.2",
|
|
"api-testing": "^1.0.2",
|
|
"eslint-config-wikimedia": "0.15.0",
|
|
"grunt": "1.0.4",
|
|
"grunt-banana-checker": "0.8.1",
|
|
"grunt-contrib-copy": "1.0.0",
|
|
"grunt-contrib-watch": "1.1.0",
|
|
"grunt-eslint": "22.0.0",
|
|
"grunt-karma": "3.0.2",
|
|
"grunt-stylelint": "0.12.0",
|
|
"grunt-svgmin": "5.0.0",
|
|
"jpeg-js": "0.3.5",
|
|
"karma": "3.1.4",
|
|
"karma-chrome-launcher": "2.2.0",
|
|
"karma-firefox-launcher": "1.1.0",
|
|
"karma-mocha-reporter": "2.2.5",
|
|
"karma-qunit": "2.1.0",
|
|
"postcss-less": "2.0.0",
|
|
"qunit": "2.9.1",
|
|
"stylelint-config-wikimedia": "0.7.0",
|
|
"wdio-mediawiki": "file:tests/selenium/wdio-mediawiki",
|
|
"webdriverio": "5.13.2"
|
|
}
|
|
}
|