Anonymous editing with temp account creates a new account (temporary),
so the anonymous token are not valid anymore.
This sets a clear state for each test scenario.
Bug: T365647
Change-Id: I41c6d98a107830f7b9dcc90b91cff0a776767195
Anonymous users (temp accounts) have auto-generated usernames.
This change prevents the assertion test of the username for temporary
accounts, while it still tests everything else in the change record.
Bug: T365647
Change-Id: I406340cd54421ef48fa96da76d58cf3b0b8b77e1
According to the dictionary, "per" (or more conventionally "as per")
means "according to". Refer OED "per" sense II.3.a. For example:
"No value was passed, so return null, as per default".
In this sentence, we are not specifying the default, we are referring
to the default. This correct usage of "per default" was used nowhere
in MediaWiki core as far as I can see.
Instead we have "per default" being used to mean "by default", that is,
giving the value to use when no explicit value was specified.
In OED, the phrase "by default" is blessed with its own section just
for computing usage:
"P.1.e. Computing. As an option or setting adopted automatically by a
computer program whenever an alternative is not specified by the user
or programmer. Cf. sense I.7a."
There are highly similar pre-computing usages of the same phrase,
whereas the phrase "per default" is not mentioned.
As a matter of style, I think "per default" should not be used even
when it is strictly correct, since the common incorrect usage makes it
ambiguous and misleading.
Change-Id: Ibcccc65ead864d082677b472b34ff32ff41c60ae
Mostly this has a bunch of whitespace changes from the
template-curly-spacing and brace-style rules being set
to align with other spacing rules.
Change-Id: I4609c52a4ef426ad1f35fb4bfe447bb08323a8e8
Vector 2022 does not render a table of contents. Allow matching a TOC
placeholder as well as the real TOC.
Change-Id: Ib473bf811709e1d71513a906a0c2928f1727ca05
This reverts commit 0d41717c4b.
Reason for revert: the test fails when using Apache in CI instead
of the php built-in webserver.
Bug: T298514
Change-Id: Id47b469eb2698a80167665bba0b66a0b5d9308cd
The assertion made in the second it() statement depends on what happens
in the previous one, so combine these into a single test.
Bug: T298735
Change-Id: I120971bf747797de18ab0fdf71c16b7f520488a5
* 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
The library now adds 'diff-side-added' and 'diff-side-deleted'.
Bug: T292676
Depends-On: If4bc60c35403799de4e330103d8aaa6f039d96fe
Change-Id: Id92aee4029f008402d9d331876c81fe2263580a7
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
This does not change any tests, it just adds nested "describes"
structures and improves descriptions.
Change-Id: I3b5628405b97e784b05337ea22b9878dc63ab26d
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