Skip to content

Commit

Permalink
update to require Selenium 4
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Oct 18, 2021
1 parent 2db764b commit a9a56b7
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 91 deletions.
56 changes: 2 additions & 54 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,67 +20,15 @@ jobs:
- name: Run rubocop
run: bundle exec rake rubocop

test-selenium-v3:
name: Selenium 3.142.7 Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15, windows-2019]
env:
BUNDLE_GEMFILE: gemfiles/Gemfile.cur
steps:
- name: Cancel any previous run(s) on new commit push
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Run tests
run: bundle exec rake spec

test-selenium-old:
name: Selenium 3.142.0 Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15, windows-2019]
env:
BUNDLE_GEMFILE: gemfiles/Gemfile.old
steps:
- name: Cancel any previous run(s) on new commit push
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Run tests
run: bundle exec rake spec

test-selenium-v4:
name: Selenium 4 Tests
test-selenium:
name: Selenium Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15, windows-2019]
ruby-version: [2.6, 2.7, 3.0, jruby]
env:
BUNDLE_GEMFILE: gemfiles/Gemfile.new # Uses Selenium v4 for Edge (Chromium)
steps:
- name: Cancel any previous run(s) on new commit push
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
7 changes: 0 additions & 7 deletions gemfiles/Gemfile.cur

This file was deleted.

7 changes: 0 additions & 7 deletions gemfiles/Gemfile.new

This file was deleted.

7 changes: 0 additions & 7 deletions gemfiles/Gemfile.old

This file was deleted.

8 changes: 1 addition & 7 deletions spec/webdrivers/edge_finder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
describe Webdrivers::EdgeFinder do
let(:edge_finder) { described_class }

before(:all) do # rubocop:disable RSpec/BeforeAfterAll
if Selenium::WebDriver::VERSION[0].to_i < 4
skip 'The current selenium-webdriver does not include Chromium based Edge support'
elsif Webdrivers::System.platform == 'linux'
skip 'Edge is not yet supported on Linux'
end
end
before { skip 'Edge is not yet supported on Linux' if Webdrivers::System.platform == 'linux' }

context 'when the user relies on the gem to figure out the location of Edge' do
it 'determines the location correctly based on the current OS' do
Expand Down
11 changes: 3 additions & 8 deletions spec/webdrivers/edgedriver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@
describe Webdrivers::Edgedriver do
let(:edgedriver) { described_class }

before(:all) do # rubocop:disable RSpec/BeforeAfterAll
if Selenium::WebDriver::VERSION[0].to_i < 4
skip 'The current selenium-webdriver does not include Chromium based Edge support'
elsif Webdrivers::System.platform == 'linux'
skip 'Edge is not yet supported on Linux'
end
before do
skip 'Edge is not yet supported on Linux' if Webdrivers::System.platform == 'linux'
edgedriver.remove
end

before { edgedriver.remove }

describe '#update' do
context 'when evaluating #correct_binary?' do
it 'does not download when latest version and current version match' do
Expand Down
2 changes: 1 addition & 1 deletion webdrivers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ Gem::Specification.new do |s|

s.add_runtime_dependency 'nokogiri', '~> 1.6'
s.add_runtime_dependency 'rubyzip', '>= 1.3.0'
s.add_runtime_dependency 'selenium-webdriver', '> 3.141', '< 5.0'
s.add_runtime_dependency 'selenium-webdriver', '~> 4.0'
end

0 comments on commit a9a56b7

Please sign in to comment.