You are here

protected function SiteAlertWebDriverTestBase::assertSiteAlertDisappears in Site Alert 8

Checks that the alert with the given message disappears from the page.

Parameters

string $message: The message contained in the alert that is expected to disappear.

1 call to SiteAlertWebDriverTestBase::assertSiteAlertDisappears()
SiteAlertTimeoutTest::testSiteAlertTimeouts in tests/src/FunctionalJavascript/SiteAlertTimeoutTest.php
Tests the automatic refreshing of site alerts.

File

tests/src/FunctionalJavascript/SiteAlertWebDriverTestBase.php, line 75

Class

SiteAlertWebDriverTestBase
Base class for functional JS tests for the Site Alerts module.

Namespace

Drupal\Tests\site_alert\FunctionalJavascript

Code

protected function assertSiteAlertDisappears($message) {
  $condition = 'jQuery(\'.site-alert div.text:contains("' . $message . '")\').length == 0;';
  $this
    ->assertJsCondition($condition);
}