aboutsummaryrefslogtreecommitdiffstats
path: root/package.json
Commit message (Collapse)AuthorAgeFilesLines
* build: Remove 'npm run api-testing-lint' commandTimo Tijhof2021-05-211-2/+2
| | | | | | | | | | | | | | | | | These files are already linted by 'npm test'. For running only the tests, there is no need to lint them first. If there are critical syntax errors than Node will report these in a useful way either way. For quick feedback on the right style during development, one can use an IDE plugin that provides it even quicker. Alternatively, one could use 'eslint path/to/subset' to run only the lint step. I've added a 'npm run lint' command to make this easier, e.g. when iterating on the style for contributors without an IDE plugin that want to confirm all lint failures from CI were addressed. Change-Id: Ic09de49543e50cb5ade241b45741fbdb397f9954
* selenium: Record videos using Xvfb+ffmpegŽeljko Filipin2021-05-201-1/+0
| | | | | | | | | | | | | | | | | | Unil 2020-06-15 we were using Xvfb+ffmpeg to record videos. In eed975d we have switched to wdio-video-reporter npm package. It has never worked very well. It does not really record videos. It creates screenshots and creates videos from them. It does not record modal popups. Sometimes, it doesn't create a video for a test at all. I think it's time to switch back to Xvfb+ffmpeg. It has worked well. The reason we moved to wdio-video-reporter was that it worked on all platforms. That's not really important any more, since Xvfb+ffmpeg works in a Fresh container. Bug: T253113 Change-Id: I221775208576b6496f682ceefd6e6334db488bd4
* build: Upgrade karma and related dependencies to 6.xJames D. Forrester2021-05-191-1/+1
| | | | Change-Id: I378c3580668fe35e5341ddf10929618147c6eb35
* build: Update SVGO to latest v2.3.0 and re-crush SVGsVolker E2021-05-181-3/+4
| | | | | | | | | SVGO v2.x changed configuration to JS, amending configuration. Adding new 'minify-svg' npm script. Also re-crushing SVGs. Bug: T278656 Change-Id: I1d746fca051cbc00900a05c33e8a401f95848930
* selenium: Fix failing selenium-daily-beta(commons)-MediaWiki Jenkins jobŽeljko Filipin2021-04-301-1/+1
| | | | | | | | | | | | | | | | The jobs are running a subset of tests. (Tests containing string `@daily` in the name.) To find the tests we are using `--mochaOpts.grep` WebdriverIO command line option. The filter is executed after the tests have already started. Since some test files have no tests with string `@daily`, they are skipped. That results in JUnit reporter creating a couple of empty XML files. Jenkins thinks empty files are failures and fails the build. This commit creates a suite of files that have tests with string `@daily` and runs only those files. Bug: T281505 Change-Id: Id844da81feac49f2a2b6820e98ead98d7e932e9f
* selenium: remove @wdio/devtools-service NPM packageŽeljko Filipin2021-04-161-1/+0
| | | | | | | | | | | | | Devtools Service is "A WebdriverIO service that allows you to run Chrome DevTools commands in your tests". It was introduced in 2019 (1955a8a) but we are not using it. For more information see: https://webdriver.io/docs/devtools-service/ Bug: T280334 Change-Id: I718bd5bbcff56c294025f9e3f2fb3de67e1ed9c6
* build: Update eslint-config-wikimedia to 0.20.0Ed Sanders2021-04-081-1/+1
| | | | Change-Id: Ia26ba71e1c41e7564ec60d78d4eb1492de7269d2
* selenium: Delete Sauce Labs NPM packageŽeljko Filipin2021-03-301-1/+0
| | | | | | | We are no longer using Sauce Labs. Configuration was removed in ee14595. Bug: T248221 Change-Id: I855597f43c91210662a155c4c549bda314361c00
* build: Updating eslint-config-wikimedia to 0.19.0libraryupgrader2021-03-121-1/+1
| | | | | | | Additional changes: * Dropped .php5 and .inc files from .phpcs.xml (T200956). Change-Id: I66c9980d3ef6f6604c3145ad0b7f308257dff046
* build: Upgrade eslint-config-wikimedia from 0.18.1 to 0.18.2James D. Forrester2021-03-041-1/+1
| | | | Change-Id: Ie8d892c1e76330ea63ef834f216b6087cbf7e69c
* build: Upgrade eslint-config-wikimedia from 0.17.0 to 0.18.1James D. Forrester2021-02-181-1/+1
| | | | Change-Id: I5e3687be2b197134578126e1b890ee37dbc1bc1b
* build: Updating npm dependencieslibraryupgrader2021-01-031-44/+44
| | | | | | | | | | | * ini: 1.3.5 → 1.3.8 * https://npmjs.com/advisories/1589 Additional changes: * Removed useless -p option to phpcbf in "composer fix" command. * Set `root: true` in .eslintrc.json (T206485). Change-Id: I0116578751fd73e43b07c2830adc629f4b85c784
* Selenium: Delete tests/selenium/selenium.shŽeljko Filipin2020-12-231-1/+0
| | | | | | | | | | | | Also remove selenium NPM script that calls the file. There was a time when both the file and the script were used. As far as I know, both the file and the script are no longer used. Selenium tests are now using selenium-test NPM script, both in core and in extensions and skins. Bug: T270419 Change-Id: I817f64b6d0a0efd64cd3fd9334e51336ceb9865f
* Selenium: fix selenium-daily NPM scriptŽeljko Filipin2020-12-091-1/+1
| | | | | | | | | | | | | b8a2e21 removed hard-coded values for environment variables from wdio.conf.js. That caused a couple of Jenkins jobs to fail because MW_SCRIPT_PATH environment variable was not set. This patch adds the variable to selenium-daily NPM script, executed by the failing Jenkins jobs. The alternative is to add the variable to the Jenkins job configuration. Bug: T269755 Change-Id: I3c65db297b28449f000a8a79978ba777782f5ffa
* Selenium: Target Mediawiki-Docker by defaultHarriet Ayugi2020-12-081-0/+1
| | | | | | | | Removed default values for MEDIAWIKI_USER, MEDIAWIKI_PASSWORD, MW_SERVER and MW_SCRIPT_PATH in wdio.conf.js in order to use values from the .env file. Bug: T247312 Change-Id: I728c705b476f7741982d7e7c3e0ed219f2fcd054
* Update stylelint-config-wikimedia to 0.10.3Ed Sanders2020-11-191-2/+2
| | | | | | Remove needless disables. Change-Id: I324ab9d23a354cb0298a0714df2535f8e8850261
* build: Upgrade grunt from 1.1.0 to 1.3.0James D. Forrester2020-10-221-1/+1
| | | | Change-Id: I3fdb8738963c222e1b17196951c5469baf037b37
* Selenium: Bump wdio-video-reporter to v3.1.1alqaholic0072020-10-221-1/+1
| | | | | | | | | | | wdio-video-reporter resolves some important issues related to not attaching non-jsonwire events to screenshots. For more info refer: https://github.com/presidenten/wdio-video-reporter/issues/45 Bug: T253113 Change-Id: Iecb156aec2106e92c66c78005866a7b77571b26f
* build: Auto-fix npm audit issuesalqaholic0072020-09-101-1/+1
| | | | | Bug: T262438 Change-Id: Ic463fede8c4a5c364ea05f9437e4a3cb4abcfa22
* build: Update eslint-config-wikimedia to 0.17.0Ed Sanders2020-08-201-1/+1
| | | | | | Fix remaining instances of variable shadowing. Change-Id: I2a3840446f1fe138410249cc35be5ddf262d8e46
* UserContributions endpoint add tags 'display' propertyNikki Nikkhoui2020-08-191-1/+1
| | | | | | | | | | | Add a property to the 'tags' object in the /user/{name}/contributions REST endpoint named 'display' which shows the display HTML for the tag which is either defined in i18n .json files or overriden at MediaWiki:tag-$name Bug: T259716 Depends-On: I57e2a7253944a3fde3f52f52bbf5fe8473c8a415 Change-Id: Id755adcab8b0115e19df2a6046643ebe97881e28
* REST /me/contributions: return change tagsNikki Nikkhoui2020-06-251-1/+1
| | | | | | | | The endpoint for user contributions should include change tags in the result. Bump the version of npm module api-testing. Bug: T252202 Change-Id: Iccc0c378bc65d0f34b38557f4c78f424d95a951f
* build: Update eslint-config-wikimedia to 0.16.2Ed Sanders2020-06-181-1/+1
| | | | | | Use jsduck config. Change-Id: I3a1a0c8f0ca535c9661b3774498866fdb98a4255
* api-testing: Use wikimedia/mocha eslint configEd Sanders2020-06-181-1/+1
| | | | Change-Id: Iec346d87f252c66fbff1e0fa522d7440df6f1764
* Selenium: Use wdio-video-reporter for recording test videosalqaholic0072020-06-151-0/+1
| | | | | | | | | | | | | | | Earlier versions of WebdriverIO lacked support for video recording. Starting with WebdriverIO v5, a new package wdio-video-reporter has been introduced which is used to replace ffmpeg and Xvfb. Limitations: - Alert messages and pop-ups do not get displayed in the videos. New Packages: - wdio-video-reporter Bug: T255253 Change-Id: Id443779959bfac55eae42e16e10d1f20c25375bb
* REST /me/contributions: return revisionsdaniel2020-06-091-1/+1
| | | | | | | | | | | This is part of a chain of patches to complete the REST User Contributions endpoint. This change returns a list of the 2 (hard-coded for now) most recent revisions for a given user. Package.json was also updated for new api-testing module (v 1.1.0) Bug: T252202 Change-Id: I42a5dfc0e1ff7600848e89ac2c4b002e8a3612df
* eslint: Update to eslint-config-wikimedia 0.16.0Ed Sanders2020-06-021-2/+2
| | | | | | | * valid-jsdoc replaced with jsdoc plugin * New /selenium config Change-Id: I471eebac0312cb25c539c3f6a3ecfc7cfd4ed8d6
* Selenium: Update to WebdriverIO v6vidhi-mody2020-05-211-9/+9
| | | | | | | Update NPM packages: @wdio/* and webdriverio. Bug: T253306 Change-Id: Id073b4924a00af2078117191d27ba9443dbb67ec
* Revert "Selenium: Use wdio-video-reporter to record videos of test run"Zfilipin2020-05-201-1/+0
| | | | | | | | | This reverts commit babbbbc6e5aabfe641b5c10da235b5743f325257. Reason for revert: Video recording only works with WebdriverIO v5. It doesn't work with v6. Bug: T252523 Change-Id: I5dd0bb5ef03bcf5337207c63d26755e983634787
* Selenium: Use wdio-video-reporter to record videos of test runAlQaholic0072020-05-141-0/+1
| | | | | | | | | | | | Earlier versions of WebdriverIO lacked support for video recording. Starting with WebdriverIO v5, a new package wdio-video-reporter has been introduced which is used to replace ffmpeg and Xvfb. Limitations: - Alert messages and pop-ups do not get displayed in the videos. Bug: T252523 Change-Id: I6c964467066eb30e28a3435ddf7831a4e296b8f5
* build: Upgrade karma-related devDependencies to latestJames D. Forrester2020-05-041-3/+3
| | | | | | | | grunt-karma 3.0.2 → 4.0.0 karma 4.4.1 → 5.0.4 karma-qunit 4.0.0 → 4.1.0 Change-Id: I4e91df8076ab190d8655833c94332ca09f3efaa6
* build: Upgrade all regular linters to latestJames D. Forrester2020-05-041-4/+4
| | | | Change-Id: Iab677e4c6c842b6a4d3fdd48f8b5d361d8acf365
* resources: Upgrade qunit from 2.9.3 to 2.10.0James D. Forrester2020-05-041-1/+1
| | | | Change-Id: Ib0a0ab2465946fbedf120ebb506a038c526fc78e
* build: Provide linting for .vue files from upstreamRoan Kattouw2020-04-151-1/+1
| | | | | | | | Was first attempted in f1eaa06d5e2222f3a94dc269977cccfb6e891a25, and reverted in 0b3fe4fe8ca0c69d189e86c31f4ef08982133683. Now this is done in eslint-config-wikimedia for all repos. Change-Id: I9ee735eef40085b6373b565838d67e186e438657
* Revert "build: Linting for .vue files"Catrope2020-03-301-1/+0
| | | | | | | | | This reverts commit f1eaa06d5e2222f3a94dc269977cccfb6e891a25. Reason for revert: accidentally allowed ES6 syntax. Looking for a way to redo this that doesn't break our linting as badly. Change-Id: I78974b97001bdbea9aff5717c69d71b8a2582ade
* build: Merge doc linting into 'npm test'Timo Tijhof2020-03-181-1/+1
| | | | | | | | | | | | | | | Whether JSDuck or JSDoc3, it's good to verify that there are no regressions in the doc syntax. This has been enforced by WMF CI for many years with a dedicated Jenkins job. However, both 'grunt lint' and 'npm run doc' take a relatively small amount of time in CI: * grunt lint: ~ 35s (not incl 'npm install') * npm run doc: ~ 10s (not incl 'npm install') Bug: T225730 Change-Id: If22b7bc64266e43088c7dec8138d81c938687fb9
* Selenium: fix `Illegal option -o pipefail`Željko Filipin2020-03-181-1/+1
| | | | | | | | 47cc31d changed running selenium.sh using sh instead of bash. This commit reverts back to bash, since sh does not support pipefail. Bug: T247983 Change-Id: Ia2706051d40a6c26156fef77744cf5dff3a8cf95
* tests: Enable 'npm run selenium' on WindowsAronDemian2020-03-151-1/+1
| | | | | | | Run the script explictly via sh, the default is cmd.exe on Windows. Also ported from bash to sh per Jforrester's request. Change-Id: I96b66c6ae01a1761619955be2e8a3dbc64edff18
* build: Remove unused 'jpeg-js' npm dev dependencyTimo Tijhof2020-03-021-1/+0
| | | | | | | | | Follows-up 7d9e117d9113, which added this for use in WikibaseMediaInfo, which should have been added there instead of here. This has since been fixed. Change-Id: I6d5b0c93c3de457da0bf54859f05b1836eccc84f
* build: Updating npm dependenciesJames D. Forrester2020-02-181-2/+2
| | | | | | | * grunt-stylelint: 0.12.0 → 0.14.0 * stylelint-config-wikimedia: 0.7.0 → 0.9.0 Change-Id: Ia055fbfd75e1d3a8b771e08a6b0dbd7de61c7a98
* build: Linting for .vue filesRoan Kattouw2020-02-051-0/+1
| | | | | | | | | | | | | | | | Install eslint-plugin-vue, which lints JS inside <script> blocks in .vue files, and also lints Vue templates. Configure eslint and stylelint to run on .vue files. stylelint automatically picks up on CSS in <style> tags. You may have to change a setting in your text editor or IDE to make it run eslint and stylelint in .vue files. For eslint, see https://eslint.vuejs.org/user-guide/#editor-integrations ; for stylelint, I had to install the linter-stylelint-plus Atom plugin then add source.css.embedded.html to the "Base Scopes" setting for that plugin. Change-Id: I7e6a13317792fc25c29106739b0c24864fd8d301
* Move tests from api-testing repo into CoreClara Andrew-Wani2020-02-051-2/+3
| | | | | | Except for Search & Watchlist, which need fixes in gated extensions first. Change-Id: I88d24dda4bc047868de3ff9dd4a5753b9c7b0f64
* build: Update qunit and all karma-related tools to latestJames D. Forrester2020-02-031-5/+5
| | | | | | | | | | | karma 3.1.4 → 4.4.1 karma-chrome-launcher 2.2.0 → 3.1.0 karma-firefox-launcher 1.1.0 → 1.3.0 karma-qunit 2.1.0 → 4.0.0 qunit 2.9.1 → 2.9.3 Bug: T222293 Change-Id: I76d9fe8b6b189a9a334411f3b62014c234002edc
* selenium: Replace wdio-chromedriver with ./selenium.sh scriptTimo Tijhof2020-01-171-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 commit 1955a8aa56. == 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 to ebda397c5450. But, with a few tweaks so that it forwards shell arguments, this way developers continue to enjoy the benefit of 1955a8aa56, which is that 'npm run selenium -- --spec foo.js' works. Bug: T234610 Change-Id: I03ca94315d0611d2b6abccc12cf9076d41b2c00e
* Add API-testing to coreClara Andrew-Wani2019-12-191-0/+2
| | | | | | Bug: T236680 Depends-On: I0110de1539e4d6d9d6a58d1a645c1a1c02d8127f Change-Id: I827dc895719cc68738ebb425f8471ac38caa49aa
* Remove unnecessary devDependencyEd Sanders2019-10-291-1/+0
| | | | Change-Id: I490e29b8aeefbd54d7ebeb3ac16a918495bfe4ec
* build: Update linters and fix errorsEd Sanders2019-10-231-5/+5
| | | | Change-Id: Ieb1eff174f5168bf6c9e9aaeb58ec1a1bcd33538
* Use plugin to ensure all message keys are documentedEd Sanders2019-10-211-0/+1
| | | | | Bug: T235502 Change-Id: If77ddf2caf667504bd0f7e0150649745ae31c4e2
* Build: Update eslint-config-wikimedia and fix errorsEd Sanders2019-10-031-1/+1
| | | | Change-Id: I9459dcee08ea7f5b54c41a2cfde965b011099f57
* selenium: Upgrade from webdriver v4 to v5Timo Tijhof2019-09-291-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Options no longer needed or no longer exist in wdio v5: - coloredLogs: Now always on. The underlying 'chalk' library can still be influenced via the FORCE_COLOR environment variable. - screenshotPath: Removed. Was already disabled in our config. - deprecationWarnings: Meh. - 'sync: true' – On by default when `@wdio/sync` is installed. The wdio v5 config generator doesn't recommend setting manually. * The selenium.sh script was removed. It existed to start and stop chromedriver for local use by developers. This is now done by the wdio-chromedriver-service. In WMF CI, Quibble starts its own chromedriver (as optimisation, reused across gated repos), which is why the 'selenium-test' entry points remains and skips this. * The wdio-mediawiki package now requires wdio v5 and Node 10. This doesn't affect extension repos because versions are pinned. Upgrade may happen at the earliest convenience. * Several WDIO methods changed names or signature. Full list at: <https://github.com/webdriverio/webdriverio/blob/v5.13.2/CHANGELOG.md#v500-2018-12-20> Highlights: - browser.element() is now browser.findElement() with "$()" as alias. - browser.localStorage replaced by browser.setLocalStorage. - browser.deleteCookie() requires `name` param. To delete all at once, there is a new method browser.deleteAllCookies(). - Commands that return data no longer wrapped in `{ value: … }`. Values are now returned directly. - Custom config keys are now under browser.config instead of browser.options. Renamed our username/password keys to be mw-prefixed, to avoid clashes and reduce confusion with similar config keys. - browser.click(selector) and browser.getText(selector) no longer exist. Use $(selector).click() or .getText() instead. * Fix "no such alert" warning from specs/page.js by removing the apparently redundant code. Bug: T234002 Bug: T213268 Change-Id: I908997569ca8457997af30cb29e98ac41fae3b64