Commit graph

71 commits

Author SHA1 Message Date
samtar
dba719c23c package-lock: run npm audit fix
Run npm audit fix - this takes us from:
 - 6 vulnerabilities (1 moderate, 3 high, 2 critical)
to
 - 3 vulnerabilities (1 moderate, 2 high)
and has modified:
 - ansi-regex (3.0.0 -> 3.0.1)
 - ejs (3.1.6 -> 3.1.8)
 - minimist (1.2.5 -> 1.2.6)

Change-Id: I940838dd0696b1a4dd24c1ff797b2123e2d75a09
2022-06-04 15:45:34 +01:00
Derick Alangi
80ce1fe28f Rest: Move TransformHandler to core (part 1)
Begin moving the transform endpoints and handler class to
MediaWiki core.

Bug: T301370
Change-Id: I94e9d2e8d497c1992c542001afe333fa7537e553
2022-06-02 15:55:06 +01:00
Ed Sanders
4c845198b0 build: Update stylelint-config-wikimedia to 0.13.0
Change-Id: I59c7507fef057a880bca62a156662ee66f89ed94
2022-05-04 23:17:03 +01:00
Željko Filipin
aca6ae6d83 selenium: Use @wdio/spec-reporter
@wdio/dot-reporter that we currently use doesn't display much. For
example, it doesn't display skipped tests. It says 5 test suites are
executed, but that's a lie. 3 of those 5 suites are skipped.

@wdio/spec-reporter is more verbose but it actually outputs useful
information, like which tests are running, which are skipped.

This is a revert of aa7133ce86.

Bug: T280331
Change-Id: I7cef7d6a6d1b5e472622a81afc4f9a91523c1ca9
2022-03-24 15:31:45 +00:00
Volker E
31de8c23d2 build: Update 'svgo' to latest v2.8.0
Updating 'svgo' to v2.8.0 and newest Wikimedia SVG guidelines –
mainly around new whitespace features of SVGO.

Change-Id: Ibaf67b1178225c19a80dcba6a9ebbcf8964cbe8d
2022-02-27 23:54:58 +00:00
Timo Tijhof
add6d0a0e3 build: Update to QUnit 2.18
Highlights from release notes at <https://github.com/qunitjs/qunit/releases>:

2.18.0:
* New `assert.propContains` for partial object comparison. (Izel Nakri)
* New `QUnit.hooks to globally add beforeEach and afterEach. (Timo Tijhof)
* CLI: Add support for watching `.ts` files when using TypeScript.

2.17.0:
* HTML Reporter: Add "Rerun failed tests" link. (Jan Buschtöns)
* Improve validation of `assert.throws`. (Steve McClure)

Depends-On: Ia98a60166209646cc641d45a1ece62c131bcbcd0
Change-Id: Ia8ce57fa72ced8286f3e74b0b991e33e24a88850
2022-02-23 15:21:33 +00:00
Ed Sanders
5c6214b873 build: Update eslint-config-wikimedia to 0.22.1
Also some minor version updates to karma dependencies as required.

Change-Id: I2740faca2d28ad2b2896a3b0222678115d11a166
2022-02-21 12:46:12 +00:00
Ed Sanders
c761d8216e build: Update stylelint-config-wikimedia to 0.12.0
Change-Id: Ifb215e45a2ad4574fa821c696199e8c5911ba3ae
2022-02-21 12:46:11 +00:00
osamaahmed17
870b388a28 selenium: Upgrade WebdriverIO to v7
Update npm packages: @wdio/* and webdriverio.
The update is need for WebdriverIO async mode to work.

Bug: T274579
Change-Id: I386d3d1d031f92cd67fad4b6746c6489110dfb80
2022-02-03 16:48:56 +00:00
Kosta Harlan
911dcc9780 api-testing: Update to 1.5.0
Depends-On: Ifb6fc6f3036c1623c32418c5f304b6fc7196fa04
Bug: T298735
Change-Id: I31966e96a996d30fb31f401abecff47a893b8f0c
2022-01-12 18:10:16 +01:00
jenkins-bot
9dd0bf80e6 Merge "selenium: Refactor WebdriverIO tests from sync to async mode" 2022-01-11 17:14:59 +00:00
Alexander Vorwerk
0c8bffb70a build: Updating json-schema to 0.4.0
CVE-2021-3918

Change-Id: If5cce51aaee83b252fa220813cd203dab43d5f39
2022-01-05 23:26:40 +01:00
osamaahmed17
8f973d8503 selenium: Refactor WebdriverIO tests from sync to async mode
WebdriverIO has dropped support of sync mode due to breaking changes in Chromium, hence all tests have been changed to async.

Bug: T293071
Change-Id: I15347b789f11de84b764e13a3981545ed6759881
2022-01-06 07:17:48 +11:00
Ed Sanders
9fe2995989 build: Update eslint-config-wikimedia to 0.21.0
* Replace `substr`/`substring` with `slice`. The second argument
  to `substring` is length, not end index as in `substr`/`slice`,
  so convert where necessary.
* Replace `new Date().getTime()` with `Date.now()`
* Documentation fixes
* Replace `throw Error` with `throw new Error`

Change-Id: I532500ea4c99d8ebec01efb21273c8df21626e59
2021-11-09 21:08:55 +00:00
libraryupgrader
d1266c5646 build: Updating validator to 13.7.0
* https://npmjs.com/advisories/1004784 (CVE-2021-3765)

Change-Id: Iea8fdd4db27df008d81e2298b1871c12dbf5830d
2021-11-04 06:56:01 +00:00
libraryupgrader
2a64e209da build: Updating dependencies
composer:
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

npm:
* @wdio/mocha-framework: 7.4.6 → 7.13.2
  * https://npmjs.com/advisories/5197 (CVE-2021-3807)
* nth-check: 2.0.0 → 2.0.1
  * https://npmjs.com/advisories/5101 (CVE-2021-3803)
* ansi-regex: 5.0.0 → 5.0.1
  * https://npmjs.com/advisories/5197 (CVE-2021-3807)

Change-Id: I0b17591a4d230192d5c64b68252bb3024ddcedae
2021-10-04 06:38:39 +00:00
Timo Tijhof
fc693ba08b build: Update qunitjs from 2.10 to 2.16
Highlights from release notes at <https://github.com/qunitjs/qunit/releases>:

* Added `assert.true()` and `assert.false()` methods.
* Added `QUnit.test.each()` method.
* Added fuzzy search filter as-you-type to the UI.
* Fixed HTML UI to increase contrast and use richer colors overall.
* Improve the "failing test" experience.

Change-Id: Idebf075b4b2be4c73807fd8ba398662240e6c268
2021-07-23 17:10:39 +01:00
libraryupgrader
5357695270 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0
  The following sniffs now pass and were enabled:
  * Generic.ControlStructures.InlineControlStructure
  * MediaWiki.PHPUnit.AssertCount.NotUsed

npm:
* svgo: 2.3.0 → 2.3.1
  * https://npmjs.com/advisories/1754 (CVE-2021-33587)

Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
2021-07-22 03:36:05 +00:00
James D. Forrester
d3078c0926 build: Upgrade stylelint-config-wikimedia from 0.10.3 to 0.11.1
Just disabling the `declaration-property-unit-disallowed-list` failures
for now, but it looks like at least most of these could be switched over
to ems without breaking anything. For another patch!

Change-Id: I9220334d670f71eba1b0e392da826036d54bc2f3
2021-06-29 11:22:30 +01:00
James D. Forrester
2565ec9deb build: Upgrade grunt from 1.3.0 to 1.4.1
Change-Id: I5dc481c950bbc6ac479ad9f7acae5cfdbbdfe6fe
2021-06-29 11:15:00 +01:00
Željko Filipin
882d5a2087 selenium: Upgrade WebdriverIO to v7
Update npm packages: @wdio/* and webdriverio.

Bug: T274579
Change-Id: I16c1fd2bbb1486388934cea60d50265d43c0e1e7
2021-06-09 19:33:52 +02:00
Željko Filipin
d94b16a74d selenium: Record videos using Xvfb+ffmpeg
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
2021-05-20 15:46:20 +02:00
James D. Forrester
195920767d build: Upgrade karma and related dependencies to 6.x
Change-Id: I378c3580668fe35e5341ddf10929618147c6eb35
2021-05-19 15:47:04 -07:00
Željko Filipin
41373ba0d6 selenium: Update mwbot to v2
v2 includes removing `[MWBOT] Login successful` message.

Bug: T280332
Change-Id: Ibe84bce93f0dcea1ffcbda9042435565d1935090
2021-05-19 15:39:09 -07:00
Volker E
3f6ab130e6 build: Update SVGO to latest v2.3.0 and re-crush SVGs
SVGO v2.x changed configuration to JS, amending configuration.
Adding new 'minify-svg' npm script.
Also re-crushing SVGs.

Bug: T278656
Change-Id: I1d746fca051cbc00900a05c33e8a401f95848930
2021-05-18 05:50:18 -07:00
Željko Filipin
7d937f792a selenium: remove @wdio/devtools-service NPM package
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
2021-04-16 10:41:01 +00:00
Ed Sanders
6d8ad558b8 build: Update eslint-config-wikimedia to 0.20.0
Change-Id: Ia26ba71e1c41e7564ec60d78d4eb1492de7269d2
2021-04-08 19:05:31 -07:00
Željko Filipin
76fb0bf2d1 selenium: Delete Sauce Labs NPM package
We are no longer using Sauce Labs. Configuration was removed in ee14595.

Bug: T248221
Change-Id: I855597f43c91210662a155c4c549bda314361c00
2021-03-30 18:47:02 +02:00
libraryupgrader
649d0cb4f2 build: Updating eslint-config-wikimedia to 0.19.0
Additional changes:
* Dropped .php5 and .inc files from .phpcs.xml (T200956).

Change-Id: I66c9980d3ef6f6604c3145ad0b7f308257dff046
2021-03-12 10:55:29 +00:00
James D. Forrester
3cb9c81c83 build: Upgrade eslint-config-wikimedia from 0.18.1 to 0.18.2
Change-Id: Ie8d892c1e76330ea63ef834f216b6087cbf7e69c
2021-03-04 09:39:12 -08:00
James D. Forrester
5a622b6a2e build: Upgrade eslint-config-wikimedia from 0.17.0 to 0.18.1
Change-Id: I5e3687be2b197134578126e1b890ee37dbc1bc1b
2021-02-18 08:39:09 -08:00
libraryupgrader
c08a03ee4f build: Updating npm dependencies
* 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
2021-01-03 15:27:57 -08:00
Harriet Ayugi
b8a2e21eed Selenium: Target Mediawiki-Docker by default
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
2020-12-08 15:38:25 +00:00
Ed Sanders
5dece5b27b Update stylelint-config-wikimedia to 0.10.3
Remove needless disables.

Change-Id: I324ab9d23a354cb0298a0714df2535f8e8850261
2020-11-19 23:13:37 +00:00
James D. Forrester
88e54de91d build: Upgrade grunt from 1.1.0 to 1.3.0
Change-Id: I3fdb8738963c222e1b17196951c5469baf037b37
2020-10-22 10:40:00 -07:00
James D. Forrester
58a7b6a175 package-lock.json: Run npm audit fix for node-forge issue
Change-Id: I2c7c0ef1f0fe207a9d381cc7a1cec1df1e57b81a
2020-10-22 10:37:05 -07:00
alqaholic007
9e6c4ca9d7 Selenium: Bump wdio-video-reporter to v3.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
2020-10-22 14:33:09 +00:00
alqaholic007
83a95208d4 build: Auto-fix npm audit issues
Bug: T262438
Change-Id: Ic463fede8c4a5c364ea05f9437e4a3cb4abcfa22
2020-09-10 16:23:31 +01:00
Ed Sanders
4fc3f3af24 build: Update eslint-config-wikimedia to 0.17.0
Fix remaining instances of variable shadowing.

Change-Id: I2a3840446f1fe138410249cc35be5ddf262d8e46
2020-08-20 12:45:09 +01:00
Nikki Nikkhoui
c26d64fc18 UserContributions endpoint add tags 'display' property
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
2020-08-19 06:04:50 -07:00
Nikki Nikkhoui
7452d8c067 REST /me/contributions: return change tags
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
2020-06-25 19:28:02 +02:00
Ed Sanders
ceb2cd2fe8 build: Update eslint-config-wikimedia to 0.16.2
Use jsduck config.

Change-Id: I3a1a0c8f0ca535c9661b3774498866fdb98a4255
2020-06-18 19:12:10 +00:00
Ed Sanders
08510de602 api-testing: Use wikimedia/mocha eslint config
Change-Id: Iec346d87f252c66fbff1e0fa522d7440df6f1764
2020-06-18 19:20:33 +01:00
alqaholic007
eed975d6e3 Selenium: Use wdio-video-reporter for recording test videos
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
2020-06-15 13:32:02 +02:00
daniel
5ac84ffd12 REST /me/contributions: return revisions
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
2020-06-09 08:19:45 -07:00
Ed Sanders
8b720e9bd6 eslint: Update to eslint-config-wikimedia 0.16.0
* valid-jsdoc replaced with jsdoc plugin
* New /selenium config

Change-Id: I471eebac0312cb25c539c3f6a3ecfc7cfd4ed8d6
2020-06-02 21:32:56 +01:00
vidhi-mody
19ba555c71 Selenium: Update to WebdriverIO v6
Update NPM packages: @wdio/* and webdriverio.

Bug: T253306
Change-Id: Id073b4924a00af2078117191d27ba9443dbb67ec
2020-05-21 13:57:40 +00:00
Zfilipin
157a1e3829 Revert "Selenium: Use wdio-video-reporter to record videos of test run"
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
2020-05-20 10:37:09 +00:00
AlQaholic007
babbbbc6e5 Selenium: Use wdio-video-reporter to record videos of test run
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
2020-05-14 19:24:10 +02:00
James D. Forrester
31fbff8914 build: Upgrade karma-related devDependencies to latest
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
2020-05-04 13:54:20 -07:00