Class RadioButtonGroupTester<T extends RadioButtonGroup<V>,V>
java.lang.Object
com.vaadin.testbench.unit.ComponentTester<T>
com.vaadin.flow.component.radiobutton.RadioButtonGroupTester<T,V>
- Type Parameters:
T- component typeV- value type
Tester for RadioButtonGroup components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeselects item selection.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.voidselectItem(String selection) Selects an item by its client string representation.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, setValueAsUser
-
Constructor Details
-
RadioButtonGroupTester
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 RadioButtonGroup<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 RadioButtonGroup<V>>- See Also:
-
selectItem
Selects an item by its client string representation.- Parameters:
selection- item string representation
-
deselectItem
public void deselectItem()Deselects item selection. -
getSelected
Get the list of currently selected items.- Returns:
- current selection, or an empty list. Never null.
-