Skip to content

Commit

Permalink
rb - un-guard marionette tests
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Mar 14, 2016
1 parent 02cfa9a commit 8527ced
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions rb/spec/integration/selenium/webdriver/firefox/marionette_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,35 +141,33 @@ def restart_remote_server(path = nil)

compliant_on :browser => :marionette do
# These pass in isolation, but can not run in suite due to https://github.com/SeleniumHQ/selenium/issues/1150
not_compliant_on :driver => :remote do
context "when designated firefox binary does not include Marionette" do
let(:message) { /Marionette is not supported in Firefox Version \d\d/ }

before do
unless ENV['PRE_MARIONETTE_BINARY']
pending "Set ENV['PRE_MARIONETTE_BINARY'] to test features on firefox versions without marionette"
end
context "when designated firefox binary does not include Marionette" do
let(:message) { /Marionette is not supported in Firefox Version \d\d/ }

before do
unless ENV['PRE_MARIONETTE_BINARY']
pending "Set ENV['PRE_MARIONETTE_BINARY'] to test features on firefox versions without marionette"
end
end

it "Raises Wires Exception when setting marionette option in capabilities" do
begin
caps = Selenium::WebDriver::Remote::Capabilities.firefox(:marionette => true,
:firefox_binary => ENV['PRE_MARIONETTE_BINARY'])
@opt.merge!(:desired_capabilities => caps)
expect { Selenium::WebDriver.for :firefox, @opt }.to raise_exception Error::WebDriverError, message
ensure
Firefox::Binary.reset_path!
end
it "Raises Wires Exception when setting marionette option in capabilities" do
begin
caps = Selenium::WebDriver::Remote::Capabilities.firefox(:marionette => true,
:firefox_binary => ENV['PRE_MARIONETTE_BINARY'])
@opt.merge!(:desired_capabilities => caps)
expect { Selenium::WebDriver.for :firefox, @opt }.to raise_exception Error::WebDriverError, message
ensure
Firefox::Binary.reset_path!
end
end

it "Raises Wires Exception when setting marionette option in driver initialization" do
begin
caps = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_binary => ENV['PRE_MARIONETTE_BINARY'])
@opt.merge!(:marionette => true, :desired_capabilities => caps)
expect { Selenium::WebDriver.for :firefox, @opt }.to raise_exception Error::WebDriverError, message
ensure
Firefox::Binary.reset_path!
end
it "Raises Wires Exception when setting marionette option in driver initialization" do
begin
caps = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_binary => ENV['PRE_MARIONETTE_BINARY'])
@opt.merge!(:marionette => true, :desired_capabilities => caps)
expect { Selenium::WebDriver.for :firefox, @opt }.to raise_exception Error::WebDriverError, message
ensure
Firefox::Binary.reset_path!
end
end
end
Expand Down

0 comments on commit 8527ced

Please sign in to comment.