com.vaadin.flow.component.checkbox.
Class CheckboxTester<T extends Checkbox>
Type Parameters:
T
- component type
Tester for Checkbox components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
click()
If the component is usable, send click to component as if it was from the client.
boolean
isUsable()
Validate that component can be interacted with and should be visible in the UI.
protected void
notUsableReasons
(Consumer<String> collector) Provides messages explaining why the component is actually not usable.
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
-
Constructor Details
-
CheckboxTester
Wrap given component for testing.
Parameters:
component
- target component
-
-
Method Details
-
isUsable
public boolean isUsable()Description copied from class:
ComponentTester
Validate that component can be interacted with and should be visible in the UI. Subclasses overriding this method should also override
ComponentTester.notUsableReasons(Consumer)
to provide additional details to the potential exception thrown byComponentTester.ensureComponentIsUsable()
.Overrides:
isUsable
in classComponentTester<T extends Checkbox>
Returns:
true
if component can be interacted with by the userSee Also:
-
notUsableReasons
Description copied from class:
ComponentTester
Provides messages explaining why the component is actually not usable. Subclasses overriding
ComponentTester.isUsable()
should also override this method to provide additional details to the potential exception throw byComponentTester.ensureComponentIsUsable()
.Overrides:
notUsableReasons
in classComponentTester<T extends Checkbox>
See Also:
-
click
public void click()If the component is usable, send click to component as if it was from the client. Checkbox status changes from unchecked to checked or vice versa.
-