Class BreadcrumbsTester
-
- All Implemented Interfaces:
-
com.vaadin.browserless.Clickable
public class BreadcrumbsTester<T extends Breadcrumbs> extends ComponentTester<T>
- Since:
1.1
-
-
Constructor Summary
Constructors Constructor Description BreadcrumbsTester(T component)Wrap given component for testing.
-
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. voidclickItem(String text)Simulates a click on the item that matches the given label, navigating to its path. voidclickItem(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 thatnullis distinct from an empty string, which is the path of the application root.- Returns:
the item paths, with
nullfor 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
-
-
-
-