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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Hides contents as if the summary is clicked on the browser.boolean
isOpen()
Checks if the details are open.void
Shows contents as if the summary is clicked on the browser.void
Toggles details visibility, as if the summary is clicked on the browser.Methods inherited from class com.vaadin.testbench.unit.ComponentTester
ensureComponentIsUsable, ensureVisible, find, findAllByQuery, findByQuery, fireDomEvent, fireDomEvent, fireDomEvent, getComponent, getField, getField, getMethod, getMethod, isUsable, notUsableReasons, roundTrip, setModal
-
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.
-