diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ff81f4e7..522b44e5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/gemfiles/Gemfile.cur b/gemfiles/Gemfile.cur deleted file mode 100644 index 115663e6..00000000 --- a/gemfiles/Gemfile.cur +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -source 'https://rubygems.org' - -# Specify your gem's dependencies in webdrivers.gemspec -gemspec path: '..' -gem 'selenium-webdriver', '= 3.142.7' diff --git a/gemfiles/Gemfile.new b/gemfiles/Gemfile.new deleted file mode 100644 index 884a0928..00000000 --- a/gemfiles/Gemfile.new +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -source 'https://rubygems.org' - -# Specify your gem's dependencies in webdrivers.gemspec -gemspec path: '..' -gem 'selenium-webdriver', '= 4.0.0' diff --git a/gemfiles/Gemfile.old b/gemfiles/Gemfile.old deleted file mode 100644 index 5a8a7d82..00000000 --- a/gemfiles/Gemfile.old +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -source 'https://rubygems.org' - -# Specify your gem's dependencies in webdrivers.gemspec -gemspec path: '..' -gem 'selenium-webdriver', '= 3.142.0' diff --git a/spec/webdrivers/edge_finder_spec.rb b/spec/webdrivers/edge_finder_spec.rb index 97af8f59..4715a888 100644 --- a/spec/webdrivers/edge_finder_spec.rb +++ b/spec/webdrivers/edge_finder_spec.rb @@ -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 diff --git a/spec/webdrivers/edgedriver_spec.rb b/spec/webdrivers/edgedriver_spec.rb index e18f2bac..1f58206c 100644 --- a/spec/webdrivers/edgedriver_spec.rb +++ b/spec/webdrivers/edgedriver_spec.rb @@ -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 diff --git a/webdrivers.gemspec b/webdrivers.gemspec index 7a4fe88a..42c8e8c7 100644 --- a/webdrivers.gemspec +++ b/webdrivers.gemspec @@ -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