This creates a feature context for DKAN and NuCivic specific steps.
- Create a
composer.json
file with the following:
{
"require": {
"nucivic/dkanextension": "dev-master"
},
"config": {
"bin-dir": "bin/"
},
"scripts": {
"post-install-cmd": "mv bin/bddkan bin/behat"
}
}
-
Install dependencies:
composer install
-
Initialize:
behat --init
You should have a features/bootstrap/DKANFeatureContext.php
file that inherets DKANContext
.
Some of the included steps are:
Given datasets
Given resources
Given groups
Given groups memberships
Example:
Background:
Given users:
| name | mail | roles |
| John | [email protected] | administrator |
Given groups:
| title | author | published |
| Group 01 | Admin | Yes |
And group memberships:
| user | group | role on group | membership status |
| Gabriel | Group 01 | administrator member | Active |
And datasets:
| title | format | author | published | Date | tags |
| Dataset 01 | CSV | Gabriel | Yes | Feb 01, 2015 | Health |
And resources:
| title | dataset | published |
| Resource 01 | Dataset 01 | Yes |
- Make sure scripts works on install
- Add tests
- Deploy on DKAN and related modules
Scripts directory inspired by https://github.com/BR0kEN-/behat-drupal-propeople-context