com.vaadin.flow.component.details.

Class DetailsTester<T extends Details>

java.lang.Object
com.vaadin.testbench.unit.ComponentTester<T>
com.vaadin.flow.component.details.DetailsTester<T>

Type Parameters:

T - component type

public class DetailsTester<T extends Details> extends ComponentTester<T>

Tester for Details components.

  • Constructor Details

    • DetailsTester

      public DetailsTester(T component)

      Wrap given component for testing.

      Parameters:

      component - target component

  • Method Details

    • openDetails

      public void openDetails()

      Shows contents as if the summary is clicked on the browser. An exception will be thrown if the details are already open.

      Throws:

      IllegalStateException - if the component is not usable or if the details are already open.

    • closeDetails

      public void closeDetails()

      Hides contents as if the summary is clicked on the browser. An exception will be thrown if the details are not open.

      Throws:

      IllegalStateException - if the component is not usable or if the details are not open.

    • toggleDetails

      public void toggleDetails()

      Toggles details visibility, as if the summary is clicked on the browser.

    • isOpen

      public boolean isOpen()

      Checks if the details are open.

      Returns:

      true if the details are open, otherwise false.