From cd0dac5cd2f444434b788bb880b4ec4992c89e1f Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Wed, 5 Jul 2023 11:02:46 +1000 Subject: [PATCH] DEV: Add some modal PageObject open/closed assertions (#22425) --- spec/system/page_objects/modals/base.rb | 8 ++++++++ 1 file changed, 8 insertions(+) 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