function JSWebAssert::statusMessageContains

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php \Drupal\FunctionalJavascriptTests\JSWebAssert::statusMessageContains()

Asserts that a status message containing a given string exists.

Parameters

string $message: The partial message to assert.

string|null $type: The optional message type: status, error, or warning.

Overrides WebAssert::statusMessageContains

File

core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php, line 732

Class

JSWebAssert
Defines a class with methods for asserting presence of elements during tests.

Namespace

Drupal\FunctionalJavascriptTests

Code

public function statusMessageContains(string $message, ?string $type = NULL) : void {
    $selector = $this->buildStatusMessageSelector($message, $type);
    $this->waitForElement('xpath', $selector);
    parent::statusMessageContains($message, $type);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.