@comeonautomation/reportportal-client
Advanced tools
Comparing version
@@ -307,3 +307,3 @@ /* eslint-disable quotes,no-console,class-methods-use-this */ | ||
this.logDebug(`Launches successfully stopped!`); | ||
this.mergeLaunches(mergeDescription) | ||
this.deleteSkippedTest(mergeDescription) | ||
}); | ||
@@ -343,4 +343,33 @@ }); | ||
deleteSkippedTest(mergeDescription) { | ||
const launchIds = helpers.readLaunchesFromFile(); | ||
for (let item in launchIds) { | ||
this.restClient | ||
.retrieve("/item?filter.eq.launchId="+launchIds[item]+"&isLatest=false") | ||
.then(response => { | ||
this.logDebug (`Total elements in ${launchIds[item]}: `+response.page.totalElements); | ||
for (var i=1;i<response.page.totalElements;i++){ | ||
this.logDebug('Test ID: '+response.content[i].id+' '+response.content[i].name+' Skipped:'+response.content[i].statistics.executions.skipped) | ||
const item_id_url='/item/uuid/'+response.content[i].id | ||
if (response.content[i].statistics.executions.skipped){ | ||
this.restClient | ||
.retrieve(item_id_url) | ||
.then(response => { | ||
const test_item_delete_url = "/item?ids="+response.id; | ||
this.logDebug(test_item_delete_url) | ||
this.restClient | ||
.delete(test_item_delete_url) | ||
.then(response => { | ||
this.logDebug('Deleted Skipped tests successfully'); | ||
this.mergeLaunches(mergeDescription) | ||
}); | ||
}); | ||
} | ||
} | ||
}); | ||
} | ||
} | ||
/* | ||
@@ -347,0 +376,0 @@ * This method is used to create data object for merge request to ReportPortal. |
{ | ||
"name": "@comeonautomation/reportportal-client", | ||
"version": "1.9.0", | ||
"version": "1.10.0", | ||
"description": "ReportPortal client for node.js", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
147154
1.03%1730
1.65%