cypress-qase-reporter
Advanced tools
Comparing version
@@ -0,1 +1,15 @@ | ||
# cypress-qase-reporter@2.2.1 | ||
## What's new | ||
When specifying test names, QaseIDs are now excluded from the final test name. | ||
```js | ||
// The test name will be 'Example', not 'Example (Qase ID: 1)' | ||
qase(1,it('Example', () => { | ||
expect(true).to.equal(true); | ||
}) | ||
); | ||
``` | ||
# cypress-qase-reporter@2.2.0 | ||
@@ -2,0 +16,0 @@ |
@@ -73,4 +73,10 @@ /// <reference types="cypress" /> | ||
private getFile; | ||
/** | ||
* @param {string} title | ||
* @returns {string} | ||
* @private | ||
*/ | ||
private removeQaseIdsFromTitle; | ||
private getSteps; | ||
} | ||
export {}; |
@@ -172,3 +172,3 @@ "use strict"; | ||
testops_id: ids.length > 0 ? ids : null, | ||
title: metadata?.title ?? test.title, | ||
title: metadata?.title ?? this.removeQaseIdsFromTitle(test.title), | ||
}; | ||
@@ -213,2 +213,14 @@ void this.reporter.addTestResult(result); | ||
} | ||
/** | ||
* @param {string} title | ||
* @returns {string} | ||
* @private | ||
*/ | ||
removeQaseIdsFromTitle(title) { | ||
const matches = title.match(/\(Qase ID: ([0-9,]+)\)$/i); | ||
if (matches) { | ||
return title.replace(matches[0], '').trimEnd(); | ||
} | ||
return title; | ||
} | ||
getSteps(steps, attachments) { | ||
@@ -215,0 +227,0 @@ const result = []; |
{ | ||
"name": "cypress-qase-reporter", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Qase Cypress Reporter", | ||
@@ -50,3 +50,3 @@ "homepage": "https://github.com/qase-tms/qase-javascript", | ||
"dependencies": { | ||
"qase-javascript-commons": "~2.2.0", | ||
"qase-javascript-commons": "~2.2.3", | ||
"uuid": "^9.0.1" | ||
@@ -53,0 +53,0 @@ }, |
849045
0.09%1064
1.72%