protected function ConditionalFieldTestBase::waitUntilVisible in Conditional Fields 8
Same name and namespace in other branches
- 4.x tests/src/FunctionalJavascript/ConditionalFieldTestBase.php \Drupal\Tests\conditional_fields\FunctionalJavascript\ConditionalFieldTestBase::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().
106 calls to ConditionalFieldTestBase::waitUntilVisible()
- ConditionalFieldCheckboxesTest::testVisibleValueAnd in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - The target field is Visible when the control field has value with AND condition.
- ConditionalFieldCheckboxesTest::testVisibleValueNot in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - The target field is Visible when the control field has value with NOT condition.
- ConditionalFieldCheckboxesTest::testVisibleValueOr in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - The target field is Visible when the control field has value with OR condition.
- ConditionalFieldCheckboxesTest::testVisibleValueRegExp in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - The target field is Visible when the control field has value from Regular expression.
- ConditionalFieldCheckboxesTest::testVisibleValueWidget in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - The target field is Visible when the control field has value from Widget.
File
- tests/
src/ FunctionalJavascript/ ConditionalFieldTestBase.php, line 71
Class
- ConditionalFieldTestBase
- Base setup for ConditionalField tests.
Namespace
Drupal\Tests\conditional_fields\FunctionalJavascriptCode
protected function waitUntilVisible($selector, $timeout = 1000, $message = '') {
$condition = "jQuery('{$selector}').is(':visible');console.log(jQuery('{$selector}'))";
$this
->assertJsCondition($condition, $timeout, $message);
}