Class ConfirmDialogTester

java.lang.Object
com.vaadin.testbench.unit.ComponentTester<ConfirmDialog>
com.vaadin.flow.component.confirmdialog.ConfirmDialogTester

public class ConfirmDialogTester extends ComponentTester<ConfirmDialog>
Tester for ConfirmDialog.
  • Constructor Details

    • ConfirmDialogTester

      public ConfirmDialogTester(ConfirmDialog component)
      Wrap given component for testing.
      Parameters:
      component - target component
  • Method Details

    • open

      public void open()
    • confirm

      public void confirm()
      Click the confirm button.
    • cancel

      public void cancel()
      Click cancel button.
      Throws:
      IllegalStateException - when cancel button is not enabled
    • reject

      public void reject()
      Click reject button.
      Throws:
      IllegalStateException - when reject button is not enabled
    • getText

      public String getText()
      Get the confirmation message text set to the component.
      Returns:
      confirmation message
    • getHeader

      public String getHeader()
      Get the header of the confirm dialog.
      Returns:
      current header of dialog
    • getHeaderElement

      public Element getHeaderElement()
      Get the header element set to the confirm dialog.
      Returns:
      header element
      Throws:
      NoSuchElementException - if no header element found