Class BreadcrumbsTester

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

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

      Constructors 
      Constructor Description
      BreadcrumbsTester(T component) Wrap given component for testing.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      List<String> getItemTexts() Gets the labels of the breadcrumb items, in trail order.
      List<String> getItemPaths() Gets the resolved navigation path (href) of each breadcrumb item, in trail order.
      void clickItem(String text) Simulates a click on the item that matches the given label, navigating to its path.
      void clickItem(int index) Simulates a click on the item at the given position in the trail, navigating to its path.
      • Methods inherited from class com.vaadin.browserless.ComponentTester

        ensureComponentIsUsable, find, getComponent, 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

      • BreadcrumbsTester

        BreadcrumbsTester(T component)

        Wrap given component for testing.

        Parameters:
        component - target component
    • Method Detail

      • getItemTexts

         List<String> getItemTexts()

        Gets the labels of the breadcrumb items, in trail order.

        Returns:

        the item labels

      • getItemPaths

         List<String> getItemPaths()

        Gets the resolved navigation path (href) of each breadcrumb item, in trail order. An item that has no navigable path (such as the current-page item) is represented by null; note that null is distinct from an empty string, which is the path of the application root.

        Returns:

        the item paths, with null for items that have no path

      • clickItem

         void clickItem(String text)

        Simulates a click on the item that matches the given label, navigating to its path.

        Parameters:
        text - the label of the breadcrumb item, not null
      • clickItem

         void clickItem(int index)

        Simulates a click on the item at the given position in the trail, navigating to its path.

        Parameters:
        index - the zero-based position of the item in the trail