Class CheckboxGroupTester<T extends CheckboxGroup<V>,V>
java.lang.Object
com.vaadin.testbench.unit.ComponentTester<T>
com.vaadin.flow.component.checkbox.CheckboxGroupTester<T,V>
- Type Parameters:
T- component type
- All Implemented Interfaces:
Clickable<T>
Tester for CheckboxGroup components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeselects all client usable items.voiddeselectItem(String selection) Deselects an item by its client string representation.voiddeselectItems(String... selection) Deselects multiple items by client string representation.voiddeselectItems(Collection<String> selection) Deselects items by client string representation.Get the list of currently selected items.booleanisUsable()Validate that component can be interacted with and should be visible in the UI.protected voidnotUsableReasons(Consumer<String> collector) Provides messages explaining why the component is actually not usable.voidSelects all client usable items.voidselectItem(String selection) Selects an item by its client string representation.voidselectItems(String... selection) Selects multiple items by client string representation.voidselectItems(Collection<String> selection) Selects multiple items by client string representation.voidupdateSelection(Collection<String> selection, BiConsumer<Collection<V>, Collection<V>> updater) Methods inherited from class com.vaadin.testbench.unit.ComponentTester
ensureComponentIsUsable, ensureComponentIsUsable, ensureVisible, ensureVisible, find, findAllByQuery, findByQuery, fireDomEvent, fireDomEvent, fireDomEvent, getComponent, getField, getField, getMethod, getMethod, isUsable, notUsableReasons, roundTrip, setModal, setValueAsUserMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.testbench.unit.Clickable
click, click, click, middleClick, middleClick, rightClick, rightClick
-
Constructor Details
-
CheckboxGroupTester
Wrap given component for testing.- Parameters:
component- target component
-
-
Method Details
-
isUsable
public boolean isUsable()Description copied from class:ComponentTesterValidate that component can be interacted with and should be visible in the UI. Subclasses overriding this method should also overrideComponentTester.notUsableReasons(Consumer)to provide additional details to the potential exception thrown byComponentTester.ensureComponentIsUsable().- Overrides:
isUsablein classComponentTester<T extends CheckboxGroup<V>>- Returns:
trueif component can be interacted with by the user- See Also:
-
notUsableReasons
Description copied from class:ComponentTesterProvides messages explaining why the component is actually not usable. Subclasses overridingComponentTester.isUsable()should also override this method to provide additional details to the potential exception throw byComponentTester.ensureComponentIsUsable().- Overrides:
notUsableReasonsin classComponentTester<T extends CheckboxGroup<V>>- See Also:
-
selectItem
Selects an item by its client string representation.- Parameters:
selection- item string representation
-
selectItems
Selects multiple items by client string representation.- Parameters:
selection- items string representation
-
selectItems
Selects multiple items by client string representation.- Parameters:
selection- items string representation
-
selectAll
public void selectAll()Selects all client usable items. -
deselectItem
Deselects an item by its client string representation.- Parameters:
selection- item string representation
-
deselectItems
Deselects multiple items by client string representation.- Parameters:
selection- items string representation
-
deselectItems
Deselects items by client string representation.- Parameters:
selection- items string representation
-
deselectAll
public void deselectAll()Deselects all client usable items. -
getSelected
Get the list of currently selected items.- Returns:
- current selection, or an empty list. Never null.
-
updateSelection
public void updateSelection(Collection<String> selection, BiConsumer<Collection<V>, Collection<V>> updater)
-