Unverified Commit 753eef8a authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #2978498 by Cottser, Kingdutch: Using the module filter on the module...

Issue #2978498 by Cottser, Kingdutch: Using the module filter on the module list page a module can only be found by system name if the description ends in a dot
parent 982b97a4
Loading
Loading
Loading
Loading
+3 −2
Changes for core/modules/system/js/system.modules.js: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -44,9 +44,10 @@
            '.table-filter-text-source, .module-name, .module-description',
          );
          let sourcesConcat = '';
          // Concatenate the textContent of the elements in the row.
          // Concatenate the textContent of the elements in the row, with a
          // space in between.
          sources.forEach((item) => {
            sourcesConcat += item.textContent;
            sourcesConcat += ` ${item.textContent}`;
          });
          const textMatch = sourcesConcat.search(re) !== -1;
          $(row).closest('tr').toggle(textMatch);
+8 −0
Changes for core/modules/system/tests/src/FunctionalJavascript/ModuleFilterTest.php: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -68,6 +68,14 @@ public function testModuleFilter() {
    $expected_message = '1 module is available in the modified list.';
    $assertSession->elementTextContains('css', '#drupal-live-announce', $expected_message);

    // Test filtering by a machine name, when the module description doesn't end
    // with a period or other separator. This condition is common for test
    // modules.
    $filter->setValue('comment_base_field_test');
    $session->wait(1000, 'jQuery("#module-node:visible").length == 0');
    $visible_rows = $this->filterVisibleElements($module_rows);
    self::assertEquals(1, count($visible_rows));

    // Test Drupal.announce() message when no matches are expected.
    $filter->setValue('Pan-Galactic Gargle Blaster');
    $session->wait(1000, 'jQuery("#module-node:visible").length == 0');