Update selenium to chromedriver

This commit is contained in:
Damian Mooyman 2018-04-12 16:06:49 +12:00
parent 69b2f90c6d
commit 796d69c72e
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
3 changed files with 20 additions and 16 deletions

View File

@ -2,6 +2,10 @@ language: php
dist: trusty dist: trusty
before_install:
- sudo apt-get update
- sudo apt-get install chromium-chromedriver
cache: cache:
directories: directories:
- $HOME/.composer/cache/files - $HOME/.composer/cache/files
@ -10,7 +14,6 @@ addons:
apt: apt:
packages: packages:
- tidy - tidy
firefox: "31.0"
env: env:
global: global:
@ -36,6 +39,9 @@ matrix:
env: NPM_TEST=1 env: NPM_TEST=1
before_script: before_script:
# Extra $PATH
- export PATH=/usr/lib/chromium-browser/:$PATH
# Init PHP # Init PHP
- phpenv rehash - phpenv rehash
- phpenv config-rm xdebug.ini - phpenv config-rm xdebug.ini
@ -44,20 +50,19 @@ before_script:
# Install composer dependencies # Install composer dependencies
- composer validate - composer validate
- composer install --prefer-dist - composer require silverstripe/recipe-testing:^1 silverstripe/recipe-cms 1.0.x-dev --no-update --prefer-dist
- composer require --prefer-dist --no-update silverstripe/recipe-cms:1.0.x-dev - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --no-update --prefer-dist; fi
- composer update - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --no-update --prefer-dist; fi
- if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist; fi - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
- if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --prefer-dist; fi
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
# Install NPM dependencies # Install NPM dependencies
- if [[ $NPM_TEST ]]; then nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION && npm install -g yarn && yarn install --network-concurrency 1 && yarn run build; fi - if [[ $NPM_TEST ]]; then nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION && npm install -g yarn && yarn install --network-concurrency 1 && yarn run build; fi
# Start behat services # Start behat services
- if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi - if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi
- if [[ $BEHAT_TEST ]]; then cp composer.lock artifacts/; fi
- if [[ $BEHAT_TEST ]]; then sh -e /etc/init.d/xvfb start; sleep 3; fi - if [[ $BEHAT_TEST ]]; then sh -e /etc/init.d/xvfb start; sleep 3; fi
- if [[ $BEHAT_TEST ]]; then (vendor/bin/selenium-server-standalone > artifacts/selenium.log 2>&1 &); fi - if [[ $BEHAT_TEST ]]; then (chromedriver > artifacts/chromedriver.log 2>&1 &); fi
- if [[ $BEHAT_TEST ]]; then (vendor/bin/serve --bootstrap-file tests/behat/serve-bootstrap.php &> artifacts/serve.log &); fi - if [[ $BEHAT_TEST ]]; then (vendor/bin/serve --bootstrap-file tests/behat/serve-bootstrap.php &> artifacts/serve.log &); fi
script: script:

View File

@ -17,10 +17,12 @@ default:
extensions: extensions:
SilverStripe\BehatExtension\MinkExtension: SilverStripe\BehatExtension\MinkExtension:
default_session: selenium2 default_session: facebook_web_driver
javascript_session: selenium2 javascript_session: facebook_web_driver
selenium2: facebook_web_driver:
browser: firefox browser: chrome
wd_host: "http://127.0.0.1:9515" #chromedriver port
browser_name: chrome
SilverStripe\BehatExtension\Extension: SilverStripe\BehatExtension\Extension:
screenshot_path: %paths.base%/artifacts/screenshots screenshot_path: %paths.base%/artifacts/screenshots

View File

@ -29,10 +29,7 @@
"silverstripe/vendor-plugin": "^1.0" "silverstripe/vendor-plugin": "^1.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^5.7", "phpunit/phpunit": "^5.7"
"silverstripe/behat-extension": "^3@dev",
"silverstripe/serve": "^2",
"se/selenium-server-standalone": "2.41.0"
}, },
"extra": { "extra": {
"expose": [ "expose": [