mediawiki-extensions-Visual.../modules/ve-mw/tests/ui
Thiemo Kreuz 22757fa901 Fix and test page name splitting code in template dialog
In JavaScript .split() behaves different, compared to PHP. In
PHP the last element contains the rest of the string. In
JavaScript the rest of the string is discarded. The limit acts
as if the array is truncated. That's why we can reduce the
number in

  'foo/bar'.split( '/', 1 )[ 0 ]

to 1, as we are only interested in the element "foo".

The same code in the other class is currently not covered by a
test. But changing it accordingly should be obviously fine now.

Change-Id: I20c27d480ddb1799df9eb1e5bc119b724e80653d
2021-09-11 17:40:39 +00:00
..
actions Update more test code to use ES6 syntax 2021-04-30 10:08:45 +00:00
datatransferhandlers Update more test code to use ES6 syntax 2021-04-30 10:08:45 +00:00
inspectors Update more test code to use ES6 syntax 2021-04-30 10:08:45 +00:00
pages Don't allow users to add parameters that contain forbidden chars 2021-09-09 11:43:49 +02:00
widgets Fix and test page name splitting code in template dialog 2021-09-11 17:40:39 +00:00
ve.ui.DiffElement.test.js Update more test code to use ES6 syntax 2021-04-30 10:08:45 +00:00