Class MultiSelectComboBoxTester<T extends MultiSelectComboBox<Y>,Y>

java.lang.Object
com.vaadin.testbench.unit.ComponentTester<T>
com.vaadin.flow.component.combobox.MultiSelectComboBoxTester<T,Y>

public class MultiSelectComboBoxTester<T extends MultiSelectComboBox<Y>,Y> extends ComponentTester<T>
  • Constructor Details

    • MultiSelectComboBoxTester

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

    • setFilter

      public 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

      public void selectItem(String... selection)
      Select items by client string representation.
      Parameters:
      selection - item representations as strings
    • getSelected

      public Set<Y> getSelected()
      Get the currently selected item.
      Returns:
      current selection
    • getSuggestions

      public 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

      public 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