@wdio/allure-reporter 8.1.2 → 8.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/README.md CHANGED
@@ -40,8 +40,14 @@ export const config = {
40
40
  ```
41
41
  - `outputDir` defaults to `./allure-results`. After a test run is complete, you will find that this directory has been populated with an `.xml` file for each spec, plus a number of `.txt` and `.png` files and other attachments.
42
42
  - `disableWebdriverStepsReporting` - optional parameter(`false` by default), in order to log only custom steps to the reporter.
43
- - `issueLinkTemplate` - optional parameter, in order to specify the issue link pattern. Reporter will replace `{}` placeholder with value specified in `addIssue(value)` call parameter. Example `https://example.org/issue/{}`
44
- - `tmsLinkTemplate` - optional parameter, in order to specify the tms link pattern. Reporter will replace `{}` placeholder with value specified in `addTestId(value)` call parameter. Example `https://example.org/tms/{}`
43
+ - `issueLinkTemplate` - optional parameter, in order to specify the issue link pattern. Reporter will replace `{}` placeholder with value specified in `addIssue(value)` call parameter. The same logic is applied if Cucumber is used and tag `issue` is set at any level, it will be converted to the link in the report. The parameter value example:
44
+ ```
45
+ https://example.org/issue/{}
46
+ ```
47
+ - `tmsLinkTemplate` - optional parameter, in order to specify TMS (Test Management System) link pattern. Reporter will replace `{}` placeholder with value specified in `addTestId(value)` call parameter. The same logic is applied if Cucumber is used and tag `testId` is set at any level, it will be converted to the link in the report. The parameter value example:
48
+ ```
49
+ https://example.org/tms/{}
50
+ ```
45
51
  - `disableWebdriverScreenshotsReporting` - optional parameter(`false` by default), in order to not attach screenshots to the reporter.
46
52
  - `useCucumberStepReporter` - optional parameter (`false` by default), set it to true in order to change the report hierarchy when using cucumber. Try it for yourself and see how it looks.
47
53
  - `disableMochaHooks` - optional parameter (`false` by default), set it to true in order to not fetch the `before/after` stacktrace/screenshot/result hooks into the Allure Reporter.
@@ -107,6 +113,18 @@ Given('I include feature and story name', () => {
107
113
  })
108
114
  ```
109
115
 
116
+ Cucumber tags converted to the links example (the corresponding link templates must be configured):
117
+ ```gherkin
118
+ @issue=BUG-1
119
+ @testId=TST-2
120
+ Feature: This is a feature with global tags that will be converted to Allure links
121
+
122
+ @issue=BUG-3
123
+ @testId=TST-4
124
+ Scenario: This is a scenario with tags that will be converted to Allure links
125
+ Given I do something
126
+ ```
127
+
110
128
  ## Displaying the report
111
129
 
112
130
  The results can be consumed by any of the [reporting tools](https://docs.qameta.io/allure#_reporting) offered by Allure. For example:
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACR,UAAU,EAAO,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EACrE,gBAAgB,EAAE,WAAW,EAChC,MAAM,gBAAgB,CAAA;AACvB,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAGzC,OAAO,EACH,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAChF,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAC1E,MAAM,iBAAiB,CAAA;AAMxB,OAAO,KAAK,EACR,sBAAsB,EAAE,uBAAuB,EAAE,uBAAuB,EACxE,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAC/E,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,EAAE,qBAAqB,EACvE,MAAM,YAAY,CAAA;AAWnB,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAY;IACpD,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,aAAa,CAA+B;IACpD,OAAO,CAAC,cAAc,CAAC,CAAS;IAChC,OAAO,CAAC,OAAO,CAAC,CAAoB;IACpC,OAAO,CAAC,eAAe,CAAC,CAAQ;IAChC,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,oBAAoB,CAAU;I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iBAAU;IACxB,MAAM,CAAC,OAAO,iBAAU;IACxB,MAAM,CAAC,WAAW,qBAAc;CACnC"}
package/build/reporter.js CHANGED
@@ -86,7 +86,15 @@ export default class AllureReporter extends WDIOReporter {
86
86
  this._allure.startCase(suite.title);
87
87
  const currentTest = this._allure.getCurrentTest();
88
88
  this.getLabels(suite).forEach(({ name, value }) => {
89
- currentTest.addLabel(name, value);
89
+ if (name === 'issue') {
90
+ this.addIssue({ issue: value });
91
+ }
92
+ else if (name === 'testId') {
93
+ this.addTestId({ testId: value });
94
+ }
95
+ else {
96
+ currentTest.addLabel(name, value);
97
+ }
90
98
  });
91
99
  if (suite.description) {
92
100
  this.addDescription(suite);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/allure-reporter",
3
- "version": "8.1.2",
3
+ "version": "8.3.0",
4
4
  "description": "A WebdriverIO reporter plugin to create Allure Test Reports",
5
5
  "author": "Boris Osipov <osipov.boris@gmail.com>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-allure-reporter",
@@ -39,8 +39,8 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@types/node": "^18.0.0",
42
- "@wdio/reporter": "8.1.2",
43
- "@wdio/types": "8.1.2",
42
+ "@wdio/reporter": "8.3.0",
43
+ "@wdio/types": "8.3.0",
44
44
  "allure-js-commons": "^1.3.2",
45
45
  "csv-stringify": "^6.0.4",
46
46
  "strip-ansi": "^6.0.0"
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "14625257acfd6081b4c9914b214110c0c7bf7218"
51
+ "gitHead": "156a246e8117463cf3c762d2da5bf9eef3a476ea"
52
52
  }