spec/support/common.rb in camaleon_cms-2.4.5.8 vs spec/support/common.rb in camaleon_cms-2.4.5.9

- old
+ new

@@ -26,12 +26,10 @@ def cama_root_relative_path "#{PluginRoutes.system_info["relative_url_root"]}" if PluginRoutes.system_info["relative_url_root"].present? end -# open file manager modal and upload a new file -# TODO def file_select attach_file("Select files to upload", "/Users/owen/Pictures/luna\ miel/DSC00116.JPG ") end def eval_code(code) @@ -107,14 +105,15 @@ end def confirm_dialog if page.driver.class.to_s == 'Capybara::Selenium::Driver' page.driver.browser.switch_to.alert.accept - elsif page.driver.class.to_s == 'Capybara::Poltergeist::Driver' - elsif page.driver.class.to_s == 'Capybara::Webkit::Driver' sleep 1 # prevent test from failing by waiting for popup - page.driver.browser.accept_js_confirms + + silence_warnings do + page.driver.accept_js_confirms! + end else raise "Unsupported driver" end end