Class MasterDetailLayoutTester

  • All Implemented Interfaces:
    com.vaadin.browserless.Clickable

    
    public class MasterDetailLayoutTester<T extends MasterDetailLayout>
    extends ComponentTester<T>
                        

    Tester for MasterDetailLayout components.

    Provides access to the state of the layout as a user would observe it: the component shown in the master area, the component shown in the detail area, and the detail placeholder that is displayed when no detail content is set.

    Since:

    1.1

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final T component
    • Constructor Summary

      Constructors 
      Constructor Description
      MasterDetailLayoutTester(T component) Wrap given component for testing.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Component getMaster() Gets the component currently shown in the master area.
      Component getDetail() Gets the component currently shown in the detail area.
      Component getDetailPlaceholder() Gets the placeholder component currently shown in the detail area.
      boolean isDetailPlaceholderVisible() Checks whether the detail placeholder is currently shown to the user.
      • Methods inherited from class com.vaadin.browserless.ComponentTester

        ensureComponentIsUsable, find, getComponent, isUsable, 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

      • MasterDetailLayoutTester

        MasterDetailLayoutTester(T component)

        Wrap given component for testing.

        Parameters:
        component - target component
    • Method Detail

      • getMaster

        @Nullable() Component getMaster()

        Gets the component currently shown in the master area.

        Returns:

        the component in the master area, or null if there is no component in the master area

      • getDetail

        @Nullable() Component getDetail()

        Gets the component currently shown in the detail area.

        Returns:

        the component in the detail area, or null if no detail content is set

      • getDetailPlaceholder

        @Nullable() Component getDetailPlaceholder()

        Gets the placeholder component currently shown in the detail area. The placeholder is only shown to the user while no detail content is set.

        Returns:

        the placeholder component shown in the detail area, or null if no placeholder is set

      • isDetailPlaceholderVisible

         boolean isDetailPlaceholderVisible()

        Checks whether the detail placeholder is currently shown to the user. A placeholder is shown when one is set and there is no detail content.

        Returns:

        true if the placeholder is shown, false otherwise