-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix removed
Selenium::WebDriver::Remote::Capabilities.firefox
method (
#336)
- Loading branch information
1 parent
5b83967
commit 33ca869
Showing
2 changed files
with
59 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,61 @@ | ||
require 'spec_helper' | ||
|
||
describe 'Capybara drivers', type: :feature, js: true do | ||
it 'allows HTTPS calls' do | ||
proxy.stub('https://blog.howmanyleft.co.uk:443/api/read/json').and_return( | ||
jsonp: { | ||
posts: [ | ||
{ | ||
'regular-title' => 'News Item 1', | ||
'url-with-slug' => 'http://example.com/news/1', | ||
'regular-body' => 'News item 1 content here' | ||
}, | ||
{ | ||
'regular-title' => 'News Item 2', | ||
'url-with-slug' => 'http://example.com/news/2', | ||
'regular-body' => 'News item 2 content here' | ||
} | ||
] | ||
}) | ||
|
||
visit '/tumblr_api_https.html' | ||
|
||
expect(page).to have_link('News Item 1', href: 'http://example.com/news/1') | ||
expect(page).to have_content('News item 1 content here') | ||
expect(page).to have_link('News Item 2', href: 'http://example.com/news/2') | ||
expect(page).to have_content('News item 2 content here') | ||
context "using selenium chrome headless billy driver" do | ||
before { Capybara.current_driver = :selenium_chrome_headless_billy } | ||
|
||
it 'allows HTTPS calls' do | ||
proxy.stub('https://blog.howmanyleft.co.uk:443/api/read/json').and_return( | ||
jsonp: { | ||
posts: [ | ||
{ | ||
'regular-title' => 'News Item 1', | ||
'url-with-slug' => 'http://example.com/news/1', | ||
'regular-body' => 'News item 1 content here' | ||
}, | ||
{ | ||
'regular-title' => 'News Item 2', | ||
'url-with-slug' => 'http://example.com/news/2', | ||
'regular-body' => 'News item 2 content here' | ||
} | ||
] | ||
}) | ||
|
||
visit '/tumblr_api_https.html' | ||
|
||
expect(page).to have_link('News Item 1', href: 'http://example.com/news/1') | ||
expect(page).to have_content('News item 1 content here') | ||
expect(page).to have_link('News Item 2', href: 'http://example.com/news/2') | ||
expect(page).to have_content('News item 2 content here') | ||
end | ||
end | ||
|
||
context "using selenium headless billy driver" do | ||
before { Capybara.current_driver = :selenium_headless_billy } | ||
|
||
it 'allows HTTPS calls' do | ||
proxy.stub('https://blog.howmanyleft.co.uk:443/api/read/json').and_return( | ||
jsonp: { | ||
posts: [ | ||
{ | ||
'regular-title' => 'News Item 1', | ||
'url-with-slug' => 'http://example.com/news/1', | ||
'regular-body' => 'News item 1 content here' | ||
}, | ||
{ | ||
'regular-title' => 'News Item 2', | ||
'url-with-slug' => 'http://example.com/news/2', | ||
'regular-body' => 'News item 2 content here' | ||
} | ||
] | ||
}) | ||
|
||
visit '/tumblr_api_https.html' | ||
|
||
expect(page).to have_link('News Item 1', href: 'http://example.com/news/1') | ||
expect(page).to have_content('News item 1 content here') | ||
expect(page).to have_link('News Item 2', href: 'http://example.com/news/2') | ||
expect(page).to have_content('News item 2 content here') | ||
end | ||
end | ||
end |