1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Merge pull request #1749 from twalpole/selenium_webdriver_master

build latest selenium-webdriver gem and use for marionette tests
This commit is contained in:
Thomas Walpole 2016-09-01 11:58:48 -07:00 committed by GitHub
commit 6a48d07618
3 changed files with 17 additions and 6 deletions

View file

@ -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

View file

@ -5,6 +5,8 @@ gemspec :path => '..'
gem 'xpath', github: 'jnicklas/xpath'
git 'https://github.com/SeleniumHQ/selenium.git' do
gem 'selenium-webdriver'
end
gem 'selenium-webdriver', :path => '../../selenium/build/rb'
# git 'https://github.com/SeleniumHQ/selenium.git' do
# gem 'selenium-webdriver'
# end
# gem 'selenium-webdriver'

View file

@ -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