summaryrefslogtreecommitdiffstats
path: root/openecomp-bdd/stepDefinitions/VSP_steps.js
diff options
context:
space:
mode:
authorayalaben <ayala.benzvi@amdocs.com>2018-03-15 15:59:25 +0200
committerayalaben <ayala.benzvi@amdocs.com>2018-03-19 10:45:48 +0200
commit705fc2b672d5802696074be94b446a89d228b94d (patch)
tree135b0d30b36eaf0180314d68531186648ac29882 /openecomp-bdd/stepDefinitions/VSP_steps.js
parent3c24190cca30ee77c8c81d1738d7d5cbf454d647 (diff)
Archive Item
Change-Id: Idd5eedc3b0ca9e3cc72f7de9fd432cdbbf77631d Issue-ID: SDC-1086 Signed-off-by: ayalaben <ayala.benzvi@amdocs.com>
Diffstat (limited to 'openecomp-bdd/stepDefinitions/VSP_steps.js')
-rw-r--r--openecomp-bdd/stepDefinitions/VSP_steps.js61
1 files changed, 61 insertions, 0 deletions
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