protected function DynamicEntityReferenceTest::selectAutocompleteOption in Dynamic Entity Reference 8
Same name and namespace in other branches
- 8.2 tests/src/FunctionalJavascript/DynamicEntityReferenceTest.php \Drupal\Tests\dynamic_entity_reference\FunctionalJavascript\DynamicEntityReferenceTest::selectAutocompleteOption()
Selects the autocomplete result with the given delta.
Parameters
int $delta: Delta of item to select. Starts from 0.
1 call to DynamicEntityReferenceTest::selectAutocompleteOption()
- DynamicEntityReferenceTest::testFieldSettings in tests/
src/ FunctionalJavascript/ DynamicEntityReferenceTest.php - Tests field settings of dynamic entity reference field.
File
- tests/
src/ FunctionalJavascript/ DynamicEntityReferenceTest.php, line 299
Class
- DynamicEntityReferenceTest
- Ensures that Dynamic Entity References field works correctly.
Namespace
Drupal\Tests\dynamic_entity_reference\FunctionalJavascriptCode
protected function selectAutocompleteOption($delta = 0) {
// Press the down arrow to select the nth option.
/** @var \Behat\Mink\Element\NodeElement $element */
$element = $this
->getSession()
->getPage()
->findAll('css', '.ui-autocomplete.ui-menu li.ui-menu-item')[$delta];
$element
->click();
}