Package com.vaadin.flow.component.charts
Class ChartLocator
java.lang.Object
com.vaadin.browserless.locator.Locator<Chart,ChartLocator>
com.vaadin.flow.component.charts.ChartLocator
- All Implemented Interfaces:
Clickable<Chart>,HasThemeFilter<Chart,ChartLocator>
@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor")
public class ChartLocator
extends Locator<Chart,ChartLocator>
implements Clickable<Chart>, HasThemeFilter<Chart,ChartLocator>
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSimulates a click on the chart, but not on legend items or points.voidclickLegendItem(String item) Simulates a click on the item of the legend with the given text.voidclickPoint(String seriesName, String name) Simulates a click on a point on the chart.voidEnsures the component is in a usable state before interaction.Gets the component being tested.getPointValue(int seriesIndex, String name) Gets the value of the point with given name from the series at given index.getPointValue(String seriesName, String name) Gets the value of the point with given name from the series at given index.getSeriesValues(int seriesIndex) Gets the values for the series at given index.getSeriesValues(String seriesName) Gets the values for the series with the given name.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, withTheme
-
Constructor Details
-
ChartLocator
public ChartLocator() -
ChartLocator
-
-
Method Details
-
getComponent
Description copied from interface:ClickableGets the component being tested.- Specified by:
getComponentin interfaceClickable<Chart>- 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<Chart>
-
getSeriesValues
Gets the values for the series at given index. At the moment only,invalid reference
ListSeriesandinvalid reference
DataSeriesare supported. For all other series types an exception will be thrown. Forinvalid reference
DataProviderSeriesY value is expected to be ainvalid reference
DataProviderSeriesNumbersubtype. Javadoc copied fromChartTester.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
Gets the values for the series with the given name. At the moment only,invalid reference
ListSeriesandinvalid reference
DataSeriesare supported. For all other series types an exception will be thrown. Forinvalid reference
DataProviderSeriesY value is expected to be ainvalid reference
DataProviderSeriesNumbersubtype. Javadoc copied fromChartTester.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
Gets the value of the point with given name from the series at given index. Thenamedepends on the series type. Forit is expected to refer to an X-Axis category, forinvalid reference
ListSeriesit refers to the item name, forinvalid reference
DataSeriesit is matched against the value of the configured x attribute. At the moment onlyinvalid reference
DataProviderSeries,invalid reference
ListSeriesandinvalid reference
DataSeriesare supported. For all other series types an exception will be thrown. Javadoc copied frominvalid reference
DataProviderSeriesChartTester.getPointValue(int,java.lang.String).- Parameters:
seriesIndex- zero-based index of the seriesname- name of the point in the series- Returns:
- the value of the point at given coordinates.
-
getPointValue
Gets the value of the point with given name from the series at given index. Thenamedepends on the series type. Forit is expected to refer to an X-Axis category, forinvalid reference
ListSeriesit refers to the item name, forinvalid reference
DataSeriesit is matched against the value of the configured x attribute. At the moment onlyinvalid reference
DataProviderSeries,invalid reference
ListSeriesandinvalid reference
DataSeriesare supported. For all other series types an exception will be thrown. Javadoc copied frominvalid reference
DataProviderSeriesChartTester.getPointValue(java.lang.String,java.lang.String).- Parameters:
seriesName- name of the seriesname- name of the point in the series- Returns:
- the value of the point at given coordinates.
-
clickLegendItem
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 fromChartTester.clickLegendItem(java.lang.String).- Parameters:
item- legend item
-
clickPoint
Simulates a click on a point on the chart. Javadoc copied fromChartTester.clickPoint(java.lang.String,java.lang.String).- Parameters:
seriesName- name of the seriesname- 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 fromChartTester.clickChart().
-