Class MultiSelectListBoxTester<T extends MultiSelectListBox<V>,V>
java.lang.Object
com.vaadin.testbench.unit.ComponentTester<T>
com.vaadin.flow.component.listbox.MultiSelectListBoxTester<T,V>
- Type Parameters:
T
- component typeV
- value type
Tester for MultiSelectListBox components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear all selected items from the component.void
deselectItems
(String... selection) Deselect item(s) by client string representation.Get the currently selected items.Get the actual items for the dropdown as a List.Get available items as String representations sent to the client.void
selectItems
(String... selection) Select item(s) 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
-
Constructor Details
-
MultiSelectListBoxTester
Wrap given component for testing.- Parameters:
component
- target component
-
-
Method Details
-
getSelected
Get the currently selected items.- Returns:
- current selection
-
selectItems
Select item(s) by client string representation.- Parameters:
selection
- item representation string, not null
-
deselectItems
Deselect item(s) by client string representation.- Parameters:
selection
- item representation string, not null- Throws:
IllegalArgumentException
- if selection contained item not available for selection
-
clearSelection
public void clearSelection()Clear all selected items from the component. -
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
-