diff --git a/src/org/labkey/test/components/bootstrap/ModalDialog.java b/src/org/labkey/test/components/bootstrap/ModalDialog.java index dd970afa2c..cd0008c7e2 100644 --- a/src/org/labkey/test/components/bootstrap/ModalDialog.java +++ b/src/org/labkey/test/components/bootstrap/ModalDialog.java @@ -121,6 +121,11 @@ public void dismiss(String buttonText, Integer waitSeconds) waitForClose(waitSeconds); } + public boolean isDismissEnabled(String buttonText) + { + return Locators.dismissButton(buttonText).findElement(getComponentElement()).isEnabled(); + } + protected void waitForClose() { waitForClose(10); diff --git a/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java b/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java index ef8e8f9918..8a869f2eb4 100644 --- a/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java +++ b/src/org/labkey/test/components/ui/DeleteConfirmationDialog.java @@ -63,6 +63,11 @@ public ConfirmPage confirmDelete(Integer waitSeconds) return _confirmPageSupplier.get(); } + public Boolean isDeleteEnabled() + { + return isDismissEnabled("Yes, Delete"); + } + public ConfirmPage confirmPermanentlyDelete() { return confirmPermanentlyDelete(10);