Skip to content

Commit

Permalink
only send elapsed time if not 0s
Browse files Browse the repository at this point in the history
  • Loading branch information
boxblinkracer committed Aug 9, 2022
1 parent 5460d9f commit a94a462
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/TestRail/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,15 @@ class ApiClient {
case_id: result.getCaseId(),
status_id: result.getStatusId(),
comment: result.getComment().trim(),
elapsed: result.getElapsed(),
},
],
};

// 0s is not valid
if (result.getElapsed() !== '0s') {
postData.results[0].elapsed = result.getElapsed();
}

return this._post('/add_results_for_cases/' + runID, postData, () => {
/* eslint-disable no-console */
console.log(' TestRail result sent for TestCase C' + result.getCaseId());
Expand Down

0 comments on commit a94a462

Please sign in to comment.