Create separate cms-config.yml for cms behat tests within framework

This commit is contained in:
Damian Mooyman 2016-11-02 10:54:09 +13:00
parent 6da36a9ed1
commit d7cb38434e
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
2 changed files with 23 additions and 1 deletions

View File

@ -56,7 +56,7 @@ script:
- "if [ \"$PHPUNIT_TEST\" = \"1\" ] && [ \"$CMS_TEST\" = \"\" ]; then vendor/bin/phpunit; fi"
- "if [ \"$PHPUNIT_TEST\" = \"1\" ] && [ \"$CMS_TEST\" = \"1\" ]; then vendor/bin/phpunit cms/tests; fi"
- "if [ \"$BEHAT_TEST\" = \"1\" ] && [ \"$CMS_TEST\" = \"\" ]; then vendor/bin/behat --config tests/behat/config.yml .; fi"
- "if [ \"$BEHAT_TEST\" = \"1\" ] && [ \"$CMS_TEST\" = \"1\" ]; then vendor/bin/behat @cms --config tests/behat/config.yml; fi"
- "if [ \"$BEHAT_TEST\" = \"1\" ] && [ \"$CMS_TEST\" = \"1\" ]; then vendor/bin/behat @cms --config tests/behat/cms-config.yml; fi"
- "if [ \"$NPM_TEST\" = \"1\" ]; then npm run test; fi"
- "if [ \"$NPM_TEST\" = \"1\" ]; then npm run lint; fi"
- "if [ \"$NPM_TEST\" = \"1\" ]; then npm run build; fi"

View File

@ -0,0 +1,22 @@
# Required to run cms tests as subdirectory within framework module
default:
context:
class: SilverStripe\Cms\Test\Behaviour\FeatureContext
formatter:
name: pretty
parameters:
snippets: false
extensions:
SilverStripe\BehatExtension\MinkExtension:
base_url: http://localhost:8080/
files_path: %behat.paths.base%/features/files/
default_session: selenium2
javascript_session: selenium2
selenium2:
browser: firefox
SilverStripe\BehatExtension\Extension:
screenshot_path: %behat.paths.base%/artifacts/screenshots
framework_path: "../.."
bootstrap_file: "cms/tests/behat/serve-bootstrap.php"