Skip to content

Commit

Permalink
Remove Firefox nightly tests from Ruby
Browse files Browse the repository at this point in the history
All the specs now work with regular Firefox so there is no point in
keeping nightly
  • Loading branch information
p0deje committed Sep 19, 2017
1 parent ba04547 commit 72c9dc2
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 59 deletions.
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ matrix:
- env: MARIONETTE=1 TASK=//rb:firefox-test
<<: *ruby
<<: *firefox-latest
- env: MARIONETTE=1 TASK=//rb:ff-nightly-test
<<: *ruby
<<: *firefox-nightly
- env: TASK=//rb:ff-esr-test
<<: *ruby
<<: *firefox-esr
Expand All @@ -169,9 +166,6 @@ matrix:
- env: MARIONETTE=1 TASK=//rb:remote-firefox-test
<<: *ruby
<<: *firefox-latest
- env: MARIONETTE=1 TASK=//rb:remote-ff-nightly-test
<<: *ruby
<<: *firefox-nightly
- env: TASK=//rb:remote-ff-esr-test
<<: *ruby
<<: *firefox-esr
Expand Down
2 changes: 0 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ task :test_rb_local => [
"//rb:firefox-test",
"//rb:phantomjs-test",
("//rb:ff-esr-test" if ENV['FF_ESR_BINARY']),
("//rb:ff-nightly-test" if ENV['FF_NIGHTLY_BINARY']),
("//rb:safari-preview-test" if mac?),
("//rb:safari-test" if mac?),
("//rb:ie-test" if windows?),
Expand All @@ -282,7 +281,6 @@ task :test_rb_remote => [
"//rb:remote-firefox-test",
"//rb:remote-phantomjs-test",
("//rb:remote-ff-esr-test" if ENV['FF_ESR_BINARY']),
("//rb:remote-ff-nightly-test" if ENV['FF_NIGHTLY_BINARY']),
("//rb:remote-safari-preview-test" if mac?),
("//rb:remote-safari-test" if mac?),
("//rb:remote-ie-test" if windows?),
Expand Down
22 changes: 0 additions & 22 deletions rb/build.desc
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,6 @@ ruby_library(name = "firefox",
deps = [":common"]
)

ruby_test(name = "ff-nightly",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
"spec/integration/selenium/webdriver/firefox/**/*_spec.rb"
],
include = ["rb/spec/integration", "build/rb/lib"],
deps = [":firefox"]
)

ruby_test(name = "firefox",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
Expand Down Expand Up @@ -218,19 +209,6 @@ ruby_test(name = "remote-ff-esr",
]
)

ruby_test(name = "remote-ff-nightly",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
"spec/integration/selenium/webdriver/firefox/**/*_spec.rb",
"spec/integration/selenium/webdriver/remote/**/*_spec.rb"
],
include = ["rb/spec/integration", "build/rb/lib"],
deps = [
":remote",
":firefox"
]
)

ruby_test(name = "remote-firefox",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
Expand Down
8 changes: 4 additions & 4 deletions rb/spec/integration/selenium/webdriver/action_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module WebDriver
end

# https://github.com/mozilla/geckodriver/issues/646
it 'can send keys with shift pressed', except: {browser: %i[firefox ff_nightly]} do
it 'can send keys with shift pressed', except: {browser: :firefox} do
driver.navigate.to url_for('javascriptPage.html')

event_input = driver.find_element(id: 'theworks')
Expand Down Expand Up @@ -103,7 +103,7 @@ module WebDriver
expect(input.attribute(:value)).to eq('abcd')
end

it 'can release pressed keys via release action', only: {browser: %i[firefox ff_nightly]} do
it 'can release pressed keys via release action', only: {browser: :firefox} do
driver.navigate.to url_for('javascriptPage.html')

event_input = driver.find_element(id: 'theworks')
Expand Down Expand Up @@ -146,7 +146,7 @@ module WebDriver
end

# Pending bug with Firefox
it 'double clicks an element', except: {browser: %i[firefox ff_nightly]} do
it 'double clicks an element', except: {browser: :firefox} do
driver.navigate.to url_for('javascriptPage.html')
element = driver.find_element(id: 'doubleClickField')

Expand All @@ -162,7 +162,7 @@ module WebDriver
expect(element.attribute(:value)).to eq('ContextClicked')
end

it 'can release pressed buttons via release action', only: {browser: %i[firefox ff_nightly]} do
it 'can release pressed buttons via release action', only: {browser: :firefox} do
driver.navigate.to url_for('javascriptPage.html')

event_input = driver.find_element(id: 'clickField')
Expand Down
2 changes: 1 addition & 1 deletion rb/spec/integration/selenium/webdriver/element_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module WebDriver
.to raise_error(Selenium::WebDriver::Error::UnknownError, error)
end

it 'should not raise if element is only partially covered', only: {browser: %i[firefox ff_esr ff_nightly]} do
it 'should not raise if element is only partially covered', only: {browser: %i[firefox ff_esr]} do
driver.navigate.to url_for('click_tests/overlapping_elements.html')
expect { driver.find_element(id: 'other_contents').click }.not_to raise_error
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

module Selenium
module WebDriver
describe Firefox, only: {browser: %i[ff_esr firefox ff_nightly]} do
describe Firefox, only: {browser: %i[ff_esr firefox]} do
it 'creates default capabilities (W3C)', except: {browser: :ff_esr} do
create_driver! do |driver|
caps = driver.capabilities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
module Selenium
module WebDriver
module Firefox
describe Profile, only: {browser: %i[ff_esr firefox ff_nightly]} do
describe Profile, only: {browser: %i[ff_esr firefox]} do
let(:profile) { Profile.new }

def read_generated_prefs(from = nil)
Expand Down
2 changes: 1 addition & 1 deletion rb/spec/integration/selenium/webdriver/keyboard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
module Selenium
module WebDriver
# Firefox - "Actions Endpoint Not Yet Implemented"
describe Keyboard, except: {browser: %i[safari ff_nightly firefox ie]} do
describe Keyboard, except: {browser: %i[safari firefox ie]} do
after { reset_driver! }

# Edge - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8339952
Expand Down
2 changes: 1 addition & 1 deletion rb/spec/integration/selenium/webdriver/mouse_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
module Selenium
module WebDriver
# Firefox - "Actions Endpoint Not Yet Implemented"
describe Mouse, except: {browser: %i[safari ff_nightly firefox ie]} do
describe Mouse, except: {browser: %i[safari firefox ie]} do
after { reset_driver! }

it 'clicks an element' do
Expand Down
6 changes: 5 additions & 1 deletion rb/spec/integration/selenium/webdriver/options_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
module Selenium
module WebDriver
describe Options, except: {browser: :safari} do
describe 'logs', except: {browser: %i[firefox ie edge ff_nightly]} do
describe 'logs', except: {browser: %i[firefox ie edge]} do
it 'can fetch remote log types', only: {driver: :remote}, except: {browser: :phantomjs} do
expect(driver.manage.logs.available_types).to include(:server, :browser, :driver)
end
Expand All @@ -39,8 +39,12 @@ module WebDriver
expect(driver.manage.logs.available_types).to include(:browser, :har)
end

<<<<<<< HEAD
# TODO (Alex): Investigate why this spec passes on macOS but fails on Linux.
it 'can get the browser log', only: {browser: %i[firefox ff_esr]}, except: {browser: :chrome, platform: :linux} do
=======
it 'can get the browser log', only: {browser: %i[chrome firefox ff_esr]} do
>>>>>>> 22c3012045... Remove Firefox nightly tests from Ruby
driver.navigate.to url_for('simpleTest.html')

entries = driver.manage.logs.get(:browser)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,6 @@ def remote_capabilities
opt[:firefox_binary] = ENV['FF_ESR_BINARY']
opt[:marionette] = false
:firefox
when :ff_nightly
unless ENV['FF_NIGHTLY_BINARY']
raise DriverInstantiationError, "ENV['FF_NIGHTLY_BINARY'] must be set to test Firefox Nightly"
end
opt[:firefox_binary] = ENV['FF_NIGHTLY_BINARY']
:firefox
when :safari_preview
opt["safari.options"] = {'technologyPreview' => true}
:safari
Expand Down Expand Up @@ -252,15 +246,6 @@ def create_ie_driver(opt = {})
WebDriver::Driver.for :ie, opt
end

def create_ff_nightly_driver(opt = {})
unless ENV['FF_NIGHTLY_BINARY']
raise StandardError, "ENV['FF_NIGHTLY_BINARY'] must be set to test Nightly Firefox"
end
WebDriver::Firefox::Binary.path = ENV['FF_NIGHTLY_BINARY']
opt[:marionette] = true
WebDriver::Driver.for :firefox, opt
end

def create_chrome_driver(opt = {})
binary = ENV['CHROME_BINARY']
WebDriver::Chrome.path = binary if binary
Expand Down
2 changes: 1 addition & 1 deletion rb/spec/integration/selenium/webdriver/storage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
module Selenium
module WebDriver
module DriverExtensions
describe HasWebStorage, only: {browser: %i[chrome firefox ff_nightly]} do
describe HasWebStorage, only: {browser: %i[chrome firefox]} do
shared_examples_for 'web storage' do
before do
driver.navigate.to url_for('clicks.html')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

module Selenium
module WebDriver
describe W3CActionBuilder, only: {browser: %i[firefox ff_nightly]} do
describe W3CActionBuilder, only: {browser: :firefox} do
after do
if driver.action.respond_to?(:clear_all_actions)
driver.action.clear_all_actions
Expand Down Expand Up @@ -50,7 +50,7 @@ module WebDriver
end # Key actions

describe 'Pointer actions' do
it 'can release pressed buttons via release action', except: {browser: :ff_nightly} do
it 'can release pressed buttons via release action' do
driver.navigate.to url_for('javascriptPage.html')

event_input = driver.find_element(id: 'clickField')
Expand Down
2 changes: 1 addition & 1 deletion rb/spec/integration/selenium/webdriver/window_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module WebDriver
expect(new_pos.y).to eq(target_y)
end

context 'window rect', only: {browser: %i[firefox ff_nightly]} do
context 'window rect', only: {browser: :firefox} do
it 'gets the rect of the current window' do
rect = driver.manage.window.rect

Expand Down

0 comments on commit 72c9dc2

Please sign in to comment.