From 40815817f48e1be3280b9b8e3ab77227fdf0a93b Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Thu, 1 Sep 2016 10:30:56 -0700 Subject: [PATCH] build latest selenium-webdriver gem and use for marionette tests --- .travis.yml | 11 ++++++++++- gemfiles/Gemfile.beta-marionette | 8 +++++--- spec/selenium_spec.rb | 4 ++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 66da21f1..553f6a1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,10 @@ matrix: - gemfile: gemfiles/Gemfile.beta-versions rvm: 2.4.0-preview1 - gemfile: gemfiles/Gemfile.beta-marionette - env: GECKODRIVER=true + env: + - GECKODRIVER=true + SELENIUM_BETA=true + rvm: 2.3.1 addons: firefox: latest-beta @@ -62,6 +65,12 @@ before_install: GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v0.10.0/geckodriver-v0.10.0-linux64.tar.gz"; FILE=`mktemp`; wget "$GECKODRIVER_URL" -qO $FILE && tar xz -C ~ -f $FILE geckodriver; rm $FILE; chmod 777 ~/geckodriver; fi + - if [ $SELENIUM_BETA ]; then + cd ..; git clone --depth 1 https://github.com/SeleniumHQ/selenium.git; + cd selenium; ./go //rb:gem:build; + cd ../capybara; + bundle config local.selenium-webdriver $HOME/selenium/build/rb; + fi before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start diff --git a/gemfiles/Gemfile.beta-marionette b/gemfiles/Gemfile.beta-marionette index 2d36fcd9..553e334d 100644 --- a/gemfiles/Gemfile.beta-marionette +++ b/gemfiles/Gemfile.beta-marionette @@ -5,6 +5,8 @@ gemspec :path => '..' gem 'xpath', github: 'jnicklas/xpath' -git 'https://github.com/SeleniumHQ/selenium.git' do - gem 'selenium-webdriver' -end \ No newline at end of file +gem 'selenium-webdriver', :path => '../../selenium/build/rb' +# git 'https://github.com/SeleniumHQ/selenium.git' do +# gem 'selenium-webdriver' +# end +# gem 'selenium-webdriver' \ No newline at end of file diff --git a/spec/selenium_spec.rb b/spec/selenium_spec.rb index c42745bc..5d02661d 100644 --- a/spec/selenium_spec.rb +++ b/spec/selenium_spec.rb @@ -62,12 +62,12 @@ RSpec.describe Capybara::Session do it "should have return code 1 when running selenium_driver_rspec_failure.rb" do `rspec spec/fixtures/selenium_driver_rspec_failure.rb` - expect($?.exitstatus).to be 1 + expect($?.exitstatus).to eq(1) end it "should have return code 0 when running selenium_driver_rspec_success.rb" do `rspec spec/fixtures/selenium_driver_rspec_success.rb` - expect($?.exitstatus).to be 0 + expect($?.exitstatus).to eq(0 end end