Commit graph

16 commits

Author SHA1 Message Date
Ed Sanders
9fe2995989 build: Update eslint-config-wikimedia to 0.21.0
* Replace `substr`/`substring` with `slice`. The second argument
  to `substring` is length, not end index as in `substr`/`slice`,
  so convert where necessary.
* Replace `new Date().getTime()` with `Date.now()`
* Documentation fixes
* Replace `throw Error` with `throw new Error`

Change-Id: I532500ea4c99d8ebec01efb21273c8df21626e59
2021-11-09 21:08:55 +00:00
James D. Forrester
c2b52ea1fb api-testing: Adjust DiffCompare expected outcome to cope with new wikidiff2 output
The library now adds 'diff-side-added' and 'diff-side-deleted'.

Bug: T292676
Depends-On: If4bc60c35403799de4e330103d8aaa6f039d96fe
Change-Id: Id92aee4029f008402d9d331876c81fe2263580a7
2021-10-06 22:30:15 +00:00
Fomafix
213d45e5dd Make first char of username in ApiQueryAllUsers case-insensitive
This change uses $contentLanguage->ucfirst( $name ) to get the
canonical username like this is done in UserNameUtils::getCanonical().
This makes the first character case-insensitive. The toUpperCase() in
JavaScript is not needed anymore.

toUpperCase() in JavaScript and $contentLanguage->ucfirst() in PHP
differ on some characters:
* JavaScript: "ß".toUpperCase() // "SS"
* PHP: $contentLanguage->ucfirst( "ß" ) // "ß"

Bug: T291339
Change-Id: Id9afb2dd0212e4b871bb6a7a9d8762e1bcb81d6a
2021-09-21 06:21:21 +00:00
daniel
d55f361a5b Add more end-to-end tests related to page protection
This covers:
* cascading protection
* unprotecting a page

Bug: T218395
Change-Id: I7639930e379256f720f864c758b1735a0cfa04c9
2021-08-28 17:59:29 +02:00
daniel
23aa8db51f Improve structure of e2e tests for page protection.
This does not change any tests, it just adds nested "describes"
structures and improves descriptions.

Change-Id: I3b5628405b97e784b05337ea22b9878dc63ab26d
2021-08-28 17:52:57 +02:00
TChin
eac9174eb3 Added integration tests for ApiQueryExternalLinks
Bug: T286498
Change-Id: Ie97a517968a498de5b2d282a9e30027c2462d450
2021-07-16 16:30:21 -04:00
Kosta Harlan
9445358f6e Avoid Promise.all when creating users to prevent deadlock
See also I884ca6e15a1

Bug: T199393
Change-Id: I3d0a8c3896e7879bc48e251beb26b41a328b71d0
2021-01-05 14:13:07 +00:00
daniel
36127ffd9d ApiOptions: log when userjs-* option changes
Bug: T259073
Change-Id: I99b9f224d3c0c21ef22a0ffa98ad2f72bf300943
2020-09-15 16:50:03 +02:00
Nikki Nikkhoui
764fd295c4 ActionAPI Tag end to end test
Create initial test for action api action=tag
end to end test.

Bug: T256826
Change-Id: I7b4f43112534efd7258cf1368d198fbe4bdef7d8
2020-07-14 13:16:52 -07:00
Ed Sanders
08510de602 api-testing: Use wikimedia/mocha eslint config
Change-Id: Iec346d87f252c66fbff1e0fa522d7440df6f1764
2020-06-18 19:20:33 +01:00
Clara Andrew-Wani
daf10105a8 Move final batch of tests from api-testing to core
Moving tests that were added to api-testing repo after the initial
move to core.

Tests are from:
* Ifdfc56a80e70f169fa857af4123041723463cf90
* I55f9b23805f4c10449a508633f36c0bb75b06717
* I04db44c89a7b0bcb6dabb2ab9d9d96d495d98e82
* I3b74a9fb2f318158a72856599db837f63426ae4d

Change-Id: I83fc653f1a2f44cc12a5452cd659e809e6332b37
2020-06-05 11:28:52 -04:00
Ed Sanders
8b720e9bd6 eslint: Update to eslint-config-wikimedia 0.16.0
* valid-jsdoc replaced with jsdoc plugin
* New /selenium config

Change-Id: I471eebac0312cb25c539c3f6a3ecfc7cfd4ed8d6
2020-06-02 21:32:56 +01:00
Ed Sanders
d94f90e088 eslint: Code style fixes for upcoming config change
Change-Id: Ief44c0bb26c5a1c1773cab5dba51d5e856612bf7
2020-05-14 22:19:55 +01:00
Clara Andrew-Wani
aa0ad28c4f Move Search and Watchlist tests from api-testing repo into Core
Bug: T236680
Change-Id: Id1e37791576d27e5e7007387e91270392e7d5904
2020-02-06 00:55:53 +00:00
Clara Andrew-Wani
f07d7ba699 Move tests from api-testing repo into Core
Except for Search & Watchlist, which need fixes in gated extensions first.

Change-Id: I88d24dda4bc047868de3ff9dd4a5753b9c7b0f64
2020-02-05 16:07:54 -08:00
Clara Andrew-Wani
ac4dec907b Add API-testing to core
Bug: T236680
Depends-On: I0110de1539e4d6d9d6a58d1a645c1a1c02d8127f
Change-Id: I827dc895719cc68738ebb425f8471ac38caa49aa
2019-12-19 13:20:12 -05:00