wdio-qase-reporter 1.0.0-beta.4 → 1.0.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 +29 -2
- package/dist/options.js +3 -0
- package/dist/reporter.js +23 -9
- package/dist/step.js +4 -3
- package/dist/storage.js +4 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -111,7 +111,7 @@ Example `qase.config.json` config:
|
|
|
111
111
|
}
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
Also, you need to configure the reporter using the `wdio.conf.ts`
|
|
114
|
+
Also, you need to configure the reporter using the `wdio.conf.ts` or `wdio.conf.js` files:
|
|
115
115
|
|
|
116
116
|
```ts
|
|
117
117
|
// wdio.conf.ts
|
|
@@ -140,7 +140,34 @@ export const config: Options.Testrunner = {
|
|
|
140
140
|
};
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
```javascript
|
|
144
|
+
// wdio.conf.js
|
|
145
|
+
const WDIOQaseReporter = require('wdio-qase-reporter').default;
|
|
146
|
+
const {beforeRunHook, afterRunHook} = require('wdio-qase-reporter');
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
exports.config = {
|
|
150
|
+
reporters: [[WDIOQaseReporter, {
|
|
151
|
+
disableWebdriverStepsReporting: true,
|
|
152
|
+
disableWebdriverScreenshotsReporting: true,
|
|
153
|
+
useCucumber: false,
|
|
154
|
+
}]],
|
|
155
|
+
|
|
156
|
+
// ...
|
|
157
|
+
// =====
|
|
158
|
+
// Hooks
|
|
159
|
+
// =====
|
|
160
|
+
onPrepare: async function() {
|
|
161
|
+
await beforeRunHook();
|
|
162
|
+
},
|
|
163
|
+
onComplete: async function() {
|
|
164
|
+
await afterRunHook();
|
|
165
|
+
},
|
|
166
|
+
// ... other options
|
|
167
|
+
};
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Additional options of the reporter in the `wdio.conf.ts` or `wdio.conf.js` files:
|
|
144
171
|
|
|
145
172
|
- `disableWebdriverStepsReporting` - optional parameter(`false` by default), in order to log only custom steps to the reporter.
|
|
146
173
|
- `disableWebdriverScreenshotsReporting` - optional parameter(`false` by default), in order to not attach screenshots to the reporter.
|
package/dist/options.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QaseReporterOptions = void 0;
|
|
4
4
|
class QaseReporterOptions {
|
|
5
|
+
useCucumber;
|
|
6
|
+
disableWebdriverStepsReporting;
|
|
7
|
+
disableWebdriverScreenshotsReporting;
|
|
5
8
|
constructor() {
|
|
6
9
|
this.useCucumber = false;
|
|
7
10
|
this.disableWebdriverStepsReporting = false;
|
package/dist/reporter.js
CHANGED
|
@@ -12,6 +12,28 @@ const utils_1 = require("./utils");
|
|
|
12
12
|
const path_1 = __importDefault(require("path"));
|
|
13
13
|
const events_1 = require("./events");
|
|
14
14
|
class WDIOQaseReporter extends reporter_1.default {
|
|
15
|
+
/**
|
|
16
|
+
* @type {Record<string, TestStatusEnum>}
|
|
17
|
+
*/
|
|
18
|
+
static statusMap = {
|
|
19
|
+
'passed': qase_javascript_commons_1.TestStatusEnum.passed,
|
|
20
|
+
'failed': qase_javascript_commons_1.TestStatusEnum.failed,
|
|
21
|
+
'skipped': qase_javascript_commons_1.TestStatusEnum.skipped,
|
|
22
|
+
'pending': qase_javascript_commons_1.TestStatusEnum.skipped,
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @type {ReporterInterface}
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
reporter;
|
|
29
|
+
storage;
|
|
30
|
+
/**
|
|
31
|
+
* @type {boolean}
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
isSync;
|
|
35
|
+
_options;
|
|
36
|
+
_isMultiremote;
|
|
15
37
|
constructor(options) {
|
|
16
38
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
17
39
|
super(options);
|
|
@@ -365,6 +387,7 @@ class WDIOQaseReporter extends reporter_1.default {
|
|
|
365
387
|
data: {
|
|
366
388
|
action: title,
|
|
367
389
|
expected_result: null,
|
|
390
|
+
data: null,
|
|
368
391
|
},
|
|
369
392
|
parent_id: this.storage.getLastItem()?.id ?? null,
|
|
370
393
|
execution: {
|
|
@@ -417,13 +440,4 @@ class WDIOQaseReporter extends reporter_1.default {
|
|
|
417
440
|
return { key, value };
|
|
418
441
|
}
|
|
419
442
|
}
|
|
420
|
-
/**
|
|
421
|
-
* @type {Record<string, TestStatusEnum>}
|
|
422
|
-
*/
|
|
423
|
-
WDIOQaseReporter.statusMap = {
|
|
424
|
-
'passed': qase_javascript_commons_1.TestStatusEnum.passed,
|
|
425
|
-
'failed': qase_javascript_commons_1.TestStatusEnum.failed,
|
|
426
|
-
'skipped': qase_javascript_commons_1.TestStatusEnum.skipped,
|
|
427
|
-
'pending': qase_javascript_commons_1.TestStatusEnum.skipped,
|
|
428
|
-
};
|
|
429
443
|
exports.default = WDIOQaseReporter;
|
package/dist/step.js
CHANGED
|
@@ -8,10 +8,10 @@ const qase_javascript_commons_1 = require("qase-javascript-commons");
|
|
|
8
8
|
const uuid_1 = require("uuid");
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
class QaseStep {
|
|
11
|
+
name = '';
|
|
12
|
+
attachments = [];
|
|
13
|
+
steps = [];
|
|
11
14
|
constructor(name) {
|
|
12
|
-
this.name = '';
|
|
13
|
-
this.attachments = [];
|
|
14
|
-
this.steps = [];
|
|
15
15
|
this.name = name;
|
|
16
16
|
}
|
|
17
17
|
attach(attach) {
|
|
@@ -57,6 +57,7 @@ class QaseStep {
|
|
|
57
57
|
step.data = {
|
|
58
58
|
action: this.name,
|
|
59
59
|
expected_result: null,
|
|
60
|
+
data: null,
|
|
60
61
|
};
|
|
61
62
|
try {
|
|
62
63
|
await body.call(this, this);
|
package/dist/storage.js
CHANGED
|
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.findLast = exports.Storage = void 0;
|
|
4
4
|
const qase_javascript_commons_1 = require("qase-javascript-commons");
|
|
5
5
|
class Storage {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
6
|
+
currentFile;
|
|
7
|
+
suites = [];
|
|
8
|
+
ignore = false;
|
|
9
|
+
items = [];
|
|
11
10
|
clear() {
|
|
12
11
|
this.currentFile = undefined;
|
|
13
12
|
this.suites = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wdio-qase-reporter",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Qase WebDriverIO Reporter",
|
|
5
5
|
"homepage": "https://github.com/qase-tms/qase-javascript",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"author": "Qase Team <support@qase.io>",
|
|
33
33
|
"license": "Apache-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"qase-javascript-commons": "~2.2.
|
|
35
|
+
"qase-javascript-commons": "~2.2.14",
|
|
36
36
|
"uuid": "^9.0.1",
|
|
37
37
|
"@types/node": "^20.1.0",
|
|
38
38
|
"@wdio/reporter": "^8.39.0",
|