aboutsummaryrefslogtreecommitdiffstats
path: root/package.json
Commit message (Collapse)AuthorAgeFilesLines
* 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
* wdio: Switch to dots reporter for brevityJames D. Forrester2019-08-231-1/+1
| | | | Change-Id: Ica6cc3e4fc445f39ba911db14c58a486f32f7f89
* build: use the latest webdriverio 4.x related packagesŽeljko Filipin2019-07-081-4/+4
| | | | | | | | Updating packages removes dependency on cryptiles. We were using version 3.1.4 that had a vulnerability. Bug: T226586 Change-Id: Idccc7f418ed6fce7452a6f0d403477953448a541
* build: Update eslint-config-wikimedia to 0.13.0Ed Sanders2019-07-051-1/+1
| | | | Change-Id: I7df5840bc97f8bbcd8cfc875c2b48b3061ef2c9e
* build: Upgrade stylelint-config-wikimedia from 0.5.0 to 0.6.0 and make passJames D. Forrester2019-06-101-2/+2
| | | | Change-Id: I062bed7889cdfcc48eab9594200fc1d4767dda8c
* selenium: Re-add all tests and wdio-mocha-framework, now v0.6.4James D. Forrester2019-06-031-3/+4
| | | | | | | | | | | This reverts commit c3878c08b5275123972354ba5479d3315c4fefb4. Now that we're running on node10, this will fail until we fix things. Bug: T213268 Bug: T222406 Change-Id: I5935fc5d5bc23978e50275d3c99ac870b3b82f49
* selenium: Temporarily drop all tests and wdio-mocha-frameworkJames D. Forrester2019-06-031-4/+3
| | | | | | | | | | This is so that we can migrate to node 10 in CI. It should only land for an hour or so, and is to be reverted as soon as we get CI up to node 10 and working, lest our suites of selenium tests become subject to bitrot. Bug: T222406 Change-Id: I9473e0213c070a0e963913fd81062c6bbf9ec2f2
* npm: bump grunt-karma to 3.0.2Michael Holloway2019-05-211-1/+1
| | | | | | | | | | | | `npm install` currently fails due to an unsatisfied peer dependency. See full output here: https://phabricator.wikimedia.org/P8552 Bumping the required grunt-karma version to the latest (3.0.2) fixes this. Change-Id: I5b7f2deba2d766b809a964f53cb22f47f0617bd6
* selenium: Add jpeg-js to devDependenciesŽeljko Filipin2019-05-101-0/+1
| | | | | | | | | It is needed for I92739d84947ac146e in WikibaseMediaInfo Selenium tests. It can not be added there because of T199116. Bug: T219815 Bug: T199116 Change-Id: Ib7c3b1b49c280bdc38c40c6aef900a605c1e3cbe
* build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlintJames D. Forrester2019-05-061-2/+1
| | | | | Bug: T220036 Change-Id: I7088f9eeb9468b14efb2773fde5f55fd5c95a489
* build: Upgrade grunt-banana-checker from 0.6.0 to 0.7.0 and make passJames D. Forrester2019-04-301-1/+1
| | | | Change-Id: I4c604ab50caeffc5738c719c17f19e769082376f
* build: Upgrade grunt from 1.0.3 to 1.0.4James D. Forrester2019-04-301-1/+1
| | | | Change-Id: I9bfada10337dbab4cb5c77348f5f0df6cfab40a7
* build: Update eslint-config-wikimedia to 0.11.0Ed Sanders2019-02-201-1/+1
| | | | Change-Id: Iee025a518962e68c5ec2c07d952f402cd2a7f69b
* build: Use headless Chrome and Firefox for QUnit testingTimo Tijhof2019-02-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also: * Remove "watch" task from Gruntfile. This wasn't exposed via npm-run and afaik rarely if ever used. It seems mostly obsoleted by modern editors which perform linting and style guidance as-you-type and on-save. * Remove "chromium" target from karma config, the default target supports both Chromium and Chrome. * Remove unused "default" alias in Gruntfile. Was only accessible if developers installed grunt-cli globally, which we don't require and shouldn't encourage. The new minify task is now exposed as "npm run build". * Remove "test" alias in Gruntfile. Was only used by "npm run test", which now uses "grunt lint" directly, which makes it more clear that these are only linters, and not unit tests. This references T211784 because ensuring no headed browsers are used (which would need Xvfb to start), is a prerequisite for the new Node 10 images. We may still need to provide a slower Xvfb-wrapped variant for some repos, but would be nice of mw-core wasn't one of them. Bug: T211784 Change-Id: I270a16d2b4f799ac7c9f84e9e2ee23806bdbc57e
* build: Update karma to 3.1.4Timo Tijhof2019-02-101-1/+1
| | | | | | | | | | | | This fixes the bug where HeadlessChrome was always shown as version 0.0.0 in the console output, which makes it rather difficult to debug which Chrome version is installed. Upstream https://github.com/karma-runner/karma/issues/2762, which updates the ua-parser library to a version that fixes that bug. Change-Id: I0b7fe7f8a90649592c4d31fb3055cdc9e8d34814
* build: Add 'svgmin' Grunt task and crush SVGsVolker E2019-02-061-0/+1
| | | | | | | | | | Adding 'grunt-svgmin' package and corresponding 'svgmin' task and also crush SVGs. Several of them are featuring bad UX and are not optimal in many different angles (a.o. clarity, universality, recognizablity etc.). Specifically the 'mediawiki.skinning' ones. But while they are here, let's make them suck less. Change-Id: I8191ceac14565ae31d941982fab1586fa9b6bbdd
* build: Update eslint-config-wikimedia to 0.10.1Ed Sanders2019-02-021-1/+1
| | | | Change-Id: Id98af16c1ec1c6c4a790948a35e96e2fe925ebb5
* build: Remove unused 'deepmerge' packageTimo Tijhof2019-01-211-1/+0
| | | | | | | | | | Was added for wdio-related code, but not used in the end. The only reference to this module anywhere in Wikimedia Git is mediawiki/extensions/CirrusSearch, which doesn't use it for its regular or daily tests, but rather the integration test, which already has its own copy of this module in package.json. Change-Id: Ifdf4362077f4684a2866363e35d0aca2f89f48b5
* build: Remove 'stylelint' package as it gets pulled-in by ↵Volker E2019-01-101-1/+0
| | | | | | 'stylelint-config-wikimedia' Change-Id: I734ebf6c18a3266bec2d9c9e38e827c3ec412586
* Merge "build: Update qunitjs to 2.9.1"jenkins-bot2019-01-081-1/+1
|\
| * build: Update qunitjs to 2.9.1Timo Tijhof2019-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code and integrity from <https://code.jquery.com/qunit/>. Release notes at <https://github.com/qunitjs/qunit/releases>. Highlights for the browser version: - [2.7.0] Reporter: Remove cost of DOM size when using "hidepassed=true". - [2.7.0] Reporter: Use perf.now() for improved accurracy of unit test durations. - [2.7.0] Reporter: Make debugging tests in a browser easier by adding timeline markers for DevTools. Highlights for the npm package / CLI version: - [2.9.0] CLI: Reduce dependency tree size from 143 packages to 9 packages. Change-Id: I38408d90765cd18d5dd6952b8b6b30cbfa0c7ed5
* | build: Update eslint-config-wikimedia to 0.10.0Ed Sanders2019-01-081-1/+1
|/ | | | Change-Id: I2930bcabeeb7b7b2eb36063e77b26e664a691b43
* build: Upgrade stylelint-config-wikimedia to 0.5.0 and make passVolker E2018-11-281-2/+2
| | | | Change-Id: I648375927bace5fc21bd842268c645570759ce85
* build: Use eslint-config-wikimedia v0.9.0 and make passEd Sanders2018-11-231-3/+1
| | | | Change-Id: I7b5d228a3de4b3006751a427dec907a5bebf2f51
* build: Update eslint-config-wikimediaEd Sanders2018-09-111-1/+1
| | | | Change-Id: I5a8768e1a7e3960d2c822c5f842c0ffa29e2f08b
* Bump qunit from 2.6.0 to 2.6.2James D. Forrester2018-09-101-1/+1
| | | | Change-Id: Id7f47eee423c2fc1289f468c6622b952814d8912
* build: Update grunt-karma from 2.0.0 to 3.0.0James D. Forrester2018-09-101-1/+1
| | | | | Bug: T194280 Change-Id: Iba043c036c06bebd961896f390063ca9a0129eb2
* Merge "build: Bump most devDependencies to latest"jenkins-bot2018-09-071-5/+5
|\
| * build: Bump most devDependencies to latestJames D. Forrester2018-09-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | grunt-stylelint 0.10.0 → 0.10.1 karma 2.0.2 → 3.0.0 karma-firefox-launcher 1.0.1 → 1.1.0 karma-qunit 2.0.1 → 2.1.0 postcss-less 1.1.5 → 2.0.0 This reduces our `npm audit` alerts down to just those from grunt-karma. Bug: T194280 Change-Id: I7d321dd715db9d214e65ed7197e917cb7c6b14f3
* | Selenium: Daily Jenkins job targeting beta cluster should run only tests ↵Željko Filipin2018-09-041-1/+1
|/ | | | | | | | | | | | that pass Selenium tests run fine when targeting MediaWiki installation in MediaWiki-Vagrant and in Jenkins, but fail when targeting beta cluster. Until tests are refactored to run without failure for beta cluster, let's disable failing tests. Bug: T185011 Change-Id: I12da893e7d624d4ebe478bccf0706aa07c965796
* Selenium: selenium-daily NPM scriptŽeljko Filipin2018-08-291-0/+1
| | | | | | | | | | selenium-daily just calls selenium-test. It's needed for daily Jenkins job targeting beta cluster. The script might seem redundant, but it provides flexibility. In case a repository does not want to run all tests daily, that's easily fixed by updating the the script. Bug: T188742 Change-Id: Idf86f94cc31abda4bfcdc1ac4eba29206d9c91f9
* build: Update eslint-config-wikimedia to 0.7.2Ed Sanders2018-08-141-2/+2
| | | | Change-Id: Ibdf9cc013e1265ef461169ec2227652eaf917900
* build: Upgrade eslint to 5.xJames D. Forrester2018-07-051-3/+3
| | | | | | Add two exceptions for max-len and no-prototype-builtins. Change-Id: I5d3f7a3e282a237fb5de9f0eb29b579a08c32652
* Update grunt and grunt-contrib-watch to resolve vulnerabilitiesŽeljko Filipin2018-06-151-2/+2
| | | | | | | | | `npm audit` found 27 vulnerabilities (11 low, 12 moderate, 4 high). `npm audit fix` fixed most of them. There are 8 vulnerabilities remaining (2 low, 6 moderate). Bug: T194280 Change-Id: I05d80bc38d16be8249a27d94dad8e13c65139545
* npm selenium command, use bashaddshore2018-06-111-1/+1
| | | | | | On Windows this seems to complain unless bash is specified Change-Id: I4515c851ffea143d4c1c6d111ffdd64b62f9f304
* build: Introduce eslint-plugin-qunit and enforceEd Sanders2018-06-051-0/+1
| | | | Change-Id: Iefe06cc865c458000ca5350c2d9205f5b768bac8
* build: update to grunt-contrib-watch@1.0.1 to resolve a vulnerabilityŽeljko Filipin2018-05-111-1/+1
| | | | | | | | | | | | | | | Recommended by `npm audit`. Moves us from 21 vulnerabilities ... 12 Low | 5 Moderate | 4 High to 20 vulnerabilities ... 11 Low | 5 Moderate | 4 High Bug: T194280 Change-Id: I9d6d2fed4ca3d4c43d9b5085873210493081f7e0
* build: Update Karma to v2.0.2Željko Filipin2018-05-101-1/+1
| | | | | | | | The current version has a couple of dependencies with high severity vulnerabilities. Bug: T194280 Change-Id: I3f9f36a6a5c2ba1716b91d14e59bc60f9e0ff513
* Merge "build: Update Karma's qunit from 2.5.0 to 2.6.0"jenkins-bot2018-05-101-1/+1
|\
| * build: Update Karma's qunit from 2.5.0 to 2.6.0Timo Tijhof2018-05-101-1/+1
| | | | | | | | | | | | | | Follows-up 065b21b4bd which updated the copy of QUnit used on Special:JavaScriptTest. Change-Id: I24b17c9c266f58d48caa9c3392496c469b3ddba0
* | Fix a critical NPM package vulnerabilityŽeljko Filipin2018-05-101-1/+1
|/ | | | | | | NPM v6 audits packages during installation. This is the only critical vulnerability. Bug: T194280 Change-Id: I5fe35067919ad67b9781701136e290eda17c3afa
* selenium: Initial version of wdio-mediawiki packageTimo Tijhof2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This is new package will be reusable by other repositories for their browser tests, without having to reference the internal selenium/pageobjects/ directory from MediaWiki core. In addition to not requiring direct imports, it will also avoid problems in the future by allowing the package to be versioned and iterated upon without forcing an atomic global upgrade (or broken master builds), everytime we change something. See wdio-mediawiki/README for details. Within MediaWiki core itself, the package is used using the 'file' specifier in its package.json, so that we always test and develop using its working copy, which makes drafting and testing changes easier. Also misc changes to make wdio.conf easier to understand. Bug: T193088 Change-Id: I547a7899e7a97693a93567dd763784e637433d55
* selenium: Minor clean-up in preparation for packagingTimo Tijhof2018-05-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is functionally a no-op, purely refactoring (mostly style). * Consistently require packages at the top of a file. (e.g. MWBot in edit.page.js). * Remove unused .call(this) from mwbot interaction closures, which didn't use 'this'. * Use Node.js regular Promise chaining with then(), instead of complex bluebird.coroutine generator function yields, which are intended to emulate async-await, but the syntax is quite error-prone for inexperienced developers and hard to debug. Once we require Node 7+ for the selenium tests, we can use async-await here natively, but until then, might as well use regular then() syntax, which we already use elsewhere in the tests, and is also what MWBot documentation uses. * Also applied some minor whitespace changes for consistency among these files and other MediaWiki JS. E.g. no empty line before the first statement of a function. Add a new line between different methods, and between the end of a class and the export statement. * Remove 'use strict' from test files. The patterns that would expose the bad non-strict behaviour are mostly already forbidden by ESLint, and the run-time optimisation to disable non-strict can't be noticed in tests (more useful in prod where e.g. the same process would run a function 1 million times). Main reason here is to keep things simple for new-comers and reduce boilerplate, given that these tests will mainly be worked on by browser-JS developers, not Node.js devs, and we don't currently use strict mode in our front-end code, either. * Remove unused bluebird dependency. Bug: T193088 Change-Id: I59f9211299e8e884c28c7733bcee3b7b28542610
* selenium: Run wdio directly without gruntTimo Tijhof2018-04-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doesn't seem to add anything, except complexity. This has the benefit of matching more closely the way the README recommends running individual tests. Also add a check for 'chromedriver' before running it. Normally the -e and pipefail would suffice, but because it runs in the background, the error can be buried, hard to find, or even not cause exit code to be set properly. Thus, do a simple 'hash' check that will print a useful command and exit cleanly. Before: > $ something & > [1] 57922 > -bash: something: command not found > [1]+ Exit 127 something > $ echo $? > 0 After: > $ hash something > -bash: hash: something: not found > (exit: 1) $ echo $? > 1 Change-Id: Id95f18927b5443defe679a77a82c5cbdd127c716
* Merge "selenium: Abstract test command behind 'npm run'"jenkins-bot2018-04-231-1/+2
|\
| * selenium: Abstract test command behind 'npm run'Timo Tijhof2018-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to use in Quibble. Right now, Quibble cannot use 'npm run selenium' yet because it sets up its own chromedriver, which would conflict with selenium.sh. But, in preparation for Id95f18927b5, we can at least abstract the test command so that it can easily be changed without having to update Quibble and without having to worry about it being the same in all MediaWiki branches. Bug: T179190 Change-Id: I622ec3bf36746502cae891cc6bec23982b21f876
* | build: Switch QUnit package from deprecated 'qunitjs' to 'qunit'Timo Tijhof2018-04-231-2/+2
|/ | | | | | This should fix the deprecation warning from npm in CI logs. Change-Id: I5d02dd8d6a86123d7935db51b8d0b5d88218869f
* Selenium: move logic for running tests from package.json to selenium.shŽeljko Filipin2018-04-131-1/+1
| | | | | | | | | | Just running `npm run selenium` in CI does not work. If WebdriverIO fails, the job still passes since the last command to run is `killall chromedriver`. Reusing the script from CI that starts and stops Chromedriver should fix the problem. Bug: T179190 Change-Id: If29227263d23a3e4f26e2329dfa13c49f976cf8e
* build: Bump postcss-less up to 1.1.5 from 1.1.3James D. Forrester2018-04-041-1/+1
| | | | | | | Problem over, we think. Bug: T190269 Change-Id: I0a94c99fb75613b03f15954512744dec63fd779e
* build: Bump devDependencies to latestJames D. Forrester2018-04-041-3/+3
| | | | | | | | grunt-stylelint 0.9.0 → 0.10.0 stylelint 8.2.0 → 9.2.0 stylelint-config-wikimedia 0.4.2 → 0.4.3 Change-Id: I612cf96d99e2af67b3f7ef3284657f66f3e18d2e