summaryrefslogtreecommitdiffstats
path: root/workflow-bdd/stepDefinitions
diff options
context:
space:
mode:
authorayalaben <ayala.benzvi@amdocs.com>2018-06-26 09:29:06 +0300
committerayalaben <ayala.benzvi@amdocs.com>2018-06-26 09:29:06 +0300
commite9d97234f17d8ecdbfc0481d6a2ba2698d52ddd0 (patch)
tree0990c708c3b50c84115efeecab6df5346d430749 /workflow-bdd/stepDefinitions
parent3fb47c47b301bf8f401cabf63b13f17a39182d85 (diff)
workflow version API
Change-Id: Iadbf5325091084b4feca386740d6655845904d88 Issue-ID: SDC-1445 Signed-off-by: ayalaben <ayala.benzvi@amdocs.com>
Diffstat (limited to 'workflow-bdd/stepDefinitions')
-rw-r--r--workflow-bdd/stepDefinitions/Workflow_Steps.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/workflow-bdd/stepDefinitions/Workflow_Steps.js b/workflow-bdd/stepDefinitions/Workflow_Steps.js
new file mode 100644
index 00000000..59c95d89
--- /dev/null
+++ b/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