forked from teamcapybara/capybara
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update testing and travis matrix for selenium-webdriver 3.0 release
- Loading branch information
Showing
16 changed files
with
153 additions
and
60 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
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
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
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
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,9 +1,12 @@ | ||
# frozen_string_literal: true | ||
require 'spec_helper' | ||
require 'selenium-webdriver' | ||
|
||
RSpec.describe Capybara::Selenium::Driver do | ||
it "should exit with a non-zero exit status" do | ||
browser = Capybara::Selenium::Driver.new(TestApp, browser: (ENV['SELENIUM_BROWSER'] || :firefox).to_sym).browser | ||
options = { browser: (ENV['SELENIUM_BROWSER'] || :firefox).to_sym } | ||
options[:desired_capabilities] = Selenium::WebDriver::Remote::Capabilities.firefox(marionette: false) if ENV['LEGACY_FIREFOX'] | ||
browser = Capybara::Selenium::Driver.new(TestApp, options).browser | ||
expect(true).to eq(false) | ||
end | ||
end |
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,9 +1,12 @@ | ||
# frozen_string_literal: true | ||
require 'spec_helper' | ||
require 'selenium-webdriver' | ||
|
||
RSpec.describe Capybara::Selenium::Driver do | ||
it "should exit with a zero exit status" do | ||
browser = Capybara::Selenium::Driver.new(TestApp, browser: (ENV['SELENIUM_BROWSER'] || :firefox).to_sym).browser | ||
options = { browser: (ENV['SELENIUM_BROWSER'] || :firefox).to_sym } | ||
options[:desired_capabilities] = Selenium::WebDriver::Remote::Capabilities.firefox(marionette: false) if ENV['LEGACY_FIREFOX'] | ||
browser = Capybara::Selenium::Driver.new(TestApp, options ).browser | ||
expect(true).to eq(true) | ||
end | ||
end |
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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# frozen_string_literal: true | ||
require 'spec_helper' | ||
require "selenium-webdriver" | ||
require 'shared_selenium_session' | ||
require 'rspec/shared_spec_matchers' | ||
|
||
Capybara.register_driver :selenium_marionette do |app| | ||
Capybara::Selenium::Driver.new( | ||
app, | ||
browser: :firefox, | ||
desired_capabilities: Selenium::WebDriver::Remote::Capabilities.firefox(marionette: true) | ||
) | ||
end | ||
|
||
module TestSessions | ||
SeleniumMarionette = Capybara::Session.new(:selenium_marionette, TestApp) | ||
end | ||
|
||
skipped_tests = [ | ||
:response_headers, | ||
:status_code, | ||
:trigger | ||
] | ||
skipped_tests << :windows if ENV['TRAVIS'] && !ENV['WINDOW_TEST'] | ||
|
||
Capybara::SpecHelper.run_specs TestSessions::SeleniumMarionette, "selenium", capybara_skip: skipped_tests | ||
|
||
RSpec.describe "Capybara::Session with firefox" do | ||
include_examples "Capybara::Session", TestSessions::SeleniumMarionette, :selenium_marionette | ||
include_examples Capybara::RSpecMatchers, TestSessions::SeleniumMarionette, :selenium_marionette | ||
end | ||
|
||
RSpec.describe Capybara::Selenium::Driver do | ||
before do | ||
@driver = Capybara::Selenium::Driver.new(TestApp, browser: :firefox) | ||
end | ||
|
||
describe '#quit' do | ||
it "should reset browser when quit" do | ||
expect(@driver.browser).to be | ||
@driver.quit | ||
#access instance variable directly so we don't create a new browser instance | ||
expect(@driver.instance_variable_get(:@browser)).to be_nil | ||
end | ||
end | ||
end | ||
|
Oops, something went wrong.