Class BreadcrumbsTester<T extends Breadcrumbs>
java.lang.Object
com.vaadin.browserless.ComponentTester<T>
com.vaadin.flow.component.breadcrumbs.BreadcrumbsTester<T>
- All Implemented Interfaces:
Clickable<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclickItem(int index) Simulates a click on the item at the given position in the trail, navigating to its path.voidSimulates a click on the item that matches the given label, navigating to its path.Gets the labels of the breadcrumb items, in trail order.Methods inherited from class com.vaadin.browserless.ComponentTester
ensureComponentIsUsable, ensureComponentIsUsable, ensureVisible, ensureVisible, find, findAllByQuery, findByQuery, fireDomEvent, fireDomEvent, fireDomEvent, getComponent, getField, getField, getMethod, getMethod, isUsable, isUsable, notUsableReasons, notUsableReasons, roundTrip, setModal, setValueAsUserMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.browserless.Clickable
click, click, click, middleClick, middleClick, rightClick, rightClick
-
Constructor Details
-
BreadcrumbsTester
Wrap given component for testing.- Parameters:
component- target component
-
-
Method Details
-
getItemTexts
Gets the labels of the breadcrumb items, in trail order.- Returns:
- the item labels
-
clickItem
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- Throws:
IllegalArgumentException- if no item matches the labelIllegalStateException- if more than one item matches, or the item has no path (e.g. the current-page item)
-
clickItem
public 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- Throws:
IllegalArgumentException- if there is no item at the given indexIllegalStateException- if the item has no path (e.g. the current-page item)
-