Package com.vaadin.flow.component
Class TextTester
-
- All Implemented Interfaces:
-
com.vaadin.browserless.Clickable
public class TextTester<T extends Text> extends ComponentTester<T>
Tester for Text components.
Text renders as a text node rather than an HTML element, so it has no visibility or enabled state of its own (isVisible throws, and a text node cannot be disabled). Usability is therefore derived from the component being attached and from the effective visibility of its parent subtree.
-
-
Constructor Summary
Constructors Constructor Description TextTester(T component)Wrap given component for testing.
-
Method Summary
Modifier and Type Method Description StringgetText()Gets the text of the component. booleanisUsable()Validate that component can be interacted with and should be visible in the UI. -
Methods inherited from class com.vaadin.browserless.ComponentTester
ensureComponentIsUsable, find, getComponent, setModal -
Methods inherited from class com.vaadin.browserless.Clickable
click, click, click, middleClick, middleClick, rightClick, rightClick -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
TextTester
TextTester(T component)
Wrap given component for testing.
- Parameters:
component- target component
-
-
Method Detail
-
isUsable
boolean isUsable()
Validate that component can be interacted with and should be visible in the UI. Subclasses overriding this method should also override notUsableReasons to provide additional details to the potential exception thrown by ensureComponentIsUsable.
- Returns:
trueif component can be interacted with by the user
-
-
-
-