summaryrefslogtreecommitdiff
path: root/features/support/capybara_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'features/support/capybara_helpers.rb')
-rw-r--r--features/support/capybara_helpers.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/features/support/capybara_helpers.rb b/features/support/capybara_helpers.rb
new file mode 100644
index 00000000000..647f8d087c3
--- /dev/null
+++ b/features/support/capybara_helpers.rb
@@ -0,0 +1,10 @@
+module CapybaraHelpers
+ def confirm_modal_if_present
+ if Capybara.current_driver == Capybara.javascript_driver
+ accept_confirm { yield }
+ return
+ end
+
+ yield
+ end
+end