Class DetailsTester<T extends Details>
java.lang.Object
com.vaadin.testbench.unit.ComponentTester<T>
com.vaadin.flow.component.details.DetailsTester<T>
- Type Parameters:
T- component type
Tester for Details components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidHides contents as if the summary is clicked on the browser.booleanisOpen()Checks if the details are open.voidShows contents as if the summary is clicked on the browser.voidToggles details visibility, as if the summary is clicked on the browser.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, setValueAsUser
-
Constructor Details
-
DetailsTester
Wrap given component for testing.- Parameters:
component- target component
-
-
Method Details
-
openDetails
public void openDetails()Shows contents as if the summary is clicked on the browser. An exception will be thrown if the details are already open.- Throws:
IllegalStateException- if the component is not usable or if the details are already open.
-
closeDetails
public void closeDetails()Hides contents as if the summary is clicked on the browser. An exception will be thrown if the details are not open.- Throws:
IllegalStateException- if the component is not usable or if the details are not open.
-
toggleDetails
public void toggleDetails()Toggles details visibility, as if the summary is clicked on the browser. -
isOpen
public boolean isOpen()Checks if the details are open.- Returns:
- true if the details are open, otherwise false.
-