Class VirtualListLocator<Y>
java.lang.Object
com.vaadin.browserless.locator.Locator<VirtualList<Y>,VirtualListLocator<Y>>
com.vaadin.flow.component.virtuallist.VirtualListLocator<Y>
- All Implemented Interfaces:
Clickable<VirtualList<Y>>,HasThemeFilter<VirtualList<Y>,VirtualListLocator<Y>>
@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor")
public class VirtualListLocator<Y>
extends Locator<VirtualList<Y>,VirtualListLocator<Y>>
implements Clickable<VirtualList<Y>>, HasThemeFilter<VirtualList<Y>,VirtualListLocator<Y>>
Generated locator for
VirtualList, derived from
VirtualListTester. 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
ConstructorsConstructorDescriptionVirtualListLocator(VirtualList<Y> component) VirtualListLocator(Class<Y> yType) -
Method Summary
Modifier and TypeMethodDescriptionvoidEnsures the component is in a usable state before interaction.Gets the component being tested.getItem(int index) Get the item at the given index.getItemComponent(int index) Get an initialized copy of the component for the item.getItemText(int index) Get the text that is shown on the client for the item at index.<V> VgetLitRendererPropertyValue(int index, String propertyName, Class<V> propertyClass) Get property value for item's LitRenderer.voidinvokeLitRendererFunction(int index, String functionName) Invoke named function for item's LitRenderer.voidinvokeLitRendererFunction(int index, String functionName, tools.jackson.databind.node.ArrayNode jsonArray) Invoke named function for item's LitRenderer using the supplied JSON arguments.intsize()Get the amount of items in the virtual list.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
-
VirtualListLocator
-
VirtualListLocator
-
-
Method Details
-
getComponent
Description copied from interface:ClickableGets the component being tested.- Specified by:
getComponentin interfaceClickable<Y>- 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<Y>
-
size
public int size()Get the amount of items in the virtual list. Javadoc copied fromVirtualListTester.size().- Returns:
- number of items in the virtual list
-
getItem
Get the item at the given index. Javadoc copied fromVirtualListTester.getItem(int).- Parameters:
index- the zero-based index of the item to get- Returns:
- virtual list item at index
-
getItemText
Get the text that is shown on the client for the item at index. The index is zero-based. For the default renderer ColumnPathRenderer the result is the sent text for defined object path. For a ComponentRenderer the result is the rendered component as prettyString. More to be added as we find other renderers that need handling. Javadoc copied fromVirtualListTester.getItemText(int).- Parameters:
index- the zero-based index of the item- Returns:
- item content that is sent to the client
-
getItemComponent
Get an initialized copy of the component for the item.Note, this is not the actual component. Javadoc copied from
VirtualListTester.getItemComponent(int).- Parameters:
index- the zero-based index of the item- Returns:
- initialized component for the target item
- Throws:
IllegalArgumentException- when the VirtualList is not using a ComponentRenderer
-
getLitRendererPropertyValue
Get property value for item's LitRenderer. Javadoc copied fromVirtualListTester.getLitRendererPropertyValue(int,java.lang.String,java.lang.Class).- Type Parameters:
V- the type of the LitRenderer property- Parameters:
index- the zero-based index of the itempropertyName- the name of the LitRenderer propertypropertyClass- the class of the value of the LitRenderer property- Returns:
- value of the LitRenderer property
- Throws:
IllegalArgumentException- when the VirtualList is not using a LitRenderer or when the given type of the property does not match the actual property type
-
invokeLitRendererFunction
public void invokeLitRendererFunction(int index, String functionName, tools.jackson.databind.node.ArrayNode jsonArray) Invoke named function for item's LitRenderer using the supplied JSON arguments. Javadoc copied fromVirtualListTester.invokeLitRendererFunction(int,java.lang.String,tools.jackson.databind.node.ArrayNode).- Parameters:
index- the zero-based index of the itemfunctionName- the name of the LitRenderer function to invokejsonArray- the arguments to pass to the function- Throws:
IllegalArgumentException- when the VirtualList is not using a LitRenderer- See Also:
-
invokeLitRendererFunction
Invoke named function for item's LitRenderer. Javadoc copied fromVirtualListTester.invokeLitRendererFunction(int,java.lang.String).- Parameters:
index- the zero-based index of the itemfunctionName- the name of the LitRenderer function to invoke- Throws:
IllegalArgumentException- when the VirtualList is not using a LitRenderer- See Also:
-