diff -u b/core/modules/system/tests/modules/dialog_test/js/dialog.debug.js b/core/modules/system/tests/modules/dialog_test/js/dialog.debug.js --- b/core/modules/system/tests/modules/dialog_test/js/dialog.debug.js +++ b/core/modules/system/tests/modules/dialog_test/js/dialog.debug.js @@ -3,7 +3,7 @@ * Testing behavior for JSWebAssertTest. */ -(function ($, Drupal, drupalSettings) { +(function ($, Drupal) { 'use strict'; @@ -12,7 +12,7 @@ }; // Register the dialog opened by listening to the dialogContentResize event. - $('#drupal-modal').on('dialogContentResize', function (event) { + $('#drupal-modal').on('dialogContentResize', function () { Drupal.dialog_debug.has_open_dialog = true; }); // Register the beforecreate and afterclose to indicate the dialog has been closed. diff -u b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php --- b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php @@ -62,17 +62,17 @@ // Assert the existence of the new filter group by checking the remove group // link. - $remove_link = $assert_session->waitForElementVisible('named_exact', array( + $remove_link = $assert_session->waitForElementVisible('named_exact', [ 'link', - 'Remove group' - )); + 'Remove group', + ]); $this->assertTrue($remove_link->isVisible(), 'New group found.'); // Remove the group again and assert the group is not present anymore. $remove_link->click(); - $result = $page->waitFor(10, function() use($page) { + $result = $page->waitFor(10, function () use ($page) { $remove_link = $page->findLink('Remove group'); return empty($remove_link); }); @@ -86,2 +86,3 @@ } + } diff -u b/core/tests/Drupal/FunctionalTests/AssertDialogTrait.php b/core/tests/Drupal/FunctionalTests/AssertDialogTrait.php --- b/core/tests/Drupal/FunctionalTests/AssertDialogTrait.php +++ b/core/tests/Drupal/FunctionalTests/AssertDialogTrait.php @@ -14,8 +14,7 @@ * (Optional) Timeout in milliseconds, defaults to 10000. */ protected function waitForDialog($timeout = 10000) { - $this->assertTrue(in_array('dialog_test', self::$modules), 'The dialog_test module is required for this assertion.'); - + $this->assertArrayHasKey('dialog_test', self::$modules, 'The dialog_test module is required for this assertion.'); $condition = 'Drupal.dialog_debug.has_open_dialog == true'; $this->getSession()->wait($timeout, $condition); }