Commit graph

616 commits

Author SHA1 Message Date
jenkins-bot 7d765515b7 Merge "Avoid DB access in non-Database tests" 2023-08-05 04:17:03 +00:00
bwang a5d62502ad Finish updating echo tests to use new MobileFrontend icon class
Change-Id: I304f894c7b55544b7907ee81525604811db6e8e1
2023-08-04 13:41:17 -05:00
Daimona Eaytoy 713f60aaa5 Avoid DB access in non-Database tests
Use mocks when possible, and add the test to the Database group
otherwise.

Also rename 2 test files to avoid a PHPUnit deprecation of file name not
matching class name.

Change-Id: I16b2392daf01f63511c82b4ed0e67a38e35ddbe1
2023-08-04 02:31:24 +02:00
bwang ddaf43c5a0 Update notification badge to not rely on mw-ui-icon
This will essentially all be deleted after I55c18cf723a32f80b93a01dd0687e005162c4e93, but thats fine\

Bug: T343053
Change-Id: Ifb382af388cdc24dc1ecef105ec89c9129194c19
2023-08-02 19:10:34 +00:00
jenkins-bot 8b365dca6f Merge "tests: Call editPage() with WikiPage when used for same page" 2023-07-17 20:48:18 +00:00
Daimona Eaytoy 0d8422a569 Avoid DB access in tests when possible
Use mocks where that makes sense, and add `@group Database` otherwise.

Change-Id: I8f8ec8f4b2c73066cc8e7a6f8e38b3fc286a1070
2023-07-17 20:12:04 +02:00
Umherirrender 36970ce54c tests: Call editPage() with WikiPage when used for same page
When calling editPage() with a string it converts it to a WikiPage each
time it is called. When edit a page only once that is okay,
but when adding more revision to the same page it is better to pass a
WikiPage instead to allow reuse of internal states of WikiPage to speed
up the tests

Change-Id: Iac4ef3a3838ba22cd98b944e3ac7f596d540b405
2023-07-15 22:32:16 +02:00
WMDE-Fisch ef8a472299 selenium: run tests concurrently
Bug: T226869
Change-Id: I55572d5427877364c21631db2f44f8d39b774f95
2023-06-29 15:30:28 +02:00
Daimona Eaytoy baf711c3c5 Replace remaining usages of deprecated MWException
Bug: T328220
Change-Id: I97ea68525392e921b970d15b5d5ffd9c89bae452
2023-06-09 02:23:08 +02:00
Timo Tijhof c51bb93320 tests: Modernize test syntax
* Remove redundant file closure.
* Remove needless QUnit.newMwEnvironment() calls as the tested
  methods don't alter mw.config or mw.messages. Slow, as per
  https://gerrit.wikimedia.org/r/c/mediawiki/core/+/912936/

Change-Id: I61bf03325d5067568d057ff2af6bf65f279a8a84
2023-06-02 16:09:38 +01:00
Umherirrender 680e91c75c tests: Make PHPUnit data providers static
Initally used a new sniff with autofix (T333745)

Bug: T332865
Change-Id: I8b6fbfc300d62a10da770c8a1ca61756c7d7bf59
2023-05-20 20:36:33 +02:00
Kosta Harlan 53efddc825
Don't send page-linked notifications for pages created by bot users
Bug: T318523
Change-Id: I704a2912e0a8b0e996d4e4e0a73f4ed3b9ccf6be
2023-04-28 12:13:04 +02:00
Kosta Harlan 016b25b43a
tests: Add namespace for UserLocatorTest
Change-Id: I329801c0f7fe47730174f533fb5df683f42a8566
2023-04-28 11:58:56 +02:00
libraryupgrader c59fb68583 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 39.0.0 → 41.0.0

npm:
* http-cache-semantics: 4.1.0 → 4.1.1
  * https://github.com/advisories/GHSA-rc47-6667-2j5j
* ua-parser-js: 1.0.2 → 1.0.34
  * https://github.com/advisories/GHSA-fhg7-m89q-25r3

Change-Id: I1844dc37fc9aed2a3c921b6ae7bf1a0c3e952a18
2023-03-12 01:08:02 +00:00
Dreamy Jazz 62c9c01dde Test ServiceWiring.php
Test ServiceWiring.php using tests copied from CentralAuth. Because
phpunit does not support marking a file as covered, the ServiceWiring
file is ignored for code coverage as the tests should partly cover
the file.

Change-Id: I3ea5ae553d17e17680fcac4d92746fc7ce282eaa
2023-01-25 03:56:06 +00:00
Umherirrender 039e2d2962 Replace deprecated Language::factory
Bug: T325986
Change-Id: Ibeb4af25184dc09a735f4f67457ab72a4139c25d
2022-12-28 20:19:01 +01:00
Umherirrender bb6cb2de0b tests: Replace assertEmpty with assertSame
assertSame avoids use of loose comparisons and
allows to check the expected type

Change-Id: I7220be39f824226f55d966474b58ac12491910a3
2022-11-24 23:03:18 +01:00
Reedy a101ce674c Fix and disable some phpcs exclusions
Change-Id: I2ecaf71c8836d627f20629d667b78ffbf420e4ee
2022-11-12 17:58:13 +00:00
Reedy 5611662f06 Namespace Model
Depends-On: Id28792658de950b99a8786f881563476def59eba
Change-Id: Ib57ea2db947285946f31fa9912b37181044df9d3
2022-11-10 14:25:42 -07:00
thiemowmde cfa424f16b Make use of the ?? and ??= operators where it makes sense
?? is an older PHP 7.0 feature.
??= was added in PHP 7.4, which we can finally use.

Change-Id: If4145c48eb374aa8e5deeb38aecb27c6c8905382
2022-11-09 14:40:52 +01:00
Fomafix 096e4a709f Use short array destructuring instead of list()
Introduced in PHP 7.1. Because it's shorter and looks nice.

Change-Id: I395e791aed6cc99b7ce1273f51c292e29360443a
2022-11-08 16:41:24 +00:00
Reedy c85fe25fe7 Namespace Mapper
Change-Id: I8a02082466ef39db32ffa7562b02db61929346cd
2022-11-04 18:05:34 +00:00
Reedy 0f0c6c4fa6 Namespace Iterator
Change-Id: I87fa703da9e7725370d72c58fc40eb204a309e67
2022-11-02 16:51:39 -06:00
Reedy 3609edf153 Namespace Cache
Change-Id: I8ead3ee485528f08f71c21cf401880bf369dbeac
2022-11-02 16:37:48 -06:00
jenkins-bot f4a68c4c77 Merge "Namespace Controller" 2022-11-02 22:34:13 +00:00
jenkins-bot 32d58a5751 Merge "Clean up test case" 2022-11-02 21:44:48 +00:00
daniel 16425ff5ee Clean up test case
- Don't manipulate $wgHooks directly, use setTemporaryHook.
- Avoid premature access to MediaWikiServices from data providers
- use overrideSettings instead of setMwGlobals

Needed-By: I0ebba9a29f81b0d86ad8fd84d478fb244f9e9c15
Change-Id: I52b9251793a5d559658fcf1e0d20f5a497e5fc43
2022-11-02 21:55:56 +01:00
Reedy d3cc06cc6a Namespace Controller
Change-Id: Ice356e774c153c353eb6ed71b8a02afd1ad1e654
2022-11-02 14:52:29 -06:00
Reedy fb4478454d Namespace Gateway
Change-Id: I7501be6e57cec92b2b4175b8772d213c7fd031d4
2022-11-02 14:52:04 -06:00
Reedy 7619a76877 Namespace Echo Formatters
Change-Id: I5bf398cdb76a577543f6526ac1bee4a73897103d
2022-11-01 21:20:06 -06:00
Reedy 56dfaea949 Convert 9 hooks subscribers to HookHandlers
Bug: T315938
Change-Id: I4d061216da8a492fd0d28518d55e67f92e38ee78
2022-10-31 17:15:17 -06:00
Thiemo Kreuz db79d76d83 Use PHPUnit's shortcuts where it makes sense
Notably: any() is the default anyway. It doesn't really make the
tests more specific or better readable when we repeat it all the
time.

Change-Id: I56d201bfce454587b00015b7208f313dd8ed9624
2022-10-26 11:53:57 +02:00
jenkins-bot 7b68f3328b Merge "Namespace Api classes" 2022-10-15 18:04:20 +00:00
Brian Wolff dbe112dfa8 Tests: More complete mock to prevent php 8.1 warning
fixes:
ContainmentSetTest::testCachedListInnerListIsOnlyCalledOnce
strtr(): Passing null to parameter #1 ($string) of type string is deprecated

Change-Id: I9bb916383eda1176a2d56c06770a60c28431dfda
2022-10-03 11:50:04 -07:00
Reedy 38a9330753 Namespace Api classes
Change-Id: I414234f10c16b8ccaa7ddbaf8e9033e70dfceab8
2022-10-03 00:05:21 +01:00
Umherirrender c81dad3efc Replace deprecated WikiPage::factory/newFromID
Replaced WikiPage::newFromID with newFromTitle,
because a Title object exists and could be reused

Bug: T297688
Change-Id: Ide30f259477ed8e0b48df31f5a23cafeb38d7316
2022-06-03 23:25:37 +02:00
Timo Tijhof 46484e8b53 tests: Use native QUnit.test.each(), ES5, and other cleanups
* Declare variables inline, as per the current code conventions.

* Convert ad-hoc cases objects into native QUnit.test.each().
  This makes for shorter and cleaner code, as well as for more
  detailed test reporting, and removes the need to manually construct
  assertion messages based on test case prefix string etc.

* Start adopting ES5 Array.forEach in a few places where otherwise
  ESLint would complain about variable name clashes.

* Future proof the test module names, by stripping the global variable
  namespace that some classes still use, matching packageFiles convention
  as used for NotificationBadge.js and its tests already, by specifying
  only the bundle name and the exported class name. Note that the
  QUnit UI does fuzzy matching so filtering works the same either
  way, e.g. "echodmfilter" will match "ext.echo.dm - FilterModel".

Change-Id: I49858dd2c95d0869f2cd15693f05c38312a9f710
2022-05-13 19:18:28 +01:00
Timo Tijhof 4c9968c71b tests: Remove use of QUnit 1.x setup()/teardown()
Bug: T250045
Change-Id: I51ff05ca32f08fe29e5edf35bbcb332112228981
2022-05-13 18:23:51 +01:00
Reedy b64c1f3642 Move EchoPush\Api namespace to MediaWiki\Extension\Notifications\Push\Api
Bug: T305667
Change-Id: I6168b386f532c83333cdc6700ba7e2917385a39c
2022-04-25 13:56:16 +01:00
Reedy c76761eff3 Move EchoPush namespace to MediaWiki\Extension\Notifications\Push
Bug: T305667
Change-Id: I5a7846a0fc383bddbf6511d6ba73c8be7d7760c7
2022-04-25 13:56:09 +01:00
Reedy f9c1a0fedb Namespace Hooks class
Change-Id: If948e7d376b40cf29480a9fcbf72a65a0eebacb7
2022-04-25 13:55:41 +01:00
jenkins-bot 047d92d059 Merge "Drop unused zero class" 2022-04-17 22:07:11 +00:00
Umherirrender c650698ac5 Call IDatabase::timestamp before inserting echo_unread_wikis
The default timestamp of 00000000000000 cannot represent as timestamp,
because it gets a negative timestamp -00011130000000

This is needed for proper cross-RDBMS support

This reapply a change from I46206e0b3a687dff3168a81cf0020e669133e876,
reverted with I1c8c409b7820512b3e31246a7f3d8c1cf4db209c.

Bug: T244898
Change-Id: I109b783de0a8d60ccb161b280ce5fa09e145017b
2022-04-11 23:12:02 +00:00
Jon Robson 5350bba546 Drop unused zero class
Not used anywhere.

Change-Id: I848650e4e3497664d712537437d8a10b22d6afb1
2022-04-04 18:20:27 +00:00
Amir Sarabadani ea21714241 Remove mocking of numRows
Deprecated and to be deleted

Bug: T286694
Change-Id: Id678f8366e7a9c18696083b2e331d2dce7d8a8eb
2022-03-15 17:36:29 +00:00
Kosta Harlan 4e125c5095 tests: Remove overlayManager from NotificationBadge params
Doesn't seem to be used anymore

Change-Id: I18f2709f000ca7469432a4c4bb919adfa0b3e829
2022-03-04 15:23:13 +00:00
Timo Tijhof 5a76489be0 tests: Fix QUnit warnings and resolve complex test_NotificationBadge
== Problem 1 ==

As of I09c27a084100b223,  tests/qunit/index.js or equiv was used to
load test files asynchronously from a using() callback. This was
untracked by RL or QUnit, and thus sometimes ended up finishing after
the test runner was already done executing all tests. In CI this
means the tests are sometimes never loaded and the browser (or Node)
process already killed before they even have a chance to arrive.

Prior to QUnit 2.17, this was no way of detecting this. As of
QUnit 2.17 (core upgraded last week) when running tests manually
the following helpful warnings appear in the console:

> [warning] Unexpected test after runEnd.
> [warning] This is unstable and will fail in QUnit 3.0.
> test	@	qunit.js
> tests/qunit/model/test_mw.echo.dm.SeenTimeModel.js
> require

There were about 1072 instances of this warning, all from Echo.

Fix this problem by removing the async callbacks and specifying the
two modules as normal dependencies instead.

== Problem 2 ==

Class NotificationBadge was being loaded in a strange way out of
bound. This was a violation of module boundaries and should not be
needed other than for a temporary hack or other tech debt. More
generally when a test uses `packageFiles` this is a likely sign of
tech debt or misunderstandings.

Instead, depend on `ext.echo.mobile` and export/import the class
as normal.

After this, the test module can use `scripts` instead.

== Problem 3 ==

The `ext.echo.mobile` uses a Mustache template which the test
was also duplicating a reference to. This is no longer needed now.

Due to the `qunit/index.js` file carefully splitting the operations
between template assignment and file loading, I wondered whether
it was meaning to replace or mock it with something else, but it
simply refers to the same file and only does this because it wasn't
using the module directly. This is now resolved.

If you do need to mock in the future, this can simply be done
by assigning `NotificationBadge.prototype.template` from a
beforeEach() callback in the test suite, or by supporting it
property as a constructor option in NotificationBadge.js and
assigning `this.template` there, which is supported by the
mobile `View` class already it seems and would follow DI patterns
more effectively.

== Problem 4 ==

Most of the Echo tests were ignored sometimes and executed other
times.

The test for `ext.echo.mobile` in particular though was never
executed in CI specifically because:

> Undefined module: 'mobile.startup'

This became a hard error with this patch, which is fixed by
the CI config change with Ie9dabe3269c56fa76db8e51.

Bug: T299780
Change-Id: Ie4a87f3b8085fd6ae53ec586c1782cc266d5288a
2022-03-02 12:52:06 +00:00
Umherirrender 6af1473ca6 Replace deprecated wfReadOnly()
Bug: T283978
Change-Id: I5c796a0473599c71848b6079874bc7a969ee6f88
2022-02-11 23:39:06 +01:00
Umherirrender ffeee975a4 Replace deprecated User::newFromIdentity with UserFactory
Moved the factory deeper into the code right before the one usage it
still needed a full user object

Narrow done method arguments from User to UserIdentity
and use the identity directly

Change-Id: Ic118f23ef504c7fda892480df61ea68c10915f78
2022-02-11 20:35:49 +00:00
Ed Sanders ba38b57c83 eslint: Lint Gruntile.js using server rules
Change-Id: Ic7d67098492558fdd6cec292afd22aaf8693a594
2022-02-07 16:30:24 +00:00
osamaahmed17 020b44c43a selenium: Delete invisible unicode characters
Bug: T300386
Change-Id: I7c5db54247dc5b4566996afcbfab70b5fd4696a8
2022-01-31 09:02:09 +00:00
Umherirrender 9bf6ceb738 Replace deprecated JobQueueGroup::singleton()
Change-Id: I298d8507f4ec706c235087b726b7b230ed5e9ac6
2022-01-25 22:24:53 +01:00
jenkins-bot a8af58f362 Merge "Parse section titles in notifs as if they weren't at the start of line" 2022-01-24 05:43:44 +00:00
jenkins-bot ceda28121f Merge "Adjust doc for EchoNotification::readTimestamp" 2022-01-21 08:11:26 +00:00
Bartosz Dziewoński 3493317d79 Parse section titles in notifs as if they weren't at the start of line
The section titles are wikitext extracted from inside heading markup
like `== … ==`, so start-of-line markup like `*` should not be parsed.

Bug: T299572
Change-Id: Ie3995b943e5fe20ad86041d6be755f14f32eb01e
2022-01-21 00:07:53 +01:00
Alexander Vorwerk 4c7726a9ec selenium: reenable skipping of flaky test
Bug: T299339
Change-Id: I4d0838bdd6f1d0e1e220d1d611ae3e6e5c2b80eb
2022-01-17 16:26:35 +01:00
Kosta Harlan e4803b42e3 selenium: Add missing await statements
Follows-Up: 8327d33c99e495b109d97df7b525181dfc41c18d
Bug: T293073
Change-Id: Ib1862b857955999dbe7085a247e215e31eb89cff
2022-01-17 18:05:59 +05:00
Kosta Harlan 73496ec386 selenium: Skip flaky test
Bug: T299339
Change-Id: I6ff5d9d0e90b447112f5efea1489030238b52fac
2022-01-17 13:21:35 +01:00
osamaahmed17 9903581028 selenium: Refactor Echo WebdriverIO tests from sync to async mode
WebdriverIO has dropped support of sync mode due to breaking changes in Chromium, hence all tests of Echo have been changed to async.

Bug: T293073
Change-Id: I8327d33c99e495b109d97df7b525181dfc41c18d
2022-01-17 04:32:20 +05:00
Umherirrender 8e974de839 Adjust doc for EchoNotification::readTimestamp
And simplify the null check
Fix tests to provide null and not the empty string

Change-Id: Ic0f2dc09525f1542c7e62da97ac0f3fe936ff67e
2022-01-05 20:29:03 +01:00
Umherirrender d4640b31f0 build: Update eslint-config-wikimedia to 0.21.0
This includes the update of lockFile version

Bug: T225730
Change-Id: I04f2c6ef8751b3ffff886da4b69c2ed80425de91
2021-12-21 23:08:09 +01:00
vladshapik a3c55f6272 Avoid using User::getOption() method
Replace User::getOption() with UserOptionsLookup::getOption() since this method will be hard-deprecated.

Bug: T296083
Change-Id: I0ecdc63b0344bc4c24196cc5edb3d02b6a7ed615
2021-12-10 13:37:45 +01:00
libraryupgrader 2c3d370846 build: Updating mediawiki/mediawiki-codesniffer to 38.0.0
Change-Id: I10e9f9f6ddd9539ff95636902219c0e9fa35fc0f
2021-10-24 02:46:52 +00:00
Alexander Vorwerk 449f82faa3 MediaWikiTestCase -> MediaWikiIntegrationTestCase
MediaWikiTestCase has been renamed to MediaWikiIntegrationTestCase in 1.34.

Bug: T293043
Change-Id: I68efac2c458748fa3ab16c4c652bd2c4af9cbb75
2021-10-12 00:42:10 +02:00
Matěj Suchánek 628122e155 Fix camelCase of getUserEnabledEventsBySections
Change-Id: I14b6750f7f3cc5334e3143f0e85ca033681b4e35
2021-08-20 17:03:28 +00:00
jenkins-bot 5cfc33d546 Merge "Add notifiertypes parameter to ApiEchoNotifications" 2021-08-19 05:06:57 +00:00
Matěj Suchánek 199c9084d4 Move isBundleExpandable to EchoAttributeManager
It's an attribute, so it is definitely the manager's
responsibility. Unit test case included.
(EchoDataOutputFormatter really calls for becoming a service.)

Change-Id: If2658dd8c107246158cd93cbb233d8af62fd4424
2021-08-18 18:23:22 -07:00
Michael Holloway 5eb4c6cd1d Add notifiertypes parameter to ApiEchoNotifications
Previously, ApiEchoNotifications returned only events which were
enabled for the `web` notifier type. With this change, the notifier
type or types to consider can be specified by argument to the new
`notifiertypes` parameter.

This change is required so that the apps can request notification
content from the API for push notifications.

Bug: T287909
Change-Id: I2d1155e113f2defb0f02416a7a659c3ee162d3a6
2021-08-17 10:27:14 -04:00
Matěj Suchánek ab8ea040ca Use constant in EchoAttributeManager::getNotificationSection
And as a bonus, add a unit test case to solve the todo.

Change-Id: Ic2e13eae6583155230be6c184db4836f28378483
2021-08-11 11:27:55 +02:00
jenkins-bot 66bb02fd8b Merge "Disable EchoGetEventsForRevision hook handlers while running tests" 2021-08-04 17:42:25 +00:00
jenkins-bot ec9ea8fc81 Merge "Tweaks to EchoTalkPageFunctionalTest" 2021-08-04 16:47:55 +00:00
jenkins-bot 5566f84378 Merge "Turn push notification token list into a circular buffer." 2021-07-30 14:46:10 +00:00
Dmitry Brant 6c5a88107c Turn push notification token list into a circular buffer.
At the moment we support a maximum of 10 tokens per user for subscribing
to push notifications, stored as a basic list that runs out when the
limit is reached.  There may, however, be some edge cases where an app
registers a token and then forgets to unregister it (and repeats this 10
times), after which time it will be unable to register any new token.

This changes the token list to behave more like a circular buffer, by
simply deleting the oldest token before inserting the new one. This way
an app could register a new token even in the rare case of forgetting
the previous ten.

Change-Id: I387de63460882e4e56d1aa6db1f78d73a0495208
2021-07-29 17:22:57 -04:00
Bartosz Dziewoński ee860bc577 Disable EchoGetEventsForRevision hook handlers while running tests
Extensions using this hook (e.g. DiscussionTools) cause test failures
otherwise.

Change-Id: I21159d03eebaf46ad94f4273ba698a59b8019185
2021-07-26 13:56:44 +02:00
libraryupgrader 17a644263a build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0
  The following sniffs are failing and were disabled:
  * PSR12.Functions.ReturnTypeDeclaration.SpaceBeforeReturnType

npm:
* svgo: 2.3.0 → 2.3.1
  * https://npmjs.com/advisories/1754 (CVE-2021-33587)
* postcss: 7.0.35 → 7.0.36
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* trim-newlines: 3.0.0 → 3.0.1
  * https://npmjs.com/advisories/1753 (CVE-2021-33623)

Change-Id: Id866782d39ac02a329bd79539f2d52392fffd296
2021-07-24 01:48:06 +00:00
Bartosz Dziewoński 762a2e192a Tweaks to EchoTalkPageFunctionalTest
* Fix off-by-one counting
* Fix asserting properties on the wrong event (first one instead of
  last one), luckily they are identical

Change-Id: Ib1a02476554b29b2a1d0bfdfa89859d71d7691b1
2021-07-21 23:25:54 +02:00
jenkins-bot a6dbadb006 Merge "Avoid using User::setOption()" 2021-07-17 10:29:45 +00:00
ZabeMath 3befbe0a69 Avoid using User::setOption()
User::setOption() is deprecated and should be replaced with UserOptionsManager::setOption()

Bug: T277818
Change-Id: I001301fb95635c421a0bbb921fd909c5312dc896
2021-07-17 09:52:53 +00:00
DannyS712 0099c45e54 AttributeManager: accept UserIdentity objects
Inject a UserOptionsLookup to replace deprecated
User::getOption()

Change-Id: I177f6d3486f987073e5d745077f0abfe9ae85aca
2021-06-29 06:41:47 +00:00
DannyS712 68f7a9a985 Use WikiPage::doUserEditContent() instead of ::doEditContent()
::doUserEditContent() is available since 1.36 as a replacement
for ::doEditContent(), which has been deprecated. Extension
already requires MediaWiki 1.37+, so the method is always
available.

Bug: T255507
Change-Id: Iee5de356dbccd453a3083e0a58859b4cd83a946b
2021-06-24 05:30:07 +00:00
jenkins-bot 73c124c498 Merge "selenium: Update wdio-mediawiki" 2021-05-26 15:07:07 +00:00
Željko Filipin b6a9950642 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
Bug: T276503
Change-Id: Ic80f90dbbd5604dc3c9afe3303862edbf46b1cd2
2021-05-26 13:36:53 +00:00
jenkins-bot c9839d897b Merge "selenium: Update README.md file" 2021-05-26 10:01:08 +00:00
anjali041 0001ee4dc3 selenium: Update README.md file
Bug: T282237
Change-Id: I87018d39e9a9d6fb101ad5e1f7c4f13f8200611e
2021-05-25 16:03:45 +00:00
Umherirrender 9ccc7af208 Remove PHP 5.3 $this closure workaround
Change-Id: I84024efc7bb27292bcfb7dd5c586b094828c5d0a
2021-05-15 01:58:55 +02:00
James D. Forrester 4dd2a651e1 phpcs: Auto-fix MediaWiki.Usage.StaticClosure.StaticClosure
Change-Id: I6a02902ffaa8a9b497d60b573a0b8e3dbc207ee5
2021-05-04 09:06:42 -07:00
libraryupgrader b3f948c59c 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: I4b2fb7f46b6c0a5c33a6ad25f085de8ae13eb084
2021-05-04 09:05:15 -07:00
Željko Filipin 5d49c02f9f selenium: Add JUnit reporter
JUnit reporter is required to create the XML file that Jenkins uses to
create Test Result Trend chart for selenium-daily-beta-Echo
job.

Bug: T214686
Change-Id: I2dd3787ebfb20f6fee841d264de98bcd1da4b34e
2021-04-29 15:39:36 +02:00
jenkins-bot f43699503b Merge "Use ApiTestBase::doRequestWithToken" 2021-04-29 12:26:18 +00:00
Petr Pchelko 4750dbe3de Use ApiTestBase::doRequestWithToken
The old ApiTestCase::getTokenList relied on CSRF
token API deprecated in 1.26. Many years have passed,
it's time to swtich to new mechanisms.

Needed-By: I58aedec6942ac5d3c21574cb0072f00ef365098c
Change-Id: Iafe7a48eb0cdf8c2f1ec7fdee232c3f394fa15a3
2021-04-20 13:53:16 -07:00
Željko Filipin 64f1486d67 selenium: Delete tests disabled for more than 1 year
The entire mention.js file was disabled by Kosta Harlan
2 years ago in efd7594.

Bug: T280652
Change-Id: Id2c0bc8e73a58738d422df2abd9c9157f426ab15
2021-04-20 13:25:22 +00:00
jenkins-bot cd663b0fac Merge "TalkPageFunctionalTest: Only count our own events" 2021-03-09 09:01:34 +00:00
jenkins-bot 29cd094a6c Merge "Do not directly construct UserrightsPage in tests" 2021-03-05 10:11:57 +00:00
Petr Pchelko f4ea1fd8d7 Do not directly construct UserrightsPage in tests
Directly constructing SpecialPages is bad, they're not @newable
and core can change constructor signatures without deprecation
and break the tests.

Change-Id: Ifc82d29a00d3fd136c44e0699e6bbfa11b8cf2a6
2021-03-04 15:17:11 -07:00
Bartosz Dziewoński 7dbc4f6ce8 TalkPageFunctionalTest: Only count our own events
We're working on code in DiscussionTools that generates Echo events for
adding talk page comments (I7e0996843cdd70141e19d5c7ce66122204efa1b7),
and it was causing this test to fail.

Change-Id: I3099473a3113962911b9c77ede290142857a51b2
2021-03-04 16:29:57 +00:00
Jeena Huneidi 008ad5afe1 Remove deprecated User method getGroups
Replaces the deprecated user method getGroups with
UserGroupManager->getUserGroups.

Bug: T275148
Change-Id: Ie6215886c911382008b667e8e5b3298facfcd6a2
2021-02-26 21:47:58 -08:00
Jeena Huneidi 596729d852 Make AttributeManager a service
Adds AttributeManager to EchoServices so that dependencies of
AttributeManager can be injected.

Bug: T275148
Change-Id: I4fa5084d72914d16b6d218e7dd3521f5a1919b80
2021-02-26 12:58:23 -08:00
jenkins-bot fd61cf3082 Merge "Replace use of newMutableRevisionFromArray within new MutableRevisionRecord" 2021-02-03 22:52:56 +00:00
jenkins-bot a517f9ed2a Merge "Use monitored getTestUser() in tests if possible" 2021-02-03 14:37:30 +00:00
Peter Ovchyn f352b3406c Replace use of newMutableRevisionFromArray within new MutableRevisionRecord
Bug: T272560
Change-Id: I171537c3346a7dd4aeb4fc612d7dd9fba5d64679
2021-02-02 22:42:06 +02:00