blob: 59c95d895ea27ec0ca4b367edc7430a54fcbd45d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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};
});
});
|