Package io.jmix.flowui.sys
Class UiTestIdUtil
java.lang.Object
io.jmix.flowui.sys.UiTestIdUtil
Utility class for generating and normalizing a UI test ID.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetCalculatedTestId(DataUnit dataUnit, com.vaadin.flow.component.Component component) Computes the UI test ID for a UI components based on itsDataUnit.static StringgetCalculatedTestId(ValueSource<?> valueSource) Computes the UI test ID for a UI component based on itsValueSource.static StringgetNormalizedTestId(com.vaadin.flow.component.Component component) static StringgetNormalizedTestId(String id, com.vaadin.flow.component.Component component)
-
Method Details
-
getNormalizedTestId
- Parameters:
component- component to normalize UI test ID- Returns:
- uncapitalized UI test ID without whitespaces with a component class name as a suffix
-
getNormalizedTestId
- Parameters:
id- UI test IDcomponent- component to normalize UI test ID- Returns:
- uncapitalized UI test ID without whitespaces with a component class name as a suffix
-
getCalculatedTestId
Computes the UI test ID for a UI component based on itsValueSource.- Parameters:
valueSource- UI component value source- Returns:
- computed UI test ID
-
getCalculatedTestId
@Nullable public static String getCalculatedTestId(DataUnit dataUnit, com.vaadin.flow.component.Component component) Computes the UI test ID for a UI components based on itsDataUnit.- Parameters:
dataUnit- UI component data unitcomponent- UI component for computing ID suffix- Returns:
- computed UI test ID
-