mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Fix deprecation warning in tests
This commit is contained in:
parent
97393be2c6
commit
4ceba73d5a
2 changed files with 16 additions and 4 deletions
|
@ -181,15 +181,21 @@ RSpec.describe 'Capybara::Session with chrome' do
|
|||
end
|
||||
|
||||
describe 'log access' do
|
||||
let(:logs) do
|
||||
session.driver.browser.then do |chrome_driver|
|
||||
chrome_driver.respond_to?(:logs) ? chrome_driver : chrome_driver.manage
|
||||
end.logs
|
||||
end
|
||||
|
||||
it 'does not error getting log types' do
|
||||
expect do
|
||||
session.driver.browser.manage.logs.available_types
|
||||
logs.available_types
|
||||
end.not_to raise_error
|
||||
end
|
||||
|
||||
it 'does not error when getting logs' do
|
||||
expect do
|
||||
session.driver.browser.manage.logs.get(:browser)
|
||||
logs.get(:browser)
|
||||
end.not_to raise_error
|
||||
end
|
||||
end
|
||||
|
|
|
@ -76,15 +76,21 @@ RSpec.describe 'Capybara::Session with remote Chrome' do
|
|||
end
|
||||
|
||||
describe 'log access' do
|
||||
let(:logs) do
|
||||
session.driver.browser.then do |chrome_driver|
|
||||
chrome_driver.respond_to?(:logs) ? chrome_driver : chrome_driver.manage
|
||||
end.logs
|
||||
end
|
||||
|
||||
it 'does not error when getting log types' do
|
||||
expect do
|
||||
session.driver.browser.manage.logs.available_types
|
||||
logs.available_types
|
||||
end.not_to raise_error
|
||||
end
|
||||
|
||||
it 'does not error when getting logs' do
|
||||
expect do
|
||||
session.driver.browser.manage.logs.get(:browser)
|
||||
logs.get(:browser)
|
||||
end.not_to raise_error
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue