cucumberjs-qase-reporter 2.2.2 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,3 +1,10 @@
1
+ # cucumberjs-qase-reporter@2.3.0
2
+
3
+ ## What's new
4
+
5
+ - Added `@QaseTags=tag1,tag2` Gherkin tag to assign tags from feature files.
6
+ - Updated `qase-javascript-commons` dependency to `~2.6.0`.
7
+
1
8
  # cucumberjs-qase-reporter@2.2.2
2
9
 
3
10
  ## Bug fixes
package/dist/models.d.ts CHANGED
@@ -9,6 +9,7 @@ export interface TestMetadata {
9
9
  parameters: Record<string, string>;
10
10
  group_params: Record<string, string>;
11
11
  suite: string | null;
12
+ tags: string[];
12
13
  }
13
14
  export interface ScenarioData {
14
15
  name: string;
package/dist/storage.js CHANGED
@@ -12,6 +12,7 @@ const qaseParametersRegExp = /^@[Qq]ase[Pp]arameters=(.+)$/;
12
12
  const qaseGroupParametersRegExp = /^@[Qq]ase[Gg]roup[Pp]arameters=(.+)$/;
13
13
  const qaseSuiteRegExp = /^@[Qq]ase[Ss]uite=(.+)$/;
14
14
  const qaseIgnoreRegExp = /^@[Qq]ase[Ii][Gg][Nn][Oo][Rr][Ee]$/;
15
+ const qaseTagsRegExp = /^@[Qq]ase[Tt]ags=(.+)$/;
15
16
  class Storage {
16
17
  /**
17
18
  * @type {NetworkProfiler | null}
@@ -285,6 +286,7 @@ class Storage {
285
286
  testops_project_mapping: hasProjectMapping ? metadata.projectMapping : null,
286
287
  id: tcs.id,
287
288
  title: metadata.title ?? pickle.name,
289
+ tags: metadata.tags,
288
290
  };
289
291
  return result;
290
292
  }
@@ -364,6 +366,7 @@ class Storage {
364
366
  parameters: {},
365
367
  group_params: {},
366
368
  suite: null,
369
+ tags: [],
367
370
  };
368
371
  for (const tag of tags) {
369
372
  if (qaseIdRegExp.test(tag.name)) {
@@ -416,6 +419,12 @@ class Storage {
416
419
  metadata.suite = tag.name.replace(/^@[Qq]ase[Ss]uite=/, '');
417
420
  continue;
418
421
  }
422
+ if (qaseTagsRegExp.test(tag.name)) {
423
+ const value = tag.name.replace(/^@[Qq]ase[Tt]ags=/, '');
424
+ const parsedTags = value.split(',').map(t => t.trim()).filter(t => t.length > 0);
425
+ metadata.tags.push(...parsedTags);
426
+ continue;
427
+ }
419
428
  if (qaseIgnoreRegExp.test(tag.name)) {
420
429
  metadata.isIgnore = true;
421
430
  }
package/docs/usage.md CHANGED
@@ -12,6 +12,7 @@ This guide provides comprehensive instructions for integrating Qase with Cucumbe
12
12
  - [Adding Title](#adding-title)
13
13
  - [Adding Fields](#adding-fields)
14
14
  - [Adding Suite](#adding-suite)
15
+ - [Tags](#tags)
15
16
  - [Ignoring Tests](#ignoring-tests)
16
17
  - [Muting Tests](#muting-tests)
17
18
  - [Working with Attachments](#working-with-attachments)
@@ -144,6 +145,32 @@ Feature: User Authentication
144
145
 
145
146
  ---
146
147
 
148
+ ## Tags
149
+
150
+ Assign tags to scenarios. Tags help categorize and filter tests in Qase.
151
+
152
+ ```gherkin
153
+ @QaseID=1
154
+ @QaseTags=smoke,regression
155
+ Scenario: Login test
156
+ Given I am on the login page
157
+ When I enter valid credentials
158
+ Then I should be logged in
159
+ ```
160
+
161
+ Multiple `@QaseTags` annotations accumulate:
162
+
163
+ ```gherkin
164
+ @QaseTags=smoke
165
+ @QaseTags=regression
166
+ Scenario: Login test
167
+ Given I am on the login page
168
+ When I enter valid credentials
169
+ Then I should be logged in
170
+ ```
171
+
172
+ ---
173
+
147
174
  ## Ignoring Tests
148
175
 
149
176
  Exclude a scenario from Qase reporting using the `@QaseIgnore` tag. The scenario still executes, but results are not sent to Qase:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cucumberjs-qase-reporter",
3
- "version": "2.2.2",
3
+ "version": "2.3.0",
4
4
  "description": "Qase TMS CucumberJS Reporter",
5
5
  "homepage": "https://github.com/qase-tms/qase-javascript",
6
6
  "main": "./dist/index.js",
@@ -40,7 +40,7 @@
40
40
  "license": "Apache-2.0",
41
41
  "dependencies": {
42
42
  "@cucumber/messages": "^22.0.0",
43
- "qase-javascript-commons": "~2.5.7"
43
+ "qase-javascript-commons": "~2.6.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@cucumber/cucumber": ">=7.0.0"