protected function MessageCommandTest::waitForMessageVisible in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php \Drupal\FunctionalJavascriptTests\Ajax\MessageCommandTest::waitForMessageVisible()
- 9 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 . '")'));
}