mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
Update selenium to chromedriver
This commit is contained in:
parent
9ca6c3a89b
commit
d678bd76f9
17
.travis.yml
17
.travis.yml
@ -2,16 +2,15 @@ language: php
|
||||
|
||||
dist: trusty
|
||||
|
||||
sudo: required
|
||||
|
||||
group: deprecated-2017Q4
|
||||
before_install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install chromium-chromedriver
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache/files
|
||||
|
||||
addons:
|
||||
firefox: "31.0"
|
||||
apt:
|
||||
packages:
|
||||
- tidy
|
||||
@ -22,6 +21,8 @@ env:
|
||||
- COMPOSER_ROOT_VERSION="4.0.x-dev"
|
||||
- DISPLAY=":99"
|
||||
- XVFBARGS=":99 -ac -screen 0 1024x768x16"
|
||||
- SS_BASE_URL="http://localhost:8080/"
|
||||
- SS_ENVIRONMENT_TYPE="dev"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
@ -66,6 +67,9 @@ matrix:
|
||||
- PDO=1
|
||||
|
||||
before_script:
|
||||
# Extra $PATH
|
||||
- export PATH=/usr/lib/chromium-browser/:$PATH
|
||||
|
||||
# Init PHP
|
||||
- phpenv rehash
|
||||
- phpenv config-rm xdebug.ini || true
|
||||
@ -74,17 +78,16 @@ before_script:
|
||||
# Install composer dependencies
|
||||
- composer validate
|
||||
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
|
||||
- if [[ $BEHAT_TEST ]]; then composer require --no-update silverstripe/behat-extension:^3 silverstripe/serve:^2 se/selenium-server-standalone:2.41.0; fi;
|
||||
- if [[ $BEHAT_TEST ]]; then composer require --no-update silverstripe/recipe-testing:^1; fi;
|
||||
- if [[ $HEALTH_TEST ]]; then composer require --no-update silverstripe/serve:^2; fi;
|
||||
- if ! [[ $HEALTH_TEST ]]; then composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile; fi;
|
||||
- if [[ $HEALTH_TEST ]]; then composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile --no-dev; fi;
|
||||
|
||||
# Start behat services
|
||||
- if [[ $BEHAT_TEST ]] || [[ $HEALTH_TEST ]]; then echo 'SS_BASE_URL=http://localhost:8080/' >> .env; fi
|
||||
- if [[ $BEHAT_TEST ]] || [[ $HEALTH_TEST ]]; then mkdir artifacts; fi
|
||||
- if [[ $BEHAT_TEST ]] || [[ $HEALTH_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 (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 ]] || [[ $HEALTH_TEST ]]; then (vendor/bin/serve --bootstrap-file vendor/silverstripe/cms/tests/behat/serve-bootstrap.php &> artifacts/serve.log &); sleep 3; fi
|
||||
|
||||
script:
|
||||
|
18
behat.yml
18
behat.yml
@ -1,20 +1,20 @@
|
||||
# Note: Currently firefox 31-ESR is recommended
|
||||
# Note: Currently chrome latest is recommended
|
||||
# Behat test setup requires an `.env` with `SS_BASE_URL` defined, as well
|
||||
# as each of the following commands to initiate a test run:
|
||||
# ========================================================================= #
|
||||
# composer require silverstripe/behat-extension:^3 silverstripe/serve:dev-master se/selenium-server-standalone:2.41.0
|
||||
# vendor/bin/selenium-server-standalone -Dwebdriver.firefox.bin="/Applications/Firefox31.app/Contents/MacOS/firefox-bin"
|
||||
# vendor/bin/serve --bootstrap-file vendor/silverstripe/cms/tests/behat/serve-bootstrap.php
|
||||
# vendor/bin/behat @<module>
|
||||
# composer require silverstripe/recipe-testing ^1
|
||||
# vendor/bin/behat-ss @<module>
|
||||
# ========================================================================= #
|
||||
default:
|
||||
suites: []
|
||||
extensions:
|
||||
SilverStripe\BehatExtension\MinkExtension:
|
||||
default_session: selenium2
|
||||
javascript_session: selenium2
|
||||
selenium2:
|
||||
browser: firefox
|
||||
default_session: facebook_web_driver
|
||||
javascript_session: facebook_web_driver
|
||||
facebook_web_driver:
|
||||
browser: chrome
|
||||
wd_host: "http://127.0.0.1:9515" #chromedriver port
|
||||
browser_name: chrome
|
||||
SilverStripe\BehatExtension\Extension:
|
||||
bootstrap_file: vendor/silverstripe/cms/tests/behat/serve-bootstrap.php
|
||||
screenshot_path: %paths.base%/artifacts/screenshots
|
||||
|
Loading…
Reference in New Issue
Block a user