In detail:
* Use more compact syntax to avoid a bit of code duplication.
* Use createMock() shortcut in tests.
* Avoid hiding code in strings.
* Remove a comment that literally repeats what the code says.
Change-Id: Ibedef380489451268e2e87f0864164e8f9737913
No longer supported upstream. Was kept compatible via monkey-patch
in MW core testrunner.js. While at it, also:
* Convert one file from an ad-hoc closure to using the QUnit.module()
scop, as per <https://api.qunitjs.com/QUnit/module/>.
* Use inline variable declarations per current code conventions.
* Remove needless duplication and description from hardcoded
assertion message.
Bug: T250045
Change-Id: If556b338c6151108aeebd241b828ccb420c8b857
* Don't require a jQuery element with a specific attribute
to record thanks. Instead pass in the thanked ID directly.
* In Flow, don't override the cookieName static property,
instead pass it in as an argument.
Change the static property (effectively a global) prevents
us from having multiple types of thanks on the same page.
Change-Id: Ia569f8636f070f2af69f89d7da66c9a6f9821d24
The global function wfWikiID() is deprecated since 1.35 and it's usages
should be replaced with WikiMap::getCurrentWikiId().
Bug: T298059
Change-Id: I0cb8e96b7e988aa1d6dce0cb3cddf65fc627b214
WikiPage::factory() is deprecated since 1.36 and should be replaced
with WikiPageFactory::newFromTitle().
Bug: T297688
Change-Id: I8a141512c51b5f7901ce1af36062f9b1ae64ef7b
- Add hook to enable blocking thanks
- Check if user is blocked from 'thanks' action
and disable giving thanks from API and UI if so
Bug: T242785
Change-Id: I290a7c39c6fcb22a8ab4a9ecbad76a239cb18ea0
Reword ApiCoreThankIntegrationTest::testLogThanksForADeletedLogEntry
to avoid needing to use it
Also remove one use of doLogin(), remaining will be removed separately
Bug: T243874
Bug: T244039
Change-Id: I6cf26839cb4e3042408fb6b059fb877b605763e8
Only prohibit users from using Thanks if they are blocked from the
associated page. This allows partially blocked users to use thanks
most of the time.
It also allows blocked users to thank on their own talk page, if
they are allowed to edit it, even if they are sitewide blocked.
Bug: T221371
Change-Id: Ic99ec38ea200e806963951b2dd67e56ecde63752
Added two new tests: thanked cookie and gets user gender. First uses jQuery cookies and second uses Sinon fake server
Bug: T160267
Change-Id: I8f5dad9c90e930d557e86acb4b175ec549849e7a
Instead use mediawiki.ui and ResourceLoaderImageModule
Other changes:
* Add gender support to thanks-button-thanked
Depends-On: I0745e112d11026ed59d8daca990b313305cd094a
Bug: T198151
Change-Id: I82ae596330aff8387653c65a6bab5ff729641a80