Class UiTestIdUtil

java.lang.Object
io.jmix.flowui.sys.UiTestIdUtil

public final class UiTestIdUtil extends Object
Utility class for generating and normalizing a UI test ID.
  • Method Details

    • getNormalizedTestId

      public static String getNormalizedTestId(com.vaadin.flow.component.Component component)
      Parameters:
      component - component to normalize UI test ID
      Returns:
      uncapitalized UI test ID without whitespaces with a component class name as a suffix
    • getNormalizedTestId

      public static String getNormalizedTestId(String id, com.vaadin.flow.component.Component component)
      Parameters:
      id - UI test ID
      component - component to normalize UI test ID
      Returns:
      uncapitalized UI test ID without whitespaces with a component class name as a suffix
    • getCalculatedTestId

      @Nullable public static String getCalculatedTestId(ValueSource<?> valueSource)
      Computes the UI test ID for a UI component based on its ValueSource.
      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 its DataUnit.
      Parameters:
      dataUnit - UI component data unit
      component - UI component for computing ID suffix
      Returns:
      computed UI test ID