Class ListBoxTester<T extends ListBox<V>,V>
java.lang.Object
com.vaadin.testbench.unit.ComponentTester<T>
com.vaadin.flow.component.listbox.ListBoxTester<T,V>
- Type Parameters:
T- component typeV- value type
- All Implemented Interfaces:
Clickable<T>
Tester for ListBox components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the currently selected item.Get the actual items for the dropdown as a List.Get available items as String representations sent to the client.voidselectItem(String selection) Select item by client string representation.Methods inherited from class com.vaadin.testbench.unit.ComponentTester
ensureComponentIsUsable, ensureComponentIsUsable, ensureVisible, ensureVisible, find, findAllByQuery, findByQuery, fireDomEvent, fireDomEvent, fireDomEvent, getComponent, getField, getField, getMethod, getMethod, isUsable, isUsable, notUsableReasons, notUsableReasons, roundTrip, setModal, setValueAsUserMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.testbench.unit.Clickable
click, click, click, middleClick, middleClick, rightClick, rightClick
-
Constructor Details
-
ListBoxTester
Wrap given component for testing.- Parameters:
component- target component
-
-
Method Details
-
getSelected
Get the currently selected item.- Returns:
- current selection
-
selectItem
Select item by client string representation.- Parameters:
selection- item representation string
-
getSuggestions
Get available items as String representations sent to the client. Any filter that is set is taken into account.- Returns:
- List of item representation strings
-
getSuggestionItems
Get the actual items for the dropdown as a List. Any filter that is set is taken into account.- Returns:
- List of items
-