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 type
V - value type

public class MultiSelectListBoxTester<T extends MultiSelectListBox<V>,V> extends ComponentTester<T>
Tester for MultiSelectListBox components.
  • Constructor Details

    • MultiSelectListBoxTester

      public MultiSelectListBoxTester(T component)
      Wrap given component for testing.
      Parameters:
      component - target component
  • Method Details

    • getSelected

      public Set<V> getSelected()
      Get the currently selected items.
      Returns:
      current selection
    • selectItems

      public void selectItems(String... selection)
      Select item(s) by client string representation.
      Parameters:
      selection - item representation string, not null
    • deselectItems

      public void deselectItems(String... selection)
      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

      public List<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

      public List<V> getSuggestionItems()
      Get the actual items for the dropdown as a List. Any filter that is set is taken into account.
      Returns:
      List of items