cypress-testrail-paper
Version:
Easy and decoupled Cypress TestRail reporter
57 lines (50 loc) • 927 B
JavaScript
class Result {
/**
*
* @param caseId
* @param statusId
* @param comment
* @param duration
* @param screenshotPaths
*/
constructor(caseId, statusId, comment, duration, screenshotPaths) {
this._caseId = caseId;
this._statusId = statusId;
this._comment = comment;
this._durationMS = duration;
this._screenshotPaths = screenshotPaths;
}
/**
*
*/
getCaseId() {
return this._caseId;
}
/**
*
*/
getStatusId() {
return this._statusId;
}
/**
*
*/
getComment() {
return this._comment;
}
/**
*
* @returns {*}
*/
getElapsed() {
return Math.round(this._durationMS / 1000) + 's';
}
/**
*
* @returns {*}
*/
getScreenshotPaths() {
return this._screenshotPaths;
}
}
module.exports = Result;