Class ChartLocator

java.lang.Object
com.vaadin.browserless.locator.Locator<Chart,ChartLocator>
com.vaadin.flow.component.charts.ChartLocator
All Implemented Interfaces:
Clickable<Chart>

@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor") public class ChartLocator extends Locator<Chart,ChartLocator> implements Clickable<Chart>
Generated locator for Chart, derived from ChartTester. 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

    • ChartLocator

      public ChartLocator()
    • ChartLocator

      public ChartLocator(Chart component)
  • Method Details

    • getComponent

      public Chart getComponent()
      Description copied from interface: Clickable
      Gets the component being tested.
      Specified by:
      getComponent in interface Clickable<Chart>
      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<Chart>
    • getSeriesValues

      public List<Number> getSeriesValues(int seriesIndex)
      Gets the values for the series at given index. At the moment only
      invalid reference
      ListSeries
      ,
      invalid reference
      DataSeries
      and
      invalid reference
      DataProviderSeries
      are supported. For all other series types an exception will be thrown. For
      invalid reference
      DataProviderSeries
      Y value is expected to be a Number subtype. Javadoc copied from ChartTester.getSeriesValues(int).
      Parameters:
      seriesIndex - zero-based index of the series
      Returns:
      the list of values for the series.
      Throws:
      IndexOutOfBoundsException - if series for the given index does not exist.
      UnsupportedOperationException - if the chart series at give index is not supported.
    • getSeriesValues

      public List<Number> getSeriesValues(String seriesName)
      Gets the values for the series with the given name. At the moment only
      invalid reference
      ListSeries
      ,
      invalid reference
      DataSeries
      and
      invalid reference
      DataProviderSeries
      are supported. For all other series types an exception will be thrown. For
      invalid reference
      DataProviderSeries
      Y value is expected to be a Number subtype. Javadoc copied from ChartTester.getSeriesValues(java.lang.String).
      Parameters:
      seriesName - name of the series
      Returns:
      the list of values for the series.
      Throws:
      UnsupportedOperationException - if the chart series at give index is not supported.
    • getPointValue

      public Number getPointValue(int seriesIndex, String name)
      Gets the value of the point with given name from the series at given index. The name depends on the series type. For
      invalid reference
      ListSeries
      it is expected to refer to an X-Axis category, for
      invalid reference
      DataSeries
      it refers to the item name, for
      invalid reference
      DataProviderSeries
      it is matched against the value of the configured x attribute. At the moment only
      invalid reference
      ListSeries
      ,
      invalid reference
      DataSeries
      and
      invalid reference
      DataProviderSeries
      are supported. For all other series types an exception will be thrown. Javadoc copied from ChartTester.getPointValue(int,java.lang.String).
      Parameters:
      seriesIndex - zero-based index of the series
      name - name of the point in the series
      Returns:
      the value of the point at given coordinates.
    • getPointValue

      public Number getPointValue(String seriesName, String name)
      Gets the value of the point with given name from the series at given index. The name depends on the series type. For
      invalid reference
      ListSeries
      it is expected to refer to an X-Axis category, for
      invalid reference
      DataSeries
      it refers to the item name, for
      invalid reference
      DataProviderSeries
      it is matched against the value of the configured x attribute. At the moment only
      invalid reference
      ListSeries
      ,
      invalid reference
      DataSeries
      and
      invalid reference
      DataProviderSeries
      are supported. For all other series types an exception will be thrown. Javadoc copied from ChartTester.getPointValue(java.lang.String,java.lang.String).
      Parameters:
      seriesName - name of the series
      name - name of the point in the series
      Returns:
      the value of the point at given coordinates.
    • clickLegendItem

      public void clickLegendItem(String item)
      Simulates a click on the item of the legend with the given text. Current limitation: it assumes the text corresponds to a series name. Javadoc copied from ChartTester.clickLegendItem(java.lang.String).
      Parameters:
      item - legend item
    • clickPoint

      public void clickPoint(String seriesName, String name)
      Simulates a click on a point on the chart. Javadoc copied from ChartTester.clickPoint(java.lang.String,java.lang.String).
      Parameters:
      seriesName - name of the series
      name - name of the point in the series
    • clickChart

      public void clickChart()
      Simulates a click on the chart, but not on legend items or points. Javadoc copied from ChartTester.clickChart().