| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ibdf9cc013e1265ef461169ec2227652eaf917900
|
|
|
|
|
|
| |
Add two exceptions for max-len and no-prototype-builtins.
Change-Id: I5d3f7a3e282a237fb5de9f0eb29b579a08c32652
|
|
|
|
|
|
|
|
|
| |
`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
|
|
|
|
|
|
| |
On Windows this seems to complain unless bash is specified
Change-Id: I4515c851ffea143d4c1c6d111ffdd64b62f9f304
|
|
|
|
| |
Change-Id: Iefe06cc865c458000ca5350c2d9205f5b768bac8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
The current version has a couple of dependencies with high severity
vulnerabilities.
Bug: T194280
Change-Id: I3f9f36a6a5c2ba1716b91d14e59bc60f9e0ff513
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Follows-up 065b21b4bd which updated the copy of QUnit used
on Special:JavaScriptTest.
Change-Id: I24b17c9c266f58d48caa9c3392496c469b3ddba0
|
|/
|
|
|
|
|
| |
NPM v6 audits packages during installation. This is the only critical vulnerability.
Bug: T194280
Change-Id: I5fe35067919ad67b9781701136e290eda17c3afa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
| |
This should fix the deprecation warning from npm in CI logs.
Change-Id: I5d02dd8d6a86123d7935db51b8d0b5d88218869f
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Problem over, we think.
Bug: T190269
Change-Id: I0a94c99fb75613b03f15954512744dec63fd779e
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Bluebird is implicitly installed on my machine, probably because I have a recent npm version. It needs to be explicitly installed in MediaWiki-Vagrant, probably because of an older npm version.
Bug: T190914
Change-Id: I9c704502fb5e20abf9b21d483723eb55b6fb3875
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Bug: T181284
Change-Id: I012a5cc6a7f30a8652cbad87293eb119fa2e405f
Depends-On: Ic69be92c2b0b7a08a9b8cc417a40ebb38f249ea3
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
Bug: T180144
Change-Id: I8d34e2240fe76798c99315a54ea5bab63b2409e9
Depends-On: Ic69be92c2b0b7a08a9b8cc417a40ebb38f249ea3
|
|/
|
|
|
|
|
|
| |
mediawiki-core-npm-node-6-docker Jenkins job is failing with
`Warning: Task "stylelint:src" failed.`
Bug: T190269
Change-Id: Ic69be92c2b0b7a08a9b8cc417a40ebb38f249ea3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The running of 'grunt qunit' is unconvenient due to it only working
if the user has grunt-cli installed globally, which should not be
needed because it is already installed in the local directory.
It could be worked around by instructing users to use
`./node_modules/.bin/grunt qunit`, but it would be much simpler
to instruct them to use `npm run qunit` instead.
Unlike 'composer', 'npm' does not come by default with a command
like 'composer exec' that one could pass a command directly
without needing to register it. This is fixed in more recent
versions through 'npx -c', but that's a bit too new to require
in the manual, so adding it as a run-script instead.
Change-Id: I2812b13dbed50612b1626a617ba65f92e212f01a
|
|
|
|
| |
Change-Id: I4c47f1d290802705d061167fe369c130405512e0
|
|
|
|
|
|
|
|
|
|
| |
karma 1.5.0 → 1.7.1
karma-chrome-launcher 2.0.0 → 2.2.0
karma-mocha-reporter 2.2.3 → 2.2.5
nodemw 0.10.1 → 0.11.0
qunitjs 2.4.0 → 2.4.1
Change-Id: I1e06189a12fbbc1d62781a4636f192c5b7078c1a
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
eslint 3.12.2 → 4.9.0
grunt-eslint 20.0.0 → 20.1.0
Change-Id: I7eb9964fb5d163c5bbcef850f62383cbceb59287
|
|/
|
|
| |
Change-Id: I5a0ccb26a54109e641fd121c6427a71e82e05c74
|
|
|
|
|
|
|
|
| |
karma-qunit 1.0.0 → 1.2.1
qunitjs 1.23.1 → 2.4.0
Bug: T170515
Change-Id: Ibc0909ed5fbde715814b0ddb1a1d1c9668d10a85
|
|
|
|
| |
Change-Id: I06010cd6367c1884b5536e7929d3345feba7f305
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Most indent and escaping fixes.
Change-Id: I210e2fc3c0ce3148327ef81f824e1ce9f1e269b6
|
|/
|
|
| |
Change-Id: I05e48d3eb749d192ccd4b837e4b8dc6307d761af
|
|
|
|
|
|
|
|
| |
This will make tests slightly more robust.
Bug: T164721
Bug: T167502
Change-Id: I9b2fea77b28af4f7f521490a0105e7d04730bc87
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are not
defined, tests are run with `npm run selenium`, as usual.
https://www.mediawiki.org/wiki/Selenium/Node.js/Inside_MediaWiki-Vagrant
https://www.mediawiki.org/wiki/Selenium/Node.js/Target_MediaWiki-Vagrant
If the environment variables are defined, to run tests using Sauce Labs
and targeting Beta Cluster, run this:
```
export SAUCE_USERNAME=***
export SAUCE_ACCESS_KEY=***
export MW_SERVER=https://en.wikipedia.beta.wmflabs.org
./node_modules/.bin/wdio tests/selenium/wdio.conf.js
```
https://www.mediawiki.org/wiki/Selenium/Node.js/Target_beta_cluster_using_Sauce_Labs
Bug: T139740
Change-Id: I622d9c55ae595ab772e733388d209623e3a9f81e
|
|
|
|
| |
Change-Id: Ib230392f332268ac801cf668f399fcefb1cb1cc5
|
|
|
|
|
|
|
|
|
|
|
| |
Special:JavaScriptTest loads qunitjs from /resources/lib/qunitjs
which was upgraded in 99aad9397e to 1.23.1.
However, when running QUnit tests from the command-line, QUnit is
loaded by karma-qunit using the npm qunitjs dependency, which was
still at v1.22.0.
Change-Id: Ie24b2b061735fa03a8ed1527d09f65c103506c67
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
karma:
Changelog at https://github.com/karma-runner/karma/releases
https://github.com/karma-runner/karma/compare/v1.1.0...v1.5.0
karma-firefox-launcher:
Changelog at https://github.com/karma-runner/karma-firefox-launcher/blob/master/CHANGELOG.md#101-2017-03-04
https://github.com/karma-runner/karma-firefox-launcher/compare/v1.0.0...v1.0.1
Karma v1.1.1 added use of `<script crossorigin="anonymous">` for
the urls it initially loads. While most requests will be done by
MW itself directly (and served locally via the proxy at /w/) the
initial request cannot come from the proxy and is loaded from wgServer
directly. Therefore we need to set crossOriginAttribute=false to override
the new default that v1.1.1 introduced.
Change-Id: I9f5067b949c0a77e46f47c2a110a7b5df5953fda
|
|
|
|
| |
Change-Id: I64d4267d20716b893237f7f13729343593c8d382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The progress reporter is quite nice to avoid spammy output to the
terminal, but it is not very human friendly when trying to find out what
is breaking.
Mocha has a very nice reporting organized as modules and list items for
each of the tests:
ext.cx.tools.template
✖ Equivalent template exists
✔ Adapting a template not existing in target language
✖ Adapting template having invalid title
✖ Template name and params adaptation using templatedata
✖ Template params adaptation using templateData - English to French
✖ Template params adaptation using templateData - English to Spanish
Add karma-mocha-reporter node module and make it the reporter.
Change-Id: Ic7d848b45e8e5ad3839d8a2bd822b63838319ad7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce the WebdriverIO browser testing framework driven by Node.js.
The overall intents are:
* have MediaWiki core to provide a platform to run tests that is shared
between core and the extensions.
* phase out ruby driven browser tests eventually.
Code is namespaced in sub directory /tests/selenium
The 'pages' sub directory provides helper representing a MediaWiki page
such as Special:Login and human friendly helpers to interact with the
elements.
Add Grunt task webdriver:test.
Provide a npm script to easily spawn/dispose chromedriver and run above
grunt task.
wdio.conf.js provides all the configuration. It defaults to point to a
MediaWiki-Vagrant installation on http://127.0.0.1:8080. Can be
overriden with environment settings as needed.
glob patterns (specs) are made absolute paths from MediaWiki root path
that let us run the tests either from the root path (eg the npm
wrapper or from the tests/selenium directory when invoking wdio
directly. wdio assumes they are relative to the current working
directory, hence the normalization.
wdio.conf.jenkins.js extends the configuration and is used solely for
Jenkins. The switch is done from the Gruntfile.js whenever JENKINS_HOME
is set. Specially we want junit reports to be generated.
Provide a more specific eslint configuration.
References:
* MALU https://phabricator.wikimedia.org/source/malu/
* T151442 Research WebdriverIO
* T151443 Research Nightwatch.js
Bug: T139740
Signed-off-by: Antoine Musso <hashar@free.fr>
Change-Id: Ibe7a004a120e82af637ab3e31b725de743134c99
|
|
|
|
|
|
|
| |
grunt-stylelint 0.6.0 → 0.7.0
stylelint-config-wikimedia 0.3.0 → 0.4.1
Change-Id: Id87b8df04d415e1f1058a4042a31408236402037
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before karma-chrome-launcher 2.0.0, Chromium was only detected on Linux
and as part of the "Chrome" setting. "Chromium" is now recognised as a
separate browser and is detected on Mac and Windows as well.
https://github.com/karma-runner/karma-chrome-launcher/issues/45
Add a grunt target for Chromium so users may run the following to use
Chromium instead of Chrome:
grunt karma:chromium
Since we keep the default of "Chrome", we'll need an override for CI
since we install Chromium there instead of Chrome.
Depends on Ie9f906f8 being merged and Nodepool images updated.
Bug: T153756
Change-Id: I6ba0d971e7e8c3022d2ab6268ae637688189d768
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want tests failing every time upstream publishing a new
version.
Instead we should bump this manually everytime they update to make sure
no failures happen.
Bug: T118941
Change-Id: I1c76dacd0950100825b85a3791f74c1f6d5477d9
|
|
|
|
|
|
|
|
| |
grunt-jsonlint 1.0.7 → 1.1.0
We can't bump the karma/qunit modules due to issues with our CI.
Change-Id: I15595df8b30a8ef4ddb6471acdd8d4da4f4afabc
|
|
|
|
| |
Change-Id: Iee727a4521acd8c221733c7bd763cbf2adb9bd49
|
|
|
|
| |
Change-Id: Id0a23c03aabadfaf2ec705528ae4b3bd0908fa3e
|