diff options
author | shrikantawachar <shrikant.awachar@amdocs.com> | 2018-07-14 00:18:09 +0530 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2018-07-15 05:30:15 +0000 |
commit | 3f55e8e7cff615f2f97d3e0d5def0c2f0d80cea5 (patch) | |
tree | 35f088ff634239ab6df01922bc3ff753344e833f /openecomp-bdd/stepDefinitions/Questionnaire_steps.js | |
parent | e8a916c229e23ce406cae7d480a201eb505e9261 (diff) |
Enhancement in md5 field of Image
Implementation and Flow tests
Change-Id: I4c7e3dfe077ba43317cf0b06b0ea4d85bfb50da8
Issue-ID: SDC-1502
Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
Diffstat (limited to 'openecomp-bdd/stepDefinitions/Questionnaire_steps.js')
-rw-r--r-- | openecomp-bdd/stepDefinitions/Questionnaire_steps.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/openecomp-bdd/stepDefinitions/Questionnaire_steps.js b/openecomp-bdd/stepDefinitions/Questionnaire_steps.js index c794734735..2e169fadc8 100644 --- a/openecomp-bdd/stepDefinitions/Questionnaire_steps.js +++ b/openecomp-bdd/stepDefinitions/Questionnaire_steps.js @@ -18,6 +18,11 @@ const assert = require('assert'); const util = require('./Utils.js'); const _ = require('lodash'); +function getPath(path, context) { + let compiled = _.template(path); + return compiled(context); +} + /** * @module Questionnaire * @description Gets the questionnaire for the current item and saves it on the context @@ -48,6 +53,20 @@ Then('I want to get the questionnaire for this component', function () { }); }); +/** + * @module Questionnaire + * @description Gets the questionnaire from path and saves it on the context + * @exampleFile TestMD5.feature + * @step I want to get the questionnaire for this path {string} + **/ +Then('I want to get the questionnaire for this path {string}', function (string) { + let path = getPath(string, this.context); + return util.request(this.context, 'GET', path).then(result => { + this.context.qdata = JSON.parse(result.data.data); + this.context.qschema = result.data.schema; + this.context.qurl = path; + }); +}); /** * @module Questionnaire |