master |
---|
This bundle provides Behat Context classes :
- OauthContext : to manage oauth authentication
- FormContext : to additional form steps
- WindowSizeContext : to manage browser window resize before tests
As well as usefull Traits :
- SpinTrait : to manage retry on steps, until either they pass or time out
- WindowSizeTrait : to manage browser window resize before tests
With composer :
First add the package repository to your composer.json file (package not yet available on packagist):
...
"repositories": [
...
{
"type": "vcs",
"url": "https://github.com/GMaissa/BehatContextsExtension.git"
}
],
...
Install the package :
php composer.phar require --dev gmaissa/behat-contexts-extension
Activate the extension in your behat.yml file :
default:
# ...
extensions:
GMaissa\BehatContextsExtension: ~
Enable the desired contexts:
default:
suites:
default:
contexts:
- gm:context:oauth
- gm:context:form
- gm:context:windowSize
- serverUrl : OAuth server URL
- clientId : OAuth client ID
- clientSecret : OAuth client secret key
- width : window width
- height : window height
In order to be accepted, your contribution needs to pass a few controls :
- PHP files should be valid
- PHP files should follow the PSR-2 standard
- PHP files should be phpmd and phpcpd warning/error free
Finally, in order to homogenize commit messages across contributors (and to ease generation of the CHANGELOG), please apply this git commit message hook onto your local repository.