You are here

public function ThunderJavascriptTestBase::waitUntilVisible in Thunder 8.3

Same name and namespace in other branches
  1. 8.5 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::waitUntilVisible()
  2. 8.2 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::waitUntilVisible()
  3. 8.4 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::waitUntilVisible()
  4. 6.2.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::waitUntilVisible()
  5. 6.0.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::waitUntilVisible()
  6. 6.1.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::waitUntilVisible()

Waits and asserts that a given element is visible.

Parameters

string $selector: The CSS selector.

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

string $message: (Optional) Message to pass to assertJsCondition().

2 calls to ThunderJavascriptTestBase::waitUntilVisible()
AccessUnpublishedTest::testAccessUnpublished in tests/src/FunctionalJavascript/Integration/AccessUnpublishedTest.php
Testing integration of "access_unpublished" module.
LiveblogTest::testWithPusher in tests/src/FunctionalJavascript/Integration/LiveblogTest.php
Testing of module integration.

File

tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php, line 110

Class

ThunderJavascriptTestBase
Base class for Thunder Javascript functional tests.

Namespace

Drupal\Tests\thunder\FunctionalJavascript

Code

public function waitUntilVisible($selector, $timeout = 1000, $message = '') {
  $condition = "jQuery('" . $selector . ":visible').length > 0";
  $this
    ->assertJsCondition($condition, $timeout, $message);
}