com.vaadin.flow.component.html.testbench.
Class AnchorTester
java.lang.Object
com.vaadin.testbench.unit.ComponentTester<T>
com.vaadin.flow.component.html.testbench.HtmlComponentTester<T>
com.vaadin.flow.component.html.testbench.HtmlContainerTester<Anchor>
com.vaadin.flow.component.html.testbench.AnchorTester
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclick()
Click the anchor for navigation if target is a registered route in the application.
void
download
(OutputStream outputStream) Download the stream resource linked by the anchor.
getHref()
Gets the URL that the anchor links to.
Methods inherited from class com.vaadin.flow.component.html.testbench.HtmlContainerTester
getText
Methods inherited from class com.vaadin.flow.component.html.testbench.HtmlComponentTester
getTitle
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
-
AnchorTester
Wrap given component for testing.
Parameters:
component
- target component
-
-
Method Details
-
getHref
Gets the URL that the anchor links to.
Returns:
the href value, or
""
if no href has been set -
click
Click the anchor for navigation if target is a registered route in the application.
Returns:
navigated view
Throws:
IllegalStateException
- if anchor href is not a String or not a route -
download
Download the stream resource linked by the anchor.
Parameters:
outputStream
- output stream to write the stream resource toThrows:
IllegalStateException
- if the anchor does not link to a stream resource
-