You are here

protected function OffCanvasTestBase::assertElementVisibleAfterWait in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::assertElementVisibleAfterWait()
  2. 9 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::assertElementVisibleAfterWait()

Asserts the specified selector is visible after a wait.

Parameters

string $selector: The selector engine name. See ElementInterface::findAll() for the supported selectors.

string|array $locator: The selector locator.

int $timeout: (Optional) Timeout in milliseconds, defaults to 10000.

File

core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php, line 127

Class

OffCanvasTestBase
Base class contains common test functionality for the Off-canvas dialog.

Namespace

Drupal\Tests\system\FunctionalJavascript

Code

protected function assertElementVisibleAfterWait($selector, $locator, $timeout = 10000) {
  $this
    ->assertSession()
    ->assertWaitOnAjaxRequest();
  $this
    ->assertNotEmpty($this
    ->assertSession()
    ->waitForElementVisible($selector, $locator, $timeout));
}