diff options
Diffstat (limited to 'workflow/workflow-bdd/stepDefinitions/Workflow_Steps.js')
-rw-r--r-- | workflow/workflow-bdd/stepDefinitions/Workflow_Steps.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/workflow/workflow-bdd/stepDefinitions/Workflow_Steps.js b/workflow/workflow-bdd/stepDefinitions/Workflow_Steps.js new file mode 100644 index 00000000..59c95d89 --- /dev/null +++ b/workflow/workflow-bdd/stepDefinitions/Workflow_Steps.js @@ -0,0 +1,19 @@ +/** + * @module WORKFLOW + * @description Creates a new WORKFLOW with a random name and saves the id and versionId on the context item object and the context vlm object<br> + * Input data will be taken from the 'resources/json/createWorkflow.json' file. + * @step I want to create a Workflow + **/ + +const {Then, When, Given} = require('cucumber'); +const assert = require('assert'); +const util = require('./Utils.js'); + +When('I want to create a Workflow', function() { + let inputData = util.getJSONFromFile('resources/json/createWorkflow.json'); + inputData.name = util.random(); + let path = '/workflows'; + return util.request(this.context, 'POST', path, inputData).then(result => { + this.context.item ={id : result.data.id}; +}); +});
\ No newline at end of file |