wdio-qase-reporter 1.0.1 → 1.0.3

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,9 @@
1
+ # qase-wdio@1.0.2
2
+
3
+ ## What's new
4
+
5
+ Resolved an issue where a custom suite set via `qase.suite` was not included in the test results.
6
+
1
7
  # qase-wdio@1.0.1
2
8
 
3
9
  ## What's new
package/dist/hooks.js CHANGED
@@ -8,7 +8,7 @@ async function beforeRunHook() {
8
8
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9
9
  const reporter = qase_javascript_commons_1.QaseReporter.getInstance({
10
10
  ...config,
11
- frameworkPackage: 'wdio',
11
+ frameworkPackage: '@wdio/cli',
12
12
  frameworkName: 'wdio',
13
13
  reporterName: 'wdio-qase-reporter',
14
14
  });
package/dist/reporter.js CHANGED
@@ -42,7 +42,7 @@ class WDIOQaseReporter extends reporter_1.default {
42
42
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
43
43
  this.reporter = qase_javascript_commons_1.QaseReporter.getInstance({
44
44
  ...(0, qase_javascript_commons_1.composeOptions)(options, config),
45
- frameworkPackage: 'wdio',
45
+ frameworkPackage: '@wdio/cli',
46
46
  frameworkName: 'wdio',
47
47
  reporterName: 'wdio-qase-reporter',
48
48
  });
@@ -194,18 +194,20 @@ class WDIOQaseReporter extends reporter_1.default {
194
194
  if (testResult === undefined || this.storage.ignore) {
195
195
  return;
196
196
  }
197
- const relations = {};
198
- if (this.storage.suites.length > 0) {
199
- relations.suite = {
200
- data: this.storage.suites.map((suite) => {
201
- return {
202
- title: suite,
203
- public_id: null,
204
- };
205
- }),
206
- };
197
+ if (testResult.relations === null) {
198
+ const relations = {};
199
+ if (this.storage.suites.length > 0) {
200
+ relations.suite = {
201
+ data: this.storage.suites.map((suite) => {
202
+ return {
203
+ title: suite,
204
+ public_id: null,
205
+ };
206
+ }),
207
+ };
208
+ }
209
+ testResult.relations = relations;
207
210
  }
208
- testResult.relations = relations;
209
211
  testResult.execution.duration = testResult.execution.start_time ? Math.round(end_time - testResult.execution.start_time) : 0;
210
212
  testResult.execution.status = status;
211
213
  testResult.execution.stacktrace = err === null ?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wdio-qase-reporter",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Qase WebDriverIO Reporter",
5
5
  "homepage": "https://github.com/qase-tms/qase-javascript",
6
6
  "sideEffects": false,