Commit graph

753 commits

Author SHA1 Message Date
jenkins-bot 92051b550f Merge "Reduce noise in syntax highlighting tests" 2021-12-22 13:52:04 +00:00
Thiemo Kreuz be08e04309 Reduce noise in syntax highlighting tests
* What we care about is the <pre>. The class="CodeMirror-line" is
  added to every <pre>. We don't really learn anything new when we
  include it in our tests.
* Testing the ARIA role is testing a CodeMirror feature, not a
  feature of the mediawiki mode under test.

Change-Id: I33bfedb304228240c4e835cc983117668c398c61
2021-12-16 06:53:47 +00:00
jenkins-bot 0f70fd33e5 Merge "Fix syntax highlighting test failing when Cite isn't loaded" 2021-12-14 07:26:21 +00:00
Func 189bef8288 Set the line-break attr to initial
Now css rules applied to pre tags can easily affect the appearance of CodeMirror output, may intentionally or not.
With the line-break attr set to initial can make the appearance more stable, users can still override this with the more specific rules if they do want to.

Bug: T252965
Change-Id: If0d29ad152151c09ace2bcd32d2953ec3c9cf1aa
2021-12-12 09:06:20 +00:00
Thiemo Kreuz 0968d3ea16 Fix syntax highlighting test failing when Cite isn't loaded
I forgot this when I added this test case in I03a1e1a.

Also:
* Use another method to detect if the Cite extension is active. This
  is the same method used in the actual code.
* Move a line of code into the `if` it belongs to.

Change-Id: I1efd3f945150aeb08db3c771e579d9a6114a4c21
2021-12-09 10:06:41 +01:00
jenkins-bot 6ad7f542f2 Merge "Fix invalid reference to core resources/ directory" 2021-12-07 23:01:02 +00:00
Bartosz Dziewoński 561ffca718 Don't mess up the page when running tests via Special:JavaScriptTest
* Append to the hidden #qunit-fixture instead of directly to the body
* Use the right selector when cleaning up

Change-Id: I8be38900e6c5f4592f06dfc8f7c2cfc348627716
2021-12-07 14:40:11 +01:00
Derk-Jan Hartman 73441687ae Add q to list of allowed html elements to syntax highlighting
Bug: T289289
Change-Id: I2ab550c9e992a9daae76287313c596db67182d09
2021-12-04 22:17:26 +01:00
vladshapik 60b14d1aa0 Avoid using User::getOption() method
Replace User::getOption() with UserOptionsLookup::getOption() since this method will be hard-deprecated.

Bug: T296083
Change-Id: I405251092fd94fa70a33319d313c5140c8cebc21
2021-11-30 09:12:09 +00:00
Timo Tijhof d97fa84d2b Fix invalid reference to core resources/ directory
This works by accident due to the CWD being mediawiki-core in most
cases during web requests, and Less.php implicitly falling back to that
as path expansion point when all attempts to expand the path fail (e.g.
relative to current file, and relative to a supported Less import dir
such as core `mediawiki.less/`.

Importing raw files from elsewhere in core is unstable, and is not
supported as this fails on some webserver configurations, as well as
in CLI contexts such as maintenance scripts that rebuild a cache, or
otherwise end up (in)directly computing part of a ResourceLoader
module.

The use case of themeing extension styles to the current skin (with
Vector using WikimediaUI) is subject of T112747 and T265941.

Follows-up I9eb07dd43.

Bug: T296639
Change-Id: I6d2be2941d6088b947ea7f18818add97f129760d
2021-11-30 00:58:58 +00:00
libraryupgrader 0acb7475bd build: Updating validator to 13.7.0
* https://npmjs.com/advisories/1004784 (CVE-2021-3765)

Change-Id: I056b958f41dc9453068a0226f12a29ae0b270047
2021-11-04 10:23:33 +00:00
Željko Filipin 3d72bc7fc4 selenium: Remove wdio-video-reporter npm package
The repository uses video recording from wdio-mediawiki package.

Bug: T294341
Change-Id: I2a353b8443d1e5b1b4da8e21952ab882de2b89ae
2021-10-26 14:59:55 +02:00
libraryupgrader 3dabc292ee build: Updating mediawiki/mediawiki-codesniffer to 38.0.0
Change-Id: I0c217f059a4bef30becbf49ce2683041863bd0d9
2021-10-24 01:04:14 +00:00
Alexander Vorwerk 7550ec896b MediaWikiTestCase -> MediaWikiIntegrationTestCase
MediaWikiTestCase has been renamed to MediaWikiIntegrationTestCase in 1.34.

Bug: T293043
Change-Id: I0c1dcff1e637743828793b30ca2c4a5113e0fa31
2021-10-12 21:29:45 +02:00
libraryupgrader 6c842629d9 build: Updating npm dependencies
* @wdio/mocha-framework: 7.4.6 → 7.13.2
  * https://npmjs.com/advisories/5197 (CVE-2021-3807)
* ansi-regex: 5.0.0 → 5.0.1
  * https://npmjs.com/advisories/5197 (CVE-2021-3807)

Additional changes:
* composer.json: Updated phpcs command in composer test (T280592).
* composer.json: Added phpcs command to scripts (T280592).

Change-Id: Ie856dccce0f190788f394f0fd22d3fcddacddb87
2021-10-04 15:31:26 +00:00
Translation updater bot 386bdf745e Localisation updates from https://translatewiki.net.
Change-Id: I9e89967be2f7ced7aa25238fee70f5ed1b1d04ed
2021-09-24 08:26:00 +02:00
Translation updater bot 2d39605442 Localisation updates from https://translatewiki.net.
Change-Id: I7e30b234c8b0d8c5060f722cbc00631301b11c48
2021-09-13 08:29:13 +02:00
libraryupgrader 82158e5324 build: Updating composer dependencies
* mediawiki/mediawiki-phan-config: 0.10.6 → 0.11.0
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

Change-Id: I3f027e302b5740d711697696e7015b76eda3e50f
2021-09-08 20:53:00 +00:00
jenkins-bot f45f5a8516 Merge "Change line numbers default to null" 2021-09-07 11:46:51 +00:00
libraryupgrader 71013b19ec build: Updating stylelint-config-wikimedia to 0.11.1
Change-Id: Ia9c3cbbff62e2363396741ec5655c0673e06c5cb
2021-09-04 19:10:40 +00:00
WMDE-Fisch 0673d75321 Change line numbers default to null
The current default does not work if the extension should be disabled
for the template namespace. See T225753

Should not be merged before the production config is adjusted in
I8be13e0442bc3f7af851f6d1ba8ba9f9011d4907

Bug: T290226
Depends-On: I8be13e0442bc3f7af851f6d1ba8ba9f9011d4907
Change-Id: I630c13f51c87fd801b14c3ada616e7da839240bd
2021-09-03 14:49:11 +02:00
Thiemo Kreuz bab5c5232d Disable line numbering in all Android browser versions
This patch also minifies existing code. Note that [] is true in
JavaScript, unlike in PHP.

Bug: T285660
Change-Id: Ic80903ebd1364505fd4aaf7f53b53324a235fd79
2021-09-03 11:37:03 +00:00
WMDE-Fisch ade62be37e Improve text color & background in line numbers on VE
Bug: T287383
Change-Id: I1ece09c12bfbcb4709d5659d87f3045327729f10
2021-09-02 13:54:31 +02:00
libraryupgrader ad8dfbd770 build: Updating path-parse to 1.0.7
* https://npmjs.com/advisories/1773 (CVE-2021-23343)

Change-Id: I24cfa814a40ece25d83f969f68a0ce2352718cdd
2021-08-11 15:39:38 +00:00
libraryupgrader 0332e21139 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0

npm:
* hosted-git-info: 2.8.8 → 2.8.9
* hosted-git-info: 2.7.1 → 3.0.8
  * https://npmjs.com/advisories/1677 (CVE-2021-23362)
* postcss: 7.0.35 → 7.0.36
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* browserslist: 4.16.0 → 4.16.6
  * https://npmjs.com/advisories/1747 (CVE-2021-23364)
* ws: 7.4.1 → 7.5.3
  * https://npmjs.com/advisories/1748 (CVE-2021-32640)
* glob-parent: 5.1.0 → 5.1.2
  * https://npmjs.com/advisories/1751 (CVE-2020-28469)
* trim-newlines: None → 3.0.1
  * https://npmjs.com/advisories/1753 (CVE-2021-33623)
* normalize-url: 4.5.0 → 4.5.1
  * https://npmjs.com/advisories/1755 (CVE-2021-33502)

Change-Id: Ib03f54f3cf310e5e1abe3d3d773f8320a9b16828
2021-07-23 19:30:13 +00:00
jenkins-bot 017b3fd9e5 Merge "Set default for 'usecodemirror' preference" 2021-07-22 12:34:25 +00:00
MusikAnimal f7ef01b412 Set default for 'usecodemirror' preference
This preferably would be set to on by default so that the extension
works out of the box, but it causes tests to fail in Core (T286623).

Despite the previous state of CodeMirrorHooks::onGetPreferences(),
CodeMirror was never on by default anyway.

Bug: T286270
Change-Id: Ic702b868b55aaa8ab71ddedd289c25f36b34b112
2021-07-20 23:25:12 -04:00
jenkins-bot 79284952de Merge "Fire a hook when the CodeMirror editor is switched" 2021-07-13 04:39:52 +00:00
sahil daeaae012c selenium: Update wdio-mediawiki
wdio-mediawiki v1.1.1:
- Includes wdio-defaults.conf.js file that vastly simplifies wdio.conf.js.
- Replaces @wdio/spec-reporter with @wdio/dot-reporter.
- Introduces video recording.

Bug: T283597
Change-Id: I88096682276de901e9a9f0d406b7b2e5ca2d8875
2021-06-21 19:36:43 +05:30
Inductiveload a57d7b7c1c Fire a hook when the CodeMirror editor is switched
This allows gadgets to react to the changing editor (for example
to rebind event handlers on the new active editor) without having
to use something like an MutationObserver.

Bug: T284282
Change-Id: I83f0a3c29b01031ae370b7d1207457586f0d25d6
2021-06-16 02:29:55 +01:00
Ed Sanders 3be6ae4b12 Move var declarations inline
Change-Id: I5a390c5621cefce1b396831654d54a74d0a63e9f
2021-06-15 15:50:09 +01:00
sahil f1221d00ec selenium: Upgrade WebdriverIO to v7
Update npm packages: @wdio/* and webdriverio.

Bug: T274579
Change-Id: I6a154ffa5d00f86aa0718aacf5593259568f250d
2021-06-09 00:26:50 +05:30
Translation updater bot 2a4d6c0c08 Localisation updates from https://translatewiki.net.
Change-Id: I7a7e8b7dbe43f757ef04b0ba9696e9ffc9ac99fd
2021-05-27 12:05:00 +02:00
jenkins-bot 5018971a0e Merge "selenium: Update README.md file" 2021-05-25 14:04:40 +00:00
libraryupgrader b27bdeca07 build: Updating npm dependencies
* hosted-git-info: 3.0.7 → 3.0.8
* hosted-git-info: 2.8.8 → 2.8.9
* hosted-git-info: 2.7.1 → 2.8.9
  * https://npmjs.com/advisories/1677 (CVE-2021-23362)
* browserslist: 4.16.0 → 4.16.6
  * https://npmjs.com/advisories/1747 (CVE-2021-23364)

Change-Id: I6807b7e99ae8a06cf3879f08db62bf3ed1418df8
2021-05-25 01:17:06 +00:00
sahil 1b35a907d9 selenium: Update README.md file
Bug: T282237
Change-Id: I790cb97f0c6b274ff881c87b48a5693538538e14
2021-05-24 18:10:43 +00:00
Kunal Mehta 12b749211d build: Use HTTPS for all dependencies
Change-Id: I756599868b00c4f1a64a9ba3f7304e5445095be9
2021-05-19 09:23:25 -07:00
libraryupgrader 502284280f build: Updating npm dependencies
* hosted-git-info: 2.7.1 → 3.0.8
  * https://npmjs.com/advisories/1677 (CVE-2021-23362)
* postcss: 7.0.35 → 8.2.15
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)

Change-Id: If1af62d78910f8a5c6f7845ddba3cc4ad55cf9ac
2021-05-15 12:50:38 +00:00
libraryupgrader b076da0749 build: Updating npm dependencies
* grunt: 1.3.0 → 1.4.0
* hosted-git-info: 2.7.1 → 3.0.8
  * https://npmjs.com/advisories/1677 (CVE-2021-23362)

Change-Id: I8ab7ee85fb9af5504db5f4c6bbb91eb70f79492c
2021-05-09 06:02:25 +00:00
libraryupgrader b36f7615de build: Updating npm dependencies
* lodash: 4.17.19 → 4.17.21
  * https://npmjs.com/advisories/1673 (CVE-2021-23337)
* hosted-git-info: 2.7.1 → 3.0.8
  * https://npmjs.com/advisories/1677 (CVE-2021-23362)
* ua-parser-js: 0.7.23 → 0.7.28
  * https://npmjs.com/advisories/1679 (CVE-2021-27292)

Change-Id: I113067a963481163e077abca5d6ff8ee80e0a635
2021-05-07 16:46:59 +00:00
jenkins-bot dfa7b87bac Merge "build: Updating composer dependencies" 2021-05-04 02:30:34 +00:00
libraryupgrader 5717268bf2 build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: Ic0a73b848e4fe838be71a6450dff8bb6bd06c1b8
2021-05-04 02:01:33 +00:00
Alexander Vorwerk 6bf535cffc Avoid using User::getOptionKinds()
User::getOptionKinds() is deprecated and should be replaced with UserOptionsManager::getOptionKinds()

Bug: T277600
Change-Id: Ie30ae74839f91aa48c53a5ebf680adb21eb9b047
2021-05-03 11:39:48 +00:00
jenkins-bot 6fd33d774f Merge "Fix MediaWiki highlighter partly failing on quoted attributes" 2021-04-30 12:43:30 +00:00
Željko Filipin ae374bf752 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: Idc5172cd62a1ca3fea9275829dda764c94d877ed
2021-04-28 12:37:18 +02:00
Thiemo Kreuz 032bed3c61 Fix MediaWiki highlighter partly failing on quoted attributes
In T270880 an example with a slash in <ref name="a/b"> is
described. The same issue happens with several other characters
including the closing bracket, e.g. <ref name="a>b">. This patch
fixes all of this by accepting _all_ characters between double
and single quotes.

Bug: T270880
Change-Id: I03a1e1a25af692dc703b44a57b2d23d6fc15c8c9
2021-04-23 20:43:33 +02:00
jenkins-bot f569bf8d75 Merge "Fix bracket matching getting stuck when leaving the brackets" 2021-04-23 14:58:23 +00:00
Thiemo Kreuz 26a05d1dd0 Allow HTML comments and newlines in template names
Bug: T277767
Change-Id: I0a82af178d768e5f4d3dd81b1759c0ce72310397
2021-04-23 15:34:20 +02:00
Thiemo Kreuz 5186c6f3a2 Fix bracket matching getting stuck when leaving the brackets
Bug: T278840
Bug: T280978
Change-Id: Ia552fcd829ce38cbb7ac7fd7ebecad971a83e4c3
2021-04-23 14:48:23 +02:00
libraryupgrader 6e6356ccc0 build: Updating eslint-config-wikimedia to 0.20.0
Change-Id: I2ba141a980f111088c29a2730b23d7d6695513a6
2021-04-16 06:19:03 +00:00