Class SplitLayoutLocator
java.lang.Object
com.vaadin.browserless.locator.Locator<SplitLayout,SplitLayoutLocator>
com.vaadin.flow.component.splitlayout.SplitLayoutLocator
- All Implemented Interfaces:
Clickable<SplitLayout>,HasThemeFilter<SplitLayout,SplitLayoutLocator>
@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor")
public class SplitLayoutLocator
extends Locator<SplitLayout,SplitLayoutLocator>
implements Clickable<SplitLayout>, HasThemeFilter<SplitLayout,SplitLayoutLocator>
Generated locator for
SplitLayout, derived from
SplitLayoutTester. Filter steps are inherited from
Locator; action methods delegate to a fresh tester
around the resolved component, so behavioral changes belong on the
tester, not here.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddragSplitterTo(double position) Simulates the user dragging the splitter so that the primary split gets the given percentage of the available space.voidEnsures the component is in a usable state before interaction.Gets the component being tested.Gets the component shown in the primary split.Gets the component shown in the secondary split.Gets the relative position of the splitter, as a percentage between 0 and 100 of the space given to the primary split.Methods inherited from class com.vaadin.browserless.locator.Locator
atIndex, component, components, exists, inside, inside, invalidate, self, with, withAttribute, withAttribute, withClassName, withCondition, withId, withinSlot, withoutAttribute, withoutAttribute, withoutClassName, withTestIdMethods 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, rightClickMethods inherited from interface com.vaadin.browserless.locator.HasThemeFilter
withoutTheme, withoutTheme, withTheme, withTheme
-
Constructor Details
-
SplitLayoutLocator
public SplitLayoutLocator() -
SplitLayoutLocator
-
-
Method Details
-
getComponent
Description copied from interface:ClickableGets the component being tested.- Specified by:
getComponentin interfaceClickable<SplitLayout>- Returns:
- the component under test
-
ensureComponentIsUsable
public void ensureComponentIsUsable()Description copied from interface:ClickableEnsures the component is in a usable state before interaction.- Specified by:
ensureComponentIsUsablein interfaceClickable<SplitLayout>
-
dragSplitterTo
public void dragSplitterTo(double position) Simulates the user dragging the splitter so that the primary split gets the given percentage of the available space.The drag is delivered the same way the browser delivers it, so the component updates its
splitter positionand notifiessplitter drag end listeners.The component rounds the position it derives from a drag to two decimals, so
getSplitterPosition()reports33.33after dragging to33.333. Javadoc copied fromSplitLayoutTester.dragSplitterTo(double).- Parameters:
position- the new splitter position, as a percentage between 0 and 100- Throws:
IllegalArgumentException- if the position is not between 0 and 100IllegalStateException- if the layout is not usable
-
getSplitterPosition
Gets the relative position of the splitter, as a percentage between 0 and 100 of the space given to the primary split. A position that comes from a drag is rounded to two decimals by the component. Javadoc copied fromSplitLayoutTester.getSplitterPosition().- Returns:
- the splitter position, or
nullif it has neither been set on the server nor been dragged by the user - Throws:
IllegalStateException- if the layout is not visible to the user
-
getPrimaryComponent
Gets the component shown in the primary split. Javadoc copied fromSplitLayoutTester.getPrimaryComponent().- Returns:
- the primary component, or
nullif the primary split is empty - Throws:
IllegalStateException- if the layout is not visible to the user
-
getSecondaryComponent
Gets the component shown in the secondary split. Javadoc copied fromSplitLayoutTester.getSecondaryComponent().- Returns:
- the secondary component, or
nullif the secondary split is empty - Throws:
IllegalStateException- if the layout is not visible to the user
-