Class ConfirmDialogTester
java.lang.Object
com.vaadin.testbench.unit.ComponentTester<ConfirmDialog>
com.vaadin.flow.component.confirmdialog.ConfirmDialogTester
Tester for ConfirmDialog.
-
Constructor Summary
ConstructorsConstructorDescriptionConfirmDialogTester
(ConfirmDialog component) Wrap given component for testing. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Click cancel button.void
confirm()
Click the confirm button.Get the header of the confirm dialog.Get the header element set to the confirm dialog.getText()
Get the confirmation message text set to the component.void
open()
void
reject()
Click reject button.Methods inherited from class com.vaadin.testbench.unit.ComponentTester
ensureComponentIsUsable, ensureComponentIsUsable, ensureVisible, ensureVisible, find, findAllByQuery, findByQuery, fireDomEvent, fireDomEvent, fireDomEvent, getComponent, getField, getField, getMethod, getMethod, isUsable, isUsable, notUsableReasons, notUsableReasons, roundTrip, setModal
-
Constructor Details
-
ConfirmDialogTester
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
Get the confirmation message text set to the component.- Returns:
- confirmation message
-
getHeader
Get the header of the confirm dialog.- Returns:
- current header of dialog
-
getHeaderElement
Get the header element set to the confirm dialog.- Returns:
- header element
- Throws:
NoSuchElementException
- if no header element found
-