Skip to content

Commit

Permalink
Use behat from app
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Jan 23, 2019
1 parent b950350 commit 7599cf7
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 10 deletions.
23 changes: 16 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ composer_deps=
composer_dev_deps=
nodejs_deps=
bower_deps=
acceptance_test_deps=

# bin file definitions
PHPUNIT=php -d zend.enable_gc=0 "$(PWD)/../../lib/composer/bin/phpunit"
PHPUNITDBG=phpdbg -qrr -d memory_limit=4096M -d zend.enable_gc=0 "$(PWD)/../../lib/composer/bin/phpunit"
PHP_CS_FIXER=php -d zend.enable_gc=0 vendor-bin/owncloud-codestyle/vendor/bin/php-cs-fixer
PHAN=php -d zend.enable_gc=0 vendor-bin/phan/vendor/bin/phan
PHPSTAN=php -d zend.enable_gc=0 vendor-bin/phpstan/vendor/bin/phpstan
BEHAT_BIN=vendor-bin/behat/vendor/bin/behat

.DEFAULT_GOAL := help

Expand Down Expand Up @@ -78,24 +80,25 @@ test-php-phpstan: vendor-bin/phpstan/vendor

.PHONY: test-acceptance-api
test-acceptance-api: ## Run API acceptance tests
test-acceptance-api:
../../tests/acceptance/run.sh --remote --type api
test-acceptance-api: vendor-bin/behat/vendor
BEHAT_BIN=$(BEHAT_BIN) ../../tests/acceptance/run.sh --remote --type api

.PHONY: test-acceptance-cli
test-acceptance-cli: ## Run CLI acceptance tests
test-acceptance-cli:
../../tests/acceptance/run.sh --remote --type cli
test-acceptance-cli: vendor-bin/behat/vendor
BEHAT_BIN=$(BEHAT_BIN) ../../tests/acceptance/run.sh --remote --type cli

.PHONY: test-acceptance-webui
test-acceptance-webui: ## Run webUI acceptance tests
test-acceptance-webui:
../../tests/acceptance/run.sh --remote --type webUI
test-acceptance-webui: vendor-bin/behat/vendor
BEHAT_BIN=$(BEHAT_BIN) ../../tests/acceptance/run.sh --remote --type webUI

all: appstore

clean: ## Clean build
rm -rf $(build_dir)
rm -rf vendor
rm -Rf vendor-bin/**/vendor vendor-bin/**/composer.lock

composer.phar:
curl -sS https://getcomposer.org/installer | php
Expand Down Expand Up @@ -168,4 +171,10 @@ vendor-bin/phpstan/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/phpstan
composer bin phpstan install --no-progress

vendor-bin/phpstan/composer.lock: vendor-bin/phpstan/composer.json
@echo phpstan composer.lock is not up to date.
@echo phpstan composer.lock is not up to date.

vendor-bin/behat/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/behat/composer.lock
composer bin behat install --no-progress

vendor-bin/behat/composer.lock: vendor-bin/behat/composer.json
@echo behat composer.lock is not up to date.
6 changes: 3 additions & 3 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
default:
autoload:
- %paths.base%/../features/bootstrap
'': '%paths.base%/../features/bootstrap'

suites:
cliTwoFactorTOTP:
paths:
- %paths.base%/../features/cliTwoFactorTOTP
- '%paths.base%/../features/cliTwoFactorTOTP'
contexts:
- TwoFactorTOTPContext:
- FeatureContext: &common_feature_context_params
Expand All @@ -22,4 +22,4 @@ default:
extensions:
jarnaiz\JUnitFormatter\JUnitFormatterExtension:
filename: report.xml
outputDir: %paths.base%/../output/
outputDir: '%paths.base%/../output/'
17 changes: 17 additions & 0 deletions vendor-bin/behat/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"config" : {
"platform": {
"php": "5.6.33"
}
},
"require": {
"behat/behat": "^3.0",
"behat/mink-extension": "^2.2",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "dev-master",
"jarnaiz/behat-junit-formatter": "^1.3",
"rdx/behat-variables": "^1.2",
"sensiolabs/behat-page-object-extension": "^2.0",
"symfony/translation": "^3.4"
}
}

0 comments on commit 7599cf7

Please sign in to comment.