protected function ConditionalFieldTestBase::changeSelect in Conditional Fields 4.x
Same name and namespace in other branches
- 8 tests/src/FunctionalJavascript/ConditionalFieldTestBase.php \Drupal\Tests\conditional_fields\FunctionalJavascript\ConditionalFieldTestBase::changeSelect()
Helper to change selection with Javascript.
20 calls to ConditionalFieldTestBase::changeSelect()
- ConditionalFieldCheckboxesTest::testVisibleValueAnd in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - Target field is Visible when control field has value with AND condition.
- ConditionalFieldCheckboxesTest::testVisibleValueNot in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - Target field is Visible when control field has value with NOT condition.
- ConditionalFieldCheckboxesTest::testVisibleValueOr in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - Target field is Visible when the control field has value with OR condition.
- ConditionalFieldCheckboxesTest::testVisibleValueRegExp in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - Target field is Visible when the control field has value from regex.
- 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 106
Class
- ConditionalFieldTestBase
- Base setup for ConditionalField tests.
Namespace
Drupal\Tests\conditional_fields\FunctionalJavascriptCode
protected function changeSelect($selector, $value = '') {
$this
->getSession()
->executeScript("jQuery('" . $selector . "').val('" . $value . "').trigger('click').trigger('change');");
}