You are here

protected function SiteAlertWebDriverTestBase::assertSiteAlertCount in Site Alert 8

Checks that the expected number of alerts is present on the page.

Parameters

int $count: The number of alerts that are expected to be visible.

2 calls to SiteAlertWebDriverTestBase::assertSiteAlertCount()
SiteAlertTimeoutTest::testSiteAlertTimeouts in tests/src/FunctionalJavascript/SiteAlertTimeoutTest.php
Tests the automatic refreshing of site alerts.
SiteAlertTimeoutTest::testSiteAlertTimeoutsDisabled in tests/src/FunctionalJavascript/SiteAlertTimeoutTest.php
Tests that automatic refreshing of site alerts can be disabled.

File

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

Class

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

Namespace

Drupal\Tests\site_alert\FunctionalJavascript

Code

protected function assertSiteAlertCount($count) {
  $alerts = $this
    ->getSession()
    ->getPage()
    ->findAll('css', '.site-alert div.text');
  $this
    ->assertCount($count, $alerts);
}