aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/changes
diff options
context:
space:
mode:
authorFomafix <fomafix@googlemail.com>2019-02-13 14:26:19 +0100
committerJdlrobson <jrobson@wikimedia.org>2023-07-13 23:12:45 +0000
commit9bf98ab9dbdd50eca76dff92a5f896e49e97e687 (patch)
tree7d21afe5e29eb4e920cab67da9324ba139fa8c6f /tests/phpunit/includes/changes
parent28ffdd414697673202c1723d8eb3af9a97f41615 (diff)
downloadmediawikicore-9bf98ab9dbdd50eca76dff92a5f896e49e97e687.tar.gz
mediawikicore-9bf98ab9dbdd50eca76dff92a5f896e49e97e687.zip
EnhancedChangesList: Use HTML/CSS for collapsing
The collapsing on the enhanced changes list now works without JavaScript. Keyboard navigation is still supported but only the space and not the return toggles the collapsing toggle button. The <input type="checkbox"> element needs an unique identifier in the `id` attribute and the same value must be in the `for` attribute of the <label> element. A simple counter in the class EnhancedChangesList starts twice from the beginning if the recent changes get included as: {{Special:RecentChanges|enhanced=1}} {{Special:RecentChanges|enhanced=1}} Therefore a random value is used as checkbox identifier. The module 'jquery.makeCollapsible' and its classes `mw-collapsible`, `mw-collapsed` and `mw-collapsible-toggle-collapsed` are not needed anymore. The icons from module 'mediawiki.icon' are directly included because the module has fixed selectors which do not fit here. Bug: T172618 Change-Id: Iafd27e5d760b78ae386d833946005f86cee8dd64
Diffstat (limited to 'tests/phpunit/includes/changes')
-rw-r--r--tests/phpunit/includes/changes/EnhancedChangesListTest.php15
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/phpunit/includes/changes/EnhancedChangesListTest.php b/tests/phpunit/includes/changes/EnhancedChangesListTest.php
index 2f77604f6426..c70e0d92cc25 100644
--- a/tests/phpunit/includes/changes/EnhancedChangesListTest.php
+++ b/tests/phpunit/includes/changes/EnhancedChangesListTest.php
@@ -28,12 +28,6 @@ class EnhancedChangesListTest extends MediaWikiLangTestCase {
$styleModules = $enhancedChangesList->getOutput()->getModuleStyles();
$this->assertContains(
- 'mediawiki.icon',
- $styleModules,
- 'has mediawiki.icon'
- );
-
- $this->assertContains(
'mediawiki.special.changeslist',
$styleModules,
'has mediawiki.special.changeslist'
@@ -46,15 +40,6 @@ class EnhancedChangesListTest extends MediaWikiLangTestCase {
);
}
- public function testBeginRecentChangesList_jsModules() {
- $enhancedChangesList = $this->newEnhancedChangesList();
- $enhancedChangesList->beginRecentChangesList();
-
- $modules = $enhancedChangesList->getOutput()->getModules();
-
- $this->assertContains( 'jquery.makeCollapsible', $modules, 'has jquery.makeCollapsible' );
- }
-
public function testBeginRecentChangesList_html() {
$enhancedChangesList = $this->newEnhancedChangesList();
$html = $enhancedChangesList->beginRecentChangesList();