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
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
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
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
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
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
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
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
This reverts commit babbbbc6e5.
Reason for revert: Video recording only works with WebdriverIO v5. It doesn't work with v6.
Bug: T252523
Change-Id: I5dd0bb5ef03bcf5337207c63d26755e983634787
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
Was first attempted in f1eaa06d5e,
and reverted in 0b3fe4fe8c. Now this
is done in eslint-config-wikimedia for all repos.
Change-Id: I9ee735eef40085b6373b565838d67e186e438657
This reverts commit f1eaa06d5e.
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
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
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
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
Follows-up 7d9e117d91, which added this for use in WikibaseMediaInfo,
which should have been added there instead of here.
This has since been fixed.
Change-Id: I6d5b0c93c3de457da0bf54859f05b1836eccc84f
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
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 ebda397c54.
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
* 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
Updating packages removes dependency on cryptiles. We were using
version 3.1.4 that had a vulnerability.
Bug: T226586
Change-Id: Idccc7f418ed6fce7452a6f0d403477953448a541
This reverts commit c3878c08b5.
Now that we're running on node10, this will fail until we fix
things.
Bug: T213268
Bug: T222406
Change-Id: I5935fc5d5bc23978e50275d3c99ac870b3b82f49
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 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
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