diff options
author | Stan Hu <stanhu@gmail.com> | 2017-08-21 21:26:51 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-08-21 21:26:51 -0700 |
commit | 7b79ec07278887e31a34a7a2fae7f1af44b8c8e5 (patch) | |
tree | 389f6d0f13e45bb06dc35959ab43ba4f82c19c53 /features/support | |
parent | dda33bd76ad1e26aca133f2dc176900d8a64dafa (diff) | |
download | gitlab-ce-7b79ec07278887e31a34a7a2fae7f1af44b8c8e5.tar.gz |
Fix milestone Spinach tests by confirming modal only if it is present
Diffstat (limited to 'features/support')
-rw-r--r-- | features/support/capybara_helpers.rb | 10 |
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 |