Skip to content

Commit d9ba3cc

Browse files
authored
Change an approach to distribute tags as attributes for suite and test entities (#33)
* Propagate tags as attributes for a suite and a test
1 parent 5bd69c1 commit d9ba3cc

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.MD

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.13.0
2+
- changed an approach to distribute tags as attributes for suite and test entities
3+
14
## 0.12.0
25
- added support of named attachments
36

index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class RPFormatter extends Formatter {
8484
if (!this.features[featureName]) {
8585
await retry(async () => {
8686
const featureItem = this.rpClient.startTestItem({
87+
attributes: this.prepareTags(testCase.gherkinDocument.feature.tags),
8788
description:
8889
this.formatTags(testCase.gherkinDocument.feature.tags) +
8990
'\n' +
@@ -123,7 +124,7 @@ class RPFormatter extends Formatter {
123124
name: testCase.pickle.name,
124125
startTime,
125126
type: 'STEP',
126-
attributes,
127+
attributes: [...attributes, ...this.prepareTags(testCase.pickle.tags) ],
127128
retry: retryTest
128129
}, this.launchId, featureTempId);
129130
await testItem.promise;
@@ -242,6 +243,9 @@ class RPFormatter extends Formatter {
242243

243244
formatTags(tags) {
244245
return tags.map(tag => '<code>' + tag.name + '</code>').join('')
246+
247+
prepareTags(tags) {
248+
return tags.map(tag => tag.name)
245249
}
246250

247251
prepareContent(attachment) {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@qavajs/format-report-portal",
3-
"version": "0.12.0",
3+
"version": "0.13.0",
44
"description": "cucumber formatter for report portal",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)