Class ComboBoxTester
-
- All Implemented Interfaces:
public class ComboBoxTester<T extends ComboBox<Y>, Y> extends ComponentTester<T>
-
-
Constructor Summary
Constructors Constructor Description ComboBoxTester(T component)Wrap given component for testing.
-
Method Summary
Modifier and Type Method Description voidsetFilter(String filter)Simulate writing a filter to the combobox. voidselectItem(String selection)Select item by client string representation. YgetSelected()Get the currently selected item. List<String>getSuggestions()Get dropdown suggestions as String representations sent to the client. List<Y>getSuggestionItems()Get the actual items for the dropdown as a List. -
-
Constructor Detail
-
ComboBoxTester
ComboBoxTester(T component)
Wrap given component for testing.- Parameters:
component- target component
-
-
Method Detail
-
setFilter
void setFilter(String filter)
Simulate writing a filter to the combobox.
Use getSuggestions to get the string values show in the dropdown or getSuggestionItems to get the actual items in the suggestion.- Parameters:
filter- string to use for filtering
-
selectItem
void selectItem(String selection)
Select item by client string representation.
- Parameters:
selection- item representation string
-
getSelected
Y getSelected()
Get the currently selected item.
- Returns:
current selection
-
getSuggestions
List<String> getSuggestions()
Get dropdown suggestions as String representations sent to the client. Any filter that is set is taken into account.
- Returns:
List of item representation strings
-
getSuggestionItems
List<Y> getSuggestionItems()
Get the actual items for the dropdown as a List. Any filter that is set is taken into account.
- Returns:
List of items
-
-
-
-