Class MultiSelectComboBoxTester

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final T component
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void setFilter(String filter) Simulate writing a filter to the combobox.
      void selectItem(Array<String> selection) Select items by client string representation.
      void clickClearButton() Clears the selection by clicking the clear button, as the user would.
      Set<Y> getSelected() 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.
      • Methods inherited from class com.vaadin.browserless.ComponentTester

        blur, ensureComponentIsUsable, find, focus, getComponent, isFocused, isUsable, setModal
      • Methods inherited from class com.vaadin.browserless.Clickable

        click, click, click, middleClick, middleClick, rightClick, rightClick
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultiSelectComboBoxTester

        MultiSelectComboBoxTester(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(Array<String> selection)

        Select items by client string representation.

        Parameters:
        selection - item representations as strings
      • clickClearButton

         void clickClearButton()

        Clears the selection by clicking the clear button, as the user would.

        Requires the clear button to be visible — a hidden clear button is not something the user can click. selectItem with null clears the selection without that requirement.
        Since:

        25.3

      • getSelected

         Set<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