Class DashboardLocator
java.lang.Object
com.vaadin.browserless.locator.Locator<com.vaadin.flow.component.dashboard.Dashboard,DashboardLocator>
com.vaadin.flow.component.dashboard.DashboardLocator
- All Implemented Interfaces:
Clickable<com.vaadin.flow.component.dashboard.Dashboard>,HasThemeFilter<com.vaadin.flow.component.dashboard.Dashboard,DashboardLocator>
@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor")
public class DashboardLocator
extends Locator<com.vaadin.flow.component.dashboard.Dashboard,DashboardLocator>
implements Clickable<com.vaadin.flow.component.dashboard.Dashboard>, HasThemeFilter<com.vaadin.flow.component.dashboard.Dashboard,DashboardLocator>
Generated locator for
Dashboard, derived from
DashboardTester. 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
ConstructorsConstructorDescriptionCreates a locator that searches for aDashboard.DashboardLocator(com.vaadin.flow.component.dashboard.Dashboard component) Creates a locator already bound to the given component, so that the action methods run against it instead of against a lookup. -
Method Summary
Modifier and TypeMethodDescriptionvoidEnsures the component is in a usable state before interaction.com.vaadin.flow.component.dashboard.DashboardGets the component being tested.voidmoveWidget(com.vaadin.flow.component.dashboard.DashboardWidget widget, int toIndex) Simulates a user dragging the given widget to a new position within its current container (the dashboard root, or the section it belongs to).voidremoveWidget(com.vaadin.flow.component.dashboard.DashboardWidget widget) Simulates a user removing the given widget by clicking its remove button.voidresizeWidget(com.vaadin.flow.component.dashboard.DashboardWidget widget, int colspan, int rowspan) Simulates a user resizing the given widget to the given column and row span.Methods inherited from class com.vaadin.browserless.locator.Locator
atIndex, component, components, exists, inside, inside, invalidate, self, with, withAttribute, withAttribute, withClassName, withCondition, 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
-
DashboardLocator
public DashboardLocator()Creates a locator that searches for aDashboard. -
DashboardLocator
public DashboardLocator(com.vaadin.flow.component.dashboard.Dashboard component) Creates a locator already bound to the given component, so that the action methods run against it instead of against a lookup.- Parameters:
component- the component the locator resolves to
-
-
Method Details
-
getComponent
public com.vaadin.flow.component.dashboard.Dashboard getComponent()Description copied from interface:ClickableGets the component being tested.- Specified by:
getComponentin interfaceClickable<com.vaadin.flow.component.dashboard.Dashboard>- 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<com.vaadin.flow.component.dashboard.Dashboard>
-
moveWidget
public void moveWidget(com.vaadin.flow.component.dashboard.DashboardWidget widget, int toIndex) Simulates a user dragging the given widget to a new position within its current container (the dashboard root, or the section it belongs to). Javadoc copied fromDashboardTester.moveWidget(com.vaadin.flow.component.dashboard.DashboardWidget,int).- Parameters:
widget- the widget to move, notnulltoIndex- the target index among the widget's siblings- Throws:
IllegalStateException- if the dashboard is not editableIllegalArgumentException- if the widget is not in this dashboard or the target index is out of bounds
-
resizeWidget
public void resizeWidget(com.vaadin.flow.component.dashboard.DashboardWidget widget, int colspan, int rowspan) Simulates a user resizing the given widget to the given column and row span. Javadoc copied fromDashboardTester.resizeWidget(com.vaadin.flow.component.dashboard.DashboardWidget,int,int).- Parameters:
widget- the widget to resize, notnullcolspan- the new column spanrowspan- the new row span- Throws:
IllegalStateException- if the dashboard is not editableIllegalArgumentException- if the widget is not in this dashboard
-
removeWidget
public void removeWidget(com.vaadin.flow.component.dashboard.DashboardWidget widget) Simulates a user removing the given widget by clicking its remove button.If the dashboard has a custom
remove handler, it receives the event and decides whether to remove the widget; otherwise the widget is removed immediately. Javadoc copied fromDashboardTester.removeWidget(com.vaadin.flow.component.dashboard.DashboardWidget).- Parameters:
widget- the widget to remove, notnull- Throws:
IllegalStateException- if the dashboard is not editableIllegalArgumentException- if the widget is not in this dashboard
-