testrail-api-client
Advanced tools
Comparing version 1.0.15 to 1.0.16
@@ -106,2 +106,21 @@ "use strict"; | ||
}; | ||
TestRailClient.prototype.updateRunDescription = function (runId, description) { | ||
var _this = this; | ||
return new Promise(function (resolve, reject) { | ||
axios({ | ||
method: 'post', | ||
url: _this.base + "/update_run/" + runId, | ||
headers: { 'Content-Type': 'application/json' }, | ||
auth: { | ||
username: _this.options.username, | ||
password: _this.options.password, | ||
}, | ||
data: JSON.stringify({ "description": description }), | ||
}) | ||
.then(function (response) { | ||
resolve(); | ||
}) | ||
.catch(function (error) { reject(error); }); | ||
}); | ||
}; | ||
return TestRailClient; | ||
@@ -108,0 +127,0 @@ }()); |
{ | ||
"name": "testrail-api-client", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "JavaScript client for TestRail API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,3 +10,2 @@ # testrail-api-client | ||
## Installing | ||
@@ -101,2 +100,32 @@ | ||
### addResultsForCases | ||
```js | ||
const runId = 123; | ||
const reportTests = [{ case_id: 12345, status_id: 1, comment: "Test comment" }]; | ||
client | ||
.addResultsForCases(runId, reportTests) | ||
.then(() => { | ||
console.log("Done"); | ||
}) | ||
.catch((err) => { | ||
console.log(err); | ||
}); | ||
``` | ||
### updateRunDescription | ||
```js | ||
const runId = 123; | ||
const description = "Run Description"; | ||
client | ||
.updateRunDescription(runId, description) | ||
.then(() => { | ||
console.log("Done"); | ||
}) | ||
.catch((err) => { | ||
console.log(err); | ||
}); | ||
``` | ||
## Environment variables | ||
@@ -103,0 +132,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15395
147
137