The parsing of the timecorrection useroption was split over multiple
classes. Combine into a single class and add some testcases.
Change-Id: I2cadac00e46dff2bc7d81ac2f294ea2ae4e72f47
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
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
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
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
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
We still rely on Title internally, until the logic for mapping Titles to
URLs has been factored out.
Bug: T279796
Change-Id: I6abf30b8359fbe306c569ea290a64ed0d4105d71
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
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
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