function MediaJavascriptTestBase::waitUntilVisible
Same name in other branches
- 8.9.x core/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php \Drupal\Tests\media\FunctionalJavascript\MediaJavascriptTestBase::waitUntilVisible()
- 10 core/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php \Drupal\Tests\media\FunctionalJavascript\MediaJavascriptTestBase::waitUntilVisible()
- 11.x core/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php \Drupal\Tests\media\FunctionalJavascript\MediaJavascriptTestBase::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 MediaJavascriptTestBase::waitUntilVisible()
- MediaViewsWizardTest::testMediaRevisionWizard in core/
modules/ media/ tests/ src/ FunctionalJavascript/ MediaViewsWizardTest.php - Tests adding a view of media revisions.
- MediaViewsWizardTest::testMediaWizard in core/
modules/ media/ tests/ src/ FunctionalJavascript/ MediaViewsWizardTest.php - Tests adding a view of media.
File
-
core/
modules/ media/ tests/ src/ FunctionalJavascript/ MediaJavascriptTestBase.php, line 41
Class
- MediaJavascriptTestBase
- Base class for Media functional JavaScript tests.
Namespace
Drupal\Tests\media\FunctionalJavascriptCode
protected function waitUntilVisible($selector, $timeout = 1000, $message = '') {
$condition = "jQuery('" . $selector . ":visible').length > 0";
$this->assertJsCondition($condition, $timeout, $message);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.