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 Details

    • DashboardLocator

      public DashboardLocator()
      Creates a locator that searches for a Dashboard.
    • 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: Clickable
      Gets the component being tested.
      Specified by:
      getComponent in interface Clickable<com.vaadin.flow.component.dashboard.Dashboard>
      Returns:
      the component under test
    • ensureComponentIsUsable

      public void ensureComponentIsUsable()
      Description copied from interface: Clickable
      Ensures the component is in a usable state before interaction.
      Specified by:
      ensureComponentIsUsable in interface Clickable<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 from DashboardTester.moveWidget(com.vaadin.flow.component.dashboard.DashboardWidget,int).
      Parameters:
      widget - the widget to move, not null
      toIndex - the target index among the widget's siblings
      Throws:
      IllegalStateException - if the dashboard is not editable
      IllegalArgumentException - 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 from DashboardTester.resizeWidget(com.vaadin.flow.component.dashboard.DashboardWidget,int,int).
      Parameters:
      widget - the widget to resize, not null
      colspan - the new column span
      rowspan - the new row span
      Throws:
      IllegalStateException - if the dashboard is not editable
      IllegalArgumentException - 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 from DashboardTester.removeWidget(com.vaadin.flow.component.dashboard.DashboardWidget).

      Parameters:
      widget - the widget to remove, not null
      Throws:
      IllegalStateException - if the dashboard is not editable
      IllegalArgumentException - if the widget is not in this dashboard