Commit graph

126622 commits

Author SHA1 Message Date
Ed Sanders
c20d111b50 eslint: Autofix var to let/const
Temporarily disable no-var & prefer-const as resulting errors
need to be fixed manually.

Change-Id: I6cb62a2c70a4c1fc265a00b1f18af127ac9d5029
2024-09-12 17:09:17 +01:00
jenkins-bot
bc055b6ca4 Merge "Customise Special:UserLogout success message for temporary account" 2024-09-12 11:18:07 +00:00
Dreamy Jazz
ab89fff633 Customise Special:UserLogout success message for temporary account
Why:
* When a temporary account exits their session, the
  Special:UserLogout page is loaded to indicate the success.
* However, the success page talks about the temporary account
  logging out which may cause confusion.
* Per design mocks shared on T374519, this should be modified
  to indicate that the user logged out of a temporary account.

What:
* Set 'templogout' as the page title when the user is logging out
  of a temporary account.
* Set 'logouttext-for-temporary-account' as the message shown
  for a logout success when the user is logging out from a
  temporary account
* Update mediawiki.page.ready/ready.js to add a flag to the
  URL Special:UserLogout URL that is redirected to once the
  logout API call has occured.
* Update tests for SpecialUserLogoutTest

Bug: T374519
Change-Id: Ib62cdb5ba716976321cd556aa9defe97b3446b33
2024-09-12 11:06:46 +01:00
Translation updater bot
2efc9ea4d3
Localisation updates from https://translatewiki.net.
Change-Id: I89f1352a188983ec09678412dfd3fb36a2ac4728
2024-09-12 09:04:15 +02:00
jenkins-bot
3e6ced51b4 Merge "SpecialExpandTemplates: Replace use of deprecated OutputPage::addCategoryLinks()" 2024-09-11 22:27:40 +00:00
jenkins-bot
0362a80538 Merge "Add Jest to MW Core for testing Vue components" 2024-09-11 21:39:59 +00:00
Eric Gardner
48798f130f Add Jest to MW Core for testing Vue components
This brings Jest to MW Core so that Vue components can more easily be
tested. Packages ending with 'icons.json' are auto-mapped to the
@wikimedia/codex-icons package, establishing a new convention.
Jest is needed for testing Vue, but can be used for general JS testing
as well. Documentation to come at https://www.mediawiki.org/wiki/Jest

Usage: to run the tests, run "npx jest" or "npm run jest" in the root
folder. This could be aliased to a "test:unit" script in package.json
if desired.

In order to make a Vue component testable, it is required to follow the
`module.exports = exports` pattern. See:
https://nodejs.org/api/modules.html#exports-shortcut

A default jest.setup.js is added that mocks Core's mw global object, as
well as providing the $i18n Vue plugin. This is based on
Extension:GrowthExperiments (GPL-3.0-or-later). See https://w.wiki/B9vM

An initial test for mediawiki.special.block is added, exemplifying how
to mock calls to mw.config.get().

NOTE: The "overrides" added to package.json is a temporary measure to
get around a current issue with caniuse-lite and the stylelint plugin
that relies on it. See:
https://github.com/RJWadley/stylelint-no-unsupported-browser-features/issues/299

Bug: T251790
Change-Id: I1af15e038d17b0f1c645fc5debf9db5846f6215c
2024-09-11 16:40:17 -04:00
Umherirrender
b81bf56898 parser: Remove PPDStack_Hash::$false
The value is never changed, just use false

Change-Id: I6ff2b1e91f28340f8f467a1d5e50cc132e142b95
2024-09-11 22:09:49 +02:00
jenkins-bot
41e428a0a5 Merge "Fix broken deleteSelfExternals.php and test it" 2024-09-11 18:57:37 +00:00
James D. Forrester
73fe5c2b48 SpecialExpandTemplates: Replace use of deprecated OutputPage::addCategoryLinks()
Bug: T373830
Change-Id: I9d83d6e1c33f4d7aaba18119becc4c5026f7fe51
2024-09-11 14:38:17 -04:00
jenkins-bot
2f38506886 Merge "Test grep.php" 2024-09-11 18:36:23 +00:00
jenkins-bot
3c9691ea24 Merge "Start on tests for userOptions.php" 2024-09-11 18:30:43 +00:00
jenkins-bot
076470f703 Merge "Expand ResetUserEmailTest" 2024-09-11 18:30:33 +00:00
jenkins-bot
30f43bb368 Merge "Expand MigrateUserGroupTest" 2024-09-11 18:29:11 +00:00
jenkins-bot
8ef0f2e7b7 Merge "Move BenchmarkerTest and MaintenanceTest into includes folder" 2024-09-11 18:28:04 +00:00
jenkins-bot
d4f5d4169e Merge "Start on tests for updateExtensionJsonSchema.php" 2024-09-11 18:27:55 +00:00
jenkins-bot
4cab46afac Merge "Test alltrans.php and dumpMessages.php" 2024-09-11 18:27:46 +00:00
jenkins-bot
558c97832b Merge "Expand RollbackEditsTest" 2024-09-11 18:27:38 +00:00
Dreamy Jazz
4a6de09299 Fix broken deleteSelfExternals.php and test it
Why:
* The deleteSelfExternals.php maintenance script is broken on
  my local wiki as the SQL generated by the script errors out
  when run on MariaDB.
* This script should be fixed, updated to use the query builders,
  and tested to ensure that any future breakages do not go
  unnoticed.

What:
* Fix the deleteSelfExternals.php script to use a DELETE query
  that works, by generating it using the query builder.
* Create DeleteSelfExternalsTest to test that the script now
  works.

Bug: T371167
Change-Id: Id423fa5c1bfe666f57a38e733334342ac1ad2cea
2024-09-11 18:23:40 +00:00
jenkins-bot
01a6b2f8fe Merge "Expand GetTextMaintTest" 2024-09-11 18:17:00 +00:00
jenkins-bot
0375988caa Merge "Expand CleanupWatchlistTest" 2024-09-11 18:16:52 +00:00
Timo Tijhof
bb25981313 build: De-duplicate two recent CREDITS additions via mailmap
Follows-up I617f7aead0 (90b0c03a53).

Bug: T372295
Change-Id: Ibbc9761852e9c431e98f0ec55c252093b6fb0b06
2024-09-11 10:02:02 -07:00
Željko Filipin
6700247fa6 selenium: Fix Main Page should have "Log in" link
Three tests with that name were by mistake going to `/Main Page` instead of `Main Page`.

Bug: T373125
Change-Id: I5936f2c944765f576ab87d899002f7f24116ef44
2024-09-11 15:59:11 +02:00
jenkins-bot
811289b316 Merge "selenium: Main page should have "Log in" link" 2024-09-11 13:49:34 +00:00
Timo Tijhof
8268b5e72c
objectcache: Improve overall BagOStuff class docs
Fix file doc blocks while at it.

> Remove duplicate description from file block in favour of class doc.
> This reduces needless duplication and is often incorrect or outdated,
> and helps make file headers more consistently (visually) ignorable.
>
> Add missing `ingroup` to class doc (and remove any from file doc)
> as otherwise the file is indexed twice (e.g. in Doxygen) which makes
> navigation on doc.wikimedia.org rather messy.
>
> Ref https://gerrit.wikimedia.org/r/q/message:ingroup+is:merged+owner:Krinkle+branch:master

Bug: T364652
Change-Id: Icc36566da1c7190b0f4269719f34d3d6a83026c1
2024-09-11 11:55:10 +01:00
Željko Filipin
bc772ddda0 selenium: Main page should have "Log in" link
Make it explicit that there are three separate tests
by expanding test names.

Until now, these three tests were doing the same thing,
but in a different way. All three tests had the same name.
That made it harder to debug if anything went wrong.
For example, all three tests created the screenshot file
with the same name.

Bug: T373125
Change-Id: I53f62186fd4e8ffbe5e93642c933da2493b91896
2024-09-11 10:55:58 +02:00
Translation updater bot
d38689ae1d
Localisation updates from https://translatewiki.net.
Change-Id: I51b8b76b077599d5a96343ec13993d4cfe3b14fe
2024-09-11 09:04:29 +02:00
jenkins-bot
5319d0b31c Merge "Migrate all uses of deprecated URL global functions to use wfGetUrlUtils()" 2024-09-11 01:03:17 +00:00
jenkins-bot
d7fe4e3baa Merge "objectcache: Migrate WANObjectCache metrics to StatsLib" 2024-09-11 00:19:25 +00:00
jenkins-bot
a46f635ec8 Merge "mediawiki.special.block [vue]: include $wgAutoblockExpiry in message" 2024-09-11 00:01:04 +00:00
Derick Alangi
68dea2a28e objectcache: Migrate WANObjectCache metrics to StatsLib
This patch begins migrating the WANObjectCache metrics from graphite
to prometheus. This class can be constructed directly and parameter
options (which might include a stats collector object) passed, so we
need a way to detect the incorrect case and warn accordingly.

Since this is used by extensions, and we want to support only the new
StatsFactory option. We need a way to track and warn places where the
old stats collector is still in use and also put in place a mechanism
so new code doesn't use the old stats collector.

So, constructing a WANObjectCache object with an IBufferingStatsDataFactory
stats collector is deprecated in this patch in favor of the new collector.
Callers are responsible for fixing usage to StatsFactory.

Bug: T359257
Change-Id: If1162f69997b1b914fb9e02dad7d7ae1540d2d01
2024-09-10 23:53:03 +00:00
James D. Forrester
2b11d61577 Migrate all uses of deprecated URL global functions to use wfGetUrlUtils()
wfGetUrlUtils() is also deprecated, but less so, so we can do this first
and then properly replace the individual uses with dependency injection
in local pieces of work.

Also:
* Switching Parser::getExternalLinkRel to UrlUtils::matchesDomainList
  exposed a type error in media.txt where $wgNoFollowDomainExceptions
  was set to a string (which is invalid) instead of an array.

Bug: T319340
Change-Id: Icb512d7241954ee155b64c57f3782b86acfd9a4c
2024-09-10 16:50:02 -07:00
jenkins-bot
09121089f4 Merge "auth: Disable irrelevant account creation fields for temp users" 2024-09-10 20:05:43 +00:00
jenkins-bot
6aa500ccd8 Merge "wdio-mediawiki: Fix incorrect async execute() usage" 2024-09-10 20:01:23 +00:00
C. Scott Ananian
7249c4c982 parserTests.txt: Update documentation about cat/ill options
Parsoid does support these options now.

Change-Id: I9caedd10b8f7229602ad4f963275b62777aca104
2024-09-10 19:30:07 +00:00
jenkins-bot
d9bfb09ad6 Merge "SUL3: Enable multiple auth providers to refresh "remember me" status" 2024-09-10 18:51:03 +00:00
jenkins-bot
4a611caaa7 Merge "UserOptionsManager: Allow global prefs for users without local accounts" 2024-09-10 18:22:53 +00:00
jenkins-bot
4e22eeefc0 Merge "phpunit: Drop unused complexity from RandomImageGenerator" 2024-09-10 18:11:08 +00:00
jenkins-bot
550dfab968 Merge "Clean up a few comments in HtmlOutputRendererHelper (typos, etc.)" 2024-09-10 17:27:38 +00:00
jenkins-bot
7fa2b33fb4 Merge "Add missing documentation to class properties in NameTableStoreFactory" 2024-09-10 15:42:30 +00:00
Máté Szabó
d150c66840 auth: Disable irrelevant account creation fields for temp users
Why:

- When signing up for an account, temporary users are currently forced
  to provide a reason for creating an account, and also have the option
  to send a temporary password to an email address.
- Neither of these options are useful for temporary users wanting to
  create a full user account.

What:

- Don't show these two form fields on Special:CreateAccount for temporary users.
- Add a functional test for the temporary user account creation flow.

Bug: T328718
Change-Id: Ie545857f7647be89d9462ec2b0def48690f0a2bf
2024-09-10 16:45:56 +02:00
Atieno
90b0c03a53 Update credits ahead of the 1.43 release
Bug: T372295
Change-Id: I617f7aead0b3a4b638afce1d551f06f7c23542fb
2024-09-10 09:38:22 -04:00
jenkins-bot
c561dff5bf Merge "mailmap: Add new CREDITS duplicate entries" 2024-09-10 13:22:11 +00:00
jenkins-bot
0de8854427 Merge "Avoid use of deprecated wfExpandUrl in various places" 2024-09-10 12:57:54 +00:00
jenkins-bot
d025f36645 Merge "Avoid use of deprecated global functions in MWHttpRequest" 2024-09-10 12:57:47 +00:00
jenkins-bot
0395261733 Merge "Add release notes for CentralIdLookup::isOwned()" 2024-09-10 10:58:09 +00:00
Atieno
26a9cd7982 mailmap: Add new CREDITS duplicate entries
Bug: T372295
Change-Id: Ia1a097acdceccdf39188894a4729d8020f863263
2024-09-10 12:14:30 +03:00
thiemowmde
18ee885652 phpunit: Drop unused complexity from RandomImageGenerator
I believe we don't need this any more. A test should never leave an
uploaded image behind, but delete it. It should be totally fine when
the same trivial test uploads the same image over and over again. All
the extra complexity to trick MediaWiki's duplicate detection shouldn't
be necessary (any more).

Also change the default to svg instead of jpg. Again, this creates much
smaller files with much less effort.

Note this code was already mostly unused because of the previous patch
I7f3d586.

Change-Id: I5c16ba7bed0fffa43549b786e50d6d1dd5592ad0
2024-09-10 11:05:22 +02:00
Derick Alangi
361e056b17
SUL3: Enable multiple auth providers to refresh "remember me" status
This allows a primary auth providers to update the "remember me" status
of another primary provider in the same login request flow. If authentication
that happened elsewhere and a "remember me" / "keep me logged in" (extended
login period is selected), the value of this action applied by the remote
primary provider should be applied to the local wiki when the user is
redirected back to continue authentication there.

This is useful because:

In the case of Wikimedia's central domain wiki in SUL3 mode, we want to
apply the remember me (keep me logged in) flag value from the central domain
to the local domain.

Bug: T369668
Change-Id: I6e2e2d892d2b777cb4757c7c0d222afad9da506c
2024-09-10 10:05:00 +01:00
Translation updater bot
3d2c3032fd
Localisation updates from https://translatewiki.net.
Change-Id: Ia965b94753aa0a16be1deef703977b909b1f4dce
2024-09-10 09:01:15 +02:00