Class DashboardLocator
java.lang.Object
com.vaadin.browserless.locator.Locator<Dashboard,DashboardLocator>
com.vaadin.flow.component.dashboard.DashboardLocator
- All Implemented Interfaces:
Clickable<Dashboard>,HasThemeFilter<Dashboard,DashboardLocator>
@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor")
public class DashboardLocator
extends Locator<Dashboard,DashboardLocator>
implements Clickable<Dashboard>, HasThemeFilter<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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEnsures the component is in a usable state before interaction.Gets the component being tested.voidmoveWidget(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(DashboardWidget widget) Simulates a user removing the given widget by clicking its remove button.voidresizeWidget(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, withId, 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() -
DashboardLocator
-
-
Method Details
-
getComponent
Description copied from interface:ClickableGets the component being tested.- Specified by:
getComponentin interfaceClickable<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<Dashboard>
-
moveWidget
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
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
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
-