Class MasterDetailLayoutTester<T extends MasterDetailLayout>
java.lang.Object
com.vaadin.browserless.ComponentTester<T>
com.vaadin.flow.component.masterdetaillayout.MasterDetailLayoutTester<T>
- Type Parameters:
T- component type
- All Implemented Interfaces:
Clickable<T>
Tester for MasterDetailLayout components.
Provides access to the state of the layout as a user would observe it: the component shown in the master area, the component shown in the detail area, and the detail placeholder that is displayed when no detail content is set.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable ComponentGets the component currently shown in the detail area.@Nullable ComponentGets the placeholder component currently shown in the detail area.@Nullable ComponentGets the component currently shown in the master area.booleanChecks whether the detail placeholder is currently shown to the user.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
-
MasterDetailLayoutTester
Wrap given component for testing.- Parameters:
component- target component
-
-
Method Details
-
getMaster
Gets the component currently shown in the master area.- Returns:
- the component in the master area, or
nullif there is no component in the master area - Throws:
IllegalStateException- if the layout is not visible to the user
-
getDetail
Gets the component currently shown in the detail area.- Returns:
- the component in the detail area, or
nullif no detail content is set - Throws:
IllegalStateException- if the layout is not visible to the user
-
getDetailPlaceholder
Gets the placeholder component currently shown in the detail area. The placeholder is only shown to the user while no detail content is set.- Returns:
- the placeholder component shown in the detail area, or
nullif no placeholder is set - Throws:
IllegalStateException- if the layout is not visible to the user, or if detail content is set so the placeholder is not shown
-
isDetailPlaceholderVisible
public boolean isDetailPlaceholderVisible()Checks whether the detail placeholder is currently shown to the user. A placeholder is shown when one is set and there is no detail content.- Returns:
trueif the placeholder is shown,falseotherwise- Throws:
IllegalStateException- if the layout is not visible to the user
-