Commit graph

13576 commits

Author SHA1 Message Date
Derk-Jan Hartman
65c955746c Split TimeCorrection parser into separate class
The parsing of the timecorrection useroption was split over multiple
classes. Combine into a single class and add some testcases.

Change-Id: I2cadac00e46dff2bc7d81ac2f294ea2ae4e72f47
2021-05-07 10:43:09 -07:00
Cindy Cicalese
fb6b6e058c Fix parameter order of setWatch to match add/removeWatch
Change-Id: I0ea63482a5cab24c23b49b8bbe6c80bdbe8b102b
2021-04-21 04:41:38 +00:00
Cindy Cicalese
b242d49a62 Use WatchlistManager in API classes
Change-Id: I7b2016162e86b455c0102742751981c44d7e829c
2021-04-21 04:41:06 +00:00
Cindy Cicalese
63a29ba722 Use WatchlistManager in special classes
Change-Id: Ibe1ac90aa05db8f1018f59bb48da98e416b051c1
2021-04-21 04:40:57 +00:00
Cindy Cicalese
a384acffa7 Use WatchlistManager in several classes
Change-Id: I720629e08373736b5fc1e12563b5059311b113e1
2021-04-21 00:37:40 -04:00
Cindy Cicalese
ce6a4ef45e Use WatchlistManager in auth classes
Change-Id: Ib8d338bc0b167277f36ab6c5d45c98c35e4a9ba9
2021-04-21 02:48:31 +00:00
Cindy Cicalese
f8ed11e170 Replace doWatch/doUnwatch with addWatch*/removeWatch*
Change-Id: I8882bc24b178ea49198bed5fb206e1a8ea0a4f30
2021-04-20 22:46:07 -04:00
jenkins-bot
b72b2973b0 Merge "Move watchlist-related methods from WatchAction to WatchlistManager" 2021-04-21 02:13:17 +00:00
Cindy Cicalese
577824ae7f Move watchlist-related methods from WatchAction to WatchlistManager
Deprecate the watchlist-related methods in WatchAction.

Change-Id: Id235cc483e2f1f3a432e2c26aebc48ae6cd73a0b
2021-04-20 21:44:54 -04:00
jenkins-bot
f1df1bc934 Merge "selenium: Fix browser.getText is not a function" 2021-04-20 16:43:46 +00:00
jenkins-bot
44ce04b7e4 Merge "Stop using legacy ActorMigration field "ar_user"" 2021-04-20 12:01:11 +00:00
jenkins-bot
053c179957 Merge "Stop using legacy ActorMigration fields in DatabaseBlockStore" 2021-04-20 11:45:39 +00:00
Željko Filipin
0d3c17754c selenium: Fix browser.getText is not a function
Tests in rollback.js are disabled due to flakiness. After enabling them
a few of them fail with `browser.getText is not a function`.
It is caused by WebdriverIO API change. `browser.getText()` was replaced
with `$().getText()`. The problem was not noticed during the WebdriverIO
upgrade since the tests were disabled.

Bug: T280639
Change-Id: I4b21bbc1ad9ddbc8b04b444b21ee67b2621f54e7
2021-04-20 10:37:43 +00:00
Tim Starling
419dde00f5 Stop using legacy ActorMigration field "ar_user"
Bug: T278917
Change-Id: Ib6bdb727d58a1732448a2034732269f2f125be7e
2021-04-20 12:44:29 +10:00
jenkins-bot
11c7b11398 Merge "resourceloader: Remove support for $wgLegacyJavaScriptGlobals" 2021-04-19 23:17:27 +00:00
Amir Sarabadani
99d4ad5995 resourceloader: Remove support for $wgLegacyJavaScriptGlobals
Bug: T72470
Change-Id: I321a3bf5a85e2b4069ef003db65ac93b69692c83
2021-04-19 22:54:43 +00:00
jenkins-bot
cd06b27af7 Merge "FileRepo: replace Title in method signatures" 2021-04-19 18:11:54 +00:00
jenkins-bot
4cee3f6a01 Merge "RepoGroup: replace Title in method signatures" 2021-04-19 18:11:04 +00:00
jenkins-bot
9f39b1f55d Merge "HtmlCacheUpdater: replace Title in method signatures." 2021-04-19 18:10:57 +00:00
jenkins-bot
e6c71e9877 Merge "Drop Autopromote class, deprecated since 1.35" 2021-04-19 18:10:51 +00:00
Petr Pchelko
c925cb1a4a Drop Autopromote class, deprecated since 1.35
Change-Id: Iee9a3e43fc1689dde867ec7349f0347c741abc36
2021-04-19 09:20:36 -07:00
jenkins-bot
6b11cdec80 Merge "Installer: Do not use mediawiki.skinning.interface module" 2021-04-19 13:39:32 +00:00
jenkins-bot
c67dddf9c2 Merge "Use WatchlistManager instead of User in WatchAction" 2021-04-19 03:40:38 +00:00
jenkins-bot
d245e4cfbb Merge "Move watchlist-related methods from User to WatchlistManager" 2021-04-19 03:40:32 +00:00
jenkins-bot
629d4e1aed Merge "UserPasswordPolicyTest: Replace PasswordCannotMatchBlacklist with PasswordCannotMatchDefaults" 2021-04-19 03:16:41 +00:00
jenkins-bot
022b38299b Merge "Remove Title from method signatures in User" 2021-04-19 02:52:51 +00:00
Cindy Cicalese
6bf0a0d3ef Use WatchlistManager instead of User in WatchAction
Change-Id: I69b40bdc6168a9a0afeb7fed7494415788b1c8b8
2021-04-19 01:49:47 +00:00
Cindy Cicalese
47998b0783 Move watchlist-related methods from User to WatchlistManager
Deprecate the watchlist-related methods in User.

Change-Id: I1cde60252dd0f9659c718e27c7f2193294de63cd
2021-04-19 01:47:53 +00:00
Tim Starling
57ce83d73a Stop using legacy ActorMigration fields in DatabaseBlockStore
Stop using ipb_user and rc_user fields in calls to ActorMigration.

Bug: T278917
Change-Id: I45a214a8647a21146b6f1de4a75ec53faeb3409c
2021-04-19 10:51:03 +10:00
Reedy
d750ddc890 UserPasswordPolicyTest: Replace PasswordCannotMatchBlacklist with PasswordCannotMatchDefaults
Change-Id: Id04346ea0a7dcc554e89196995c792fcf5d5d7ed
2021-04-18 23:52:57 +01:00
jenkins-bot
9f84096300 Merge "Convert PageEditStash to PageIdentity/UserIdentity" 2021-04-16 22:29:31 +00:00
jenkins-bot
7d7a313e8a Merge "User: use ActorNormalization to insert actor" 2021-04-16 22:29:17 +00:00
jenkins-bot
d5d8cef623 Merge "phpunit: Mass-replace setMethods with onlyMethods and adjust" 2021-04-16 19:49:27 +00:00
daniel
cf6e3c50dc Remove Title from method signatures in User
Bug: T278459
Change-Id: I78c6a1b57e1b8383905e6650ab16085d28a38769
2021-04-16 15:37:05 -04:00
Daimona Eaytoy
535d7abf59 phpunit: Mass-replace setMethods with onlyMethods and adjust
Ended up using
  grep -Prl '\->setMethods\(' . | xargs sed -r -i 's/setMethods\(/onlyMethods\(/g'

special-casing setMethods( null ) -> onlyMethods( [] )

and then manual fix of failing test (from PS2 onwards).

Bug: T278010
Change-Id: I012dca7ae774bb430c1c44d50991ba0b633353f1
2021-04-16 20:15:00 +02:00
Željko Filipin
1d851ec5bd selenium: Fix ReferenceError: test is not defined
I've removed `test` argument from afterTest hook by mistake in 2320f00.
It's needed by `filePath()`.

Linters didn't catch this and tests didn't fail, so this mistake went
unnoticed.

Bug: T280355
Change-Id: I1bc142d8282b7a7266233c69d0b27f8700c8f473
2021-04-16 20:11:05 +02:00
jenkins-bot
592bb57b31 Merge "Remove Title from public interface of OutputPage" 2021-04-16 17:49:53 +00:00
jenkins-bot
2bb6e3b270 Merge "selenium: Explicitly make screenshots for passing and failing tests" 2021-04-16 17:49:47 +00:00
daniel
c1eb74603a Remove Title from public interface of OutputPage
Bug: T278459
Change-Id: If455682540faf8d42fd8a14e0ef09bac24f72db4
2021-04-16 10:01:56 -07:00
Željko Filipin
2320f00eef selenium: Explicitly make screenshots for passing and failing tests
There is code in wdio.conf.js to only take screenshots of failed tests.

For a while now, `test.passed` is returning `undefined`, so screenshots
are taken for both passing and failing tests. The change probably
happened when we upgraded webdriverio to v5 or v6, but nobody noticed
it.

I actually like the current behavior. We take videos for both passing
and failing tests, so it makes sense to take screenshots too. Both
screenshots and videos are small files.
(The biggest screenshot is 539 KB, the biggest video is 21 KB.)

Bug: T280355
Change-Id: I8a73afcda19d6dc1cad75256835448488aff37d5
2021-04-16 17:01:53 +00:00
jenkins-bot
e6a88353de Merge "Do not use a NullLogger when no handler is declared" 2021-04-16 16:40:15 +00:00
Željko Filipin
d0762b576f selenium: Remove Screenshot location... messages
A typical output when running Selenium tests contains a lot of
`Screenshot location...` messages. They are not useful and should be
removed.

Bug: T280343
Change-Id: I462a3764f4a26c4231ff48797c4834ba80a4079d
2021-04-16 15:45:53 +02:00
daniel
90e1469012 HtmlCacheUpdater: replace Title in method signatures.
We still rely on Title internally, until the logic for mapping Titles to
URLs has been factored out.

Bug: T279796
Change-Id: I6abf30b8359fbe306c569ea290a64ed0d4105d71
2021-04-16 11:04:26 +00:00
daniel
4eebc3491a FileRepo: replace Title in method signatures
NOTE: FileRepo is extended (via LocalRepo) by a couple of extensions,
even though it is not stable to extend. Hwever, none of these extensions
overrides any of the methods changed here.
https://codesearch.wmcloud.org/extensions/?q=extends%20%5Cw%2BRepo%5Cb&i=nope&files=&excludeFiles=&repos=

Bug: T278459
Change-Id: I0c236bfa354b01b03f864dd343371e4ae323b56f
2021-04-16 11:01:48 +00:00
daniel
e0000ce176 RepoGroup: replace Title in method signatures
Bug: T278459
Change-Id: Icee70d3743b321b25c046429e8738fffa6a657de
2021-04-16 11:01:33 +00:00
Petr Pchelko
021206c232 User: use ActorNormalization to insert actor
While creating users, we have several interesting corner cases:

- When creating a new User, we actually rely on the 'unique'
constraint on actor_name. This is important if something calls
'User::createNew' with a name that is already occupied by an
existing anon actor with no user. This is quite a weird corner case,
but there's a test for that. We could probably assimilate this
nicly in actor store by checking whether the user id in the database
for the actor we found is the same as user id in the passed in user identity.
- Even more interesting use-case is 'subsuming' existing actors with
reserved user names. When we call User::newSystemUser, and there is
already an actor with the same reserved name, we 'subsume' that actor
and take over it's actor_id for our new system user. This can now be
done with an upsert. This state of having reserved actor with no user
is not easy to cause, but imports or updating from old MW versions
seem to be able to produce this state. Archeology revealed that
'subsuming' existing actor was added for installer.

Change-Id: I16b2f088217db0283215fc2ef5fb04a3742e1626
2021-04-15 13:42:39 -07:00
Func
278e195ab7 Set $status->value in EditFilterMergedContentHookConstraint::checkConstraint() properly to display error message
When hook handler return false and use $status->fatal() to put up a error,
we should set $status->value to self::AS_HOOK_ERROR_EXPECTED to show edit form
and display error message.

Bug: T273354
Change-Id: I02d643c5cb1978da8ab749856493d75137b6cb02
2021-04-15 22:01:30 +02:00
jdlrobson
e5f09fd1bb Installer: Do not use mediawiki.skinning.interface module
The `mediawiki.skinning.interface` module includes the `toc` feature
which is enabled by default,
which requires a working localization environment which requires
DBLoadBalancer which is disabled at this entry point.

Instead use ResourceLoaderSkinModule directly with an opt-in
policy where toc feature is not disbled.

This means the definition in Resources.php is no longer
necessary so it is marked for deprecation. The installer
now works.

A unit test is added to make sure the installer stylesheet
doesn't break again.

Bug: T270027
Change-Id: I851fcd0e50e3a70158d5bfa1fdcae3cd278694d6
2021-04-15 11:11:32 -07:00
DannyS712
d638b0c2cf Move remaining ParamValidator tests to unit tests
Change-Id: I82d18a3c8a4c68c7456d5e5e4979d6445185f1c8
2021-04-15 14:51:39 +00:00
jenkins-bot
c32c06887f Merge "Move most ParamValidator tests to unit tests" 2021-04-15 14:49:13 +00:00