function MessageCommandTest::waitForMessageRemoved
Same name in other branches
- 9 core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php \Drupal\FunctionalJavascriptTests\Ajax\MessageCommandTest::waitForMessageRemoved()
- 8.9.x core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php \Drupal\FunctionalJavascriptTests\Ajax\MessageCommandTest::waitForMessageRemoved()
- 11.x core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php \Drupal\FunctionalJavascriptTests\Ajax\MessageCommandTest::waitForMessageRemoved()
Asserts that a message of the expected type is removed.
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::waitForMessageRemoved()
- 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 196
Class
- MessageCommandTest
- Tests adding messages via AJAX command.
Namespace
Drupal\FunctionalJavascriptTests\AjaxCode
protected function waitForMessageRemoved($message, $selector = '[data-drupal-messages]', $type = 'status') {
$this->assertNotEmpty($this->assertSession()
->waitForElementRemoved('css', $selector . ' .messages--' . $type . ':contains("' . $message . '")'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.