Skip to content

A platform for community discussion. Free, open, simple.

DEV: Add some modal PageObject open/closed assertions (#22425)

Martin Brennancd0dac5cd2f4
diff --git a/spec/system/page_objects/modals/base.rb b/spec/system/page_objects/modals/base.rb
index 5d8e68996fa..dbd6cb1622b 100644
--- a/spec/system/page_objects/modals/base.rb
+++ b/spec/system/page_objects/modals/base.rb
@@ -21,6 +21,14 @@ module PageObjects
def click_primary_button
find(".modal-footer .btn-primary").click
end
+
+ def open?
+ has_css?(".modal.d-modal")
+ end
+
+ def closed?
+ has_no_css?(".modal.d-modal")
+ end
end
end
end