diff --git a/core/modules/system/tests/modules/submit_form_test/src/Controller/LinksController.php b/core/modules/system/tests/modules/submit_form_test/src/Controller/LinksController.php index 8991bd8..e4f085f 100644 --- a/core/modules/system/tests/modules/submit_form_test/src/Controller/LinksController.php +++ b/core/modules/system/tests/modules/submit_form_test/src/Controller/LinksController.php @@ -9,7 +9,7 @@ class LinksController { /** - * Displays test links that will open in offcanvas tray. + * Displays test links that will open in ajax modal dialog tray. * * @return array * Render array with links. @@ -29,7 +29,6 @@ public function linksDisplay() { 'core/drupal.ajax', ], ], - ], ]; } diff --git a/core/modules/system/tests/src/FunctionalJavascript/DialogSubmitFormTest.php b/core/modules/system/tests/src/FunctionalJavascript/DialogSubmitFormTest.php index b2bf052..f599f11 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/DialogSubmitFormTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/DialogSubmitFormTest.php @@ -38,7 +38,7 @@ public function testFormSubmit() { // Load the form in modal and then submit it. $this->drupalGet('submitter-form-test-link'); $page->clickLink('Click Me 1!'); - $this->waitForElement('.ui-dialog'); + $web_assert->assertWaitOnAjaxRequest(); $web_assert->elementExists('css', '.ui-dialog'); $dialog = $page->find('css', '.ui-dialog'); $dialog->fillField('msg', 'the end of the other sentence.'); @@ -54,18 +54,4 @@ public function testFormSubmit() { * $this->submitForm(['msg' => 'the end of the other sentence.'], 'Submit'); */ } - - /** - * Waits for an element to appear on the page. - * - * @param string $selector - * CSS selector. - * @param int $timeout - * (optional) Timeout in milliseconds, defaults to 1000. - */ - protected function waitForElement($selector, $timeout = 1000) { - $condition = "(jQuery('$selector').length > 0)"; - $this->assertJsCondition($condition, $timeout); - } - }