mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
FF 59 breaks unload modal handling ability
This commit is contained in:
parent
78aebdc0ab
commit
c5bde07437
2 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,7 @@ Capybara::SpecHelper.spec '#reset_session!' do
|
|||
end
|
||||
|
||||
it "handles modals during unload", requires: [:modals] do
|
||||
skip "FF 59 breaks unload modal handling" if marionette_gte?(59, @session)
|
||||
@session.visit('/with_unload_alert')
|
||||
expect(@session).to have_selector(:css, 'div')
|
||||
expect { @session.reset_session! }.not_to raise_error
|
||||
|
@ -47,6 +48,7 @@ Capybara::SpecHelper.spec '#reset_session!' do
|
|||
end
|
||||
|
||||
it "handles already open modals", requires: [:modals] do
|
||||
skip "FF 59 breaks unload modal handling" if marionette_gte?(59, @session)
|
||||
@session.visit('/with_unload_alert')
|
||||
@session.click_link('Go away')
|
||||
expect { @session.reset_session! }.not_to raise_error
|
||||
|
|
|
@ -112,6 +112,10 @@ module Capybara
|
|||
def marionette_lt?(version, session)
|
||||
marionette?(session) && (session.driver.browser.capabilities[:browser_version].to_f < version)
|
||||
end
|
||||
|
||||
def marionette_gte?(version, session)
|
||||
marionette?(session) && (session.driver.browser.capabilities[:browser_version].to_f >= version)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue