com.vaadin.flow.component.routerlink.
Class RouterLinkTester<T extends RouterLink>
Type Parameters:
T
- component type
Tester for RouterLink components.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.vaadin.testbench.unit.ComponentTester
ensureComponentIsUsable, ensureComponentIsUsable, ensureVisible, ensureVisible, find, findAllByQuery, findByQuery, fireDomEvent, fireDomEvent, fireDomEvent, getComponent, getField, getField, getMethod, getMethod, isUsable, isUsable, notUsableReasons, notUsableReasons, roundTrip, setModal
-
Constructor Details
-
RouterLinkTester
Wrap given component for testing.
Parameters:
component
- target component
-
-
Method Details
-
getHref
Gets the URL that the router-link links to.
Returns:
the href value, or empty string if no href has been set
-
getPath
Gets the path for the router-link. Returns an empty
String
if there is no corresponding navigation target.Returns:
a
String
containing the navigation target path or empty if not present -
getQueryParameters
Gets the query parameters for the router-link.
Returns:
a
QueryParameters
containing the navigation target's query parameters -
getRoute
Gets the registered route class for the router-link. Returns an empty optional if there is no corresponding navigation target.
Returns:
an
Optional
containing the navigation target class or empty if not found -
click
Click the router-link for navigation.
Returns:
navigated view
-