function MessageCommandTest::waitForMessageVisible
Same name in other branches
- 8.9.x core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php \Drupal\FunctionalJavascriptTests\Ajax\MessageCommandTest::waitForMessageVisible()
- 10 core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php \Drupal\FunctionalJavascriptTests\Ajax\MessageCommandTest::waitForMessageVisible()
- 11.x core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php \Drupal\FunctionalJavascriptTests\Ajax\MessageCommandTest::waitForMessageVisible()
Asserts that a message of the expected type appears.
Parameters
string $message: The expected message.
string $selector: The selector for the element in which to check for the expected message.
string $type: The expected type.
1 call to MessageCommandTest::waitForMessageVisible()
- MessageCommandTest::testMessageCommand in core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ MessageCommandTest.php - Tests AJAX MessageCommand use in a form.
File
-
core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ MessageCommandTest.php, line 180
Class
- MessageCommandTest
- Tests adding messages via AJAX command.
Namespace
Drupal\FunctionalJavascriptTests\AjaxCode
protected function waitForMessageVisible($message, $selector = '[data-drupal-messages]', $type = 'status') {
$this->assertNotEmpty($this->assertSession()
->waitForElementVisible('css', $selector . ' .messages--' . $type . ':contains("' . $message . '")'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.