From 705fc2b672d5802696074be94b446a89d228b94d Mon Sep 17 00:00:00 2001 From: ayalaben Date: Thu, 15 Mar 2018 15:59:25 +0200 Subject: Archive Item Change-Id: Idd5eedc3b0ca9e3cc72f7de9fd432cdbbf77631d Issue-ID: SDC-1086 Signed-off-by: ayalaben --- openecomp-bdd/stepDefinitions/VSP_steps.js | 61 ++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'openecomp-bdd/stepDefinitions/VSP_steps.js') diff --git a/openecomp-bdd/stepDefinitions/VSP_steps.js b/openecomp-bdd/stepDefinitions/VSP_steps.js index bed8921a3c..1f753fef5e 100644 --- a/openecomp-bdd/stepDefinitions/VSP_steps.js +++ b/openecomp-bdd/stepDefinitions/VSP_steps.js @@ -118,4 +118,65 @@ When('I want to get the package for this Item to path {string}', function (strin Then('I want to delete this VSP', function() { let path = '/vendor-software-products/' + this.context.item.id ; return util.request(this.context, 'DELETE', path); +}); + +/** + * @module VSP + * @exampleFile ArchiveItem.feature + * @step I want to list Archived VSPs + **/ +Then('I want to list Archived VSPs', function() { + let path = '/vendor-software-products/?Status=ARCHIVED'; + return util.request(this.context, 'GET', path); +}); + +/** + * @module VSP + * @exampleFile ArchiveItem.feature + * @step I want to list Active VSPs + **/ +Then('I want to list Active VSPs', function() { + let path = '/vendor-software-products'; + return util.request(this.context, 'GET', path); +}); + + +/** + * @module VSP + * @exampleFile FilterArchivedVSPpackage.feature + * @step I want to list Archived VSPs packages + **/ +Then('I want to list Archived VSPs packages', function() { + let path = '/vendor-software-products/packages?Status=ARCHIVED'; + return util.request(this.context, 'GET', path); +}); + +/** + * @module VSP + * @exampleFile FilterArchivedVSPpackage.feature + * @step I want to list Active VSPs packages + **/ +Then('I want to list Active VSPs packages', function() { + let path = '/vendor-software-products/packages'; + return util.request(this.context, 'GET', path); + +}); + +/** + * @module VSP + * @exampleFile FilterArchivedVSPpackage.feature + * @step I want to check that VSP package exits in response + **/ +Then('I want to check that VSP package exits in response', function() { + + const packages = this.context.responseData.results; + const id = this.context.item.id; + var testResult = false; + + for(var i=0; i< packages.length; i++){ + if (id == packages[i].packageId){ + testResult = true; + } + } + assert.equal(testResult,true); }); \ No newline at end of file -- cgit 1.2.3-korg