@testomatio/reporter 2.1.3-beta.2-xml-import → 2.1.3-beta.3-multi-links
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/lib/adapter/codecept.js +3 -3
- package/lib/adapter/mocha.js +0 -14
- package/lib/adapter/webdriver.js +4 -6
- package/lib/bin/startTest.js +91 -38
- package/lib/client.js +3 -6
- package/lib/data-storage.d.ts +4 -4
- package/lib/data-storage.js +8 -7
- package/lib/pipe/testomatio.js +2 -1
- package/lib/reporter-functions.d.ts +7 -20
- package/lib/reporter-functions.js +35 -27
- package/lib/reporter.d.ts +20 -22
- package/lib/reporter.js +7 -9
- package/lib/services/artifacts.d.ts +1 -1
- package/lib/services/index.d.ts +2 -2
- package/lib/services/index.js +2 -2
- package/lib/services/key-values.d.ts +1 -1
- package/lib/services/labels.d.ts +1 -1
- package/lib/services/labels.js +2 -2
- package/lib/services/logger.d.ts +1 -1
- package/lib/utils/cli_utils.d.ts +1 -0
- package/lib/utils/cli_utils.js +524304 -0
- package/lib/utils/utils.js +1 -3
- package/lib/xmlReader.d.ts +0 -7
- package/lib/xmlReader.js +9 -231
- package/package.json +1 -1
- package/src/adapter/codecept.js +4 -3
- package/src/adapter/mocha.js +0 -15
- package/src/adapter/webdriver.js +4 -6
- package/src/bin/startTest.js +114 -43
- package/src/client.js +3 -5
- package/src/data-storage.js +9 -7
- package/src/pipe/testomatio.js +2 -1
- package/src/reporter-functions.js +37 -27
- package/src/reporter.js +6 -8
- package/src/services/index.js +2 -2
- package/src/services/labels.js +2 -2
- package/src/utils/utils.js +3 -5
- package/src/xmlReader.js +9 -267
- package/src/services/links.js +0 -69
package/lib/reporter.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
export type artifact = typeof import("./reporter-functions.js");
|
|
1
2
|
export const artifact: (data: string | {
|
|
2
3
|
path: string;
|
|
3
4
|
type: string;
|
|
4
5
|
name: string;
|
|
5
6
|
}, context?: any) => void;
|
|
7
|
+
export type log = typeof import("./reporter-functions.js");
|
|
6
8
|
export const log: (...args: any[]) => void;
|
|
9
|
+
export type logger = typeof import("./services/index.js");
|
|
7
10
|
export const logger: {
|
|
8
|
-
"__#
|
|
11
|
+
"__#13@#originalUserLogger": {
|
|
9
12
|
assert(condition?: boolean, ...data: any[]): void;
|
|
10
13
|
assert(value: any, message?: string, ...optionalParams: any[]): void;
|
|
11
14
|
clear(): void;
|
|
@@ -50,13 +53,13 @@ export const logger: {
|
|
|
50
53
|
profile(label?: string): void;
|
|
51
54
|
profileEnd(label?: string): void;
|
|
52
55
|
};
|
|
53
|
-
"__#
|
|
56
|
+
"__#13@#userLoggerWithOverridenMethods": any;
|
|
54
57
|
logLevel: string;
|
|
55
58
|
step(strings: any, ...values: any[]): void;
|
|
56
59
|
getLogs(context: string): string[];
|
|
57
|
-
"__#
|
|
60
|
+
"__#13@#stringifyLogs"(...args: any[]): string;
|
|
58
61
|
_templateLiteralLog(strings: any, ...args: any[]): void;
|
|
59
|
-
"__#
|
|
62
|
+
"__#13@#logWrapper"(argsArray: any, level: any): void;
|
|
60
63
|
assert(...args: any[]): void;
|
|
61
64
|
debug(...args: any[]): void;
|
|
62
65
|
error(...args: any[]): void;
|
|
@@ -72,15 +75,17 @@ export const logger: {
|
|
|
72
75
|
}): void;
|
|
73
76
|
prettyObjects: boolean;
|
|
74
77
|
};
|
|
78
|
+
export type meta = typeof import("./reporter-functions.js");
|
|
75
79
|
export const meta: (keyValue: {
|
|
76
80
|
[key: string]: string;
|
|
77
81
|
} | string, value?: string | null) => void;
|
|
82
|
+
export type step = typeof import("./reporter-functions.js");
|
|
78
83
|
export const step: (message: string) => void;
|
|
79
|
-
export
|
|
80
|
-
export const
|
|
84
|
+
export type label = typeof import("./reporter-functions.js");
|
|
85
|
+
export const label: (key: string, value?: string) => void;
|
|
81
86
|
declare namespace _default {
|
|
82
87
|
let testomatioLogger: {
|
|
83
|
-
"__#
|
|
88
|
+
"__#13@#originalUserLogger": {
|
|
84
89
|
assert(condition?: boolean, ...data: any[]): void;
|
|
85
90
|
assert(value: any, message?: string, ...optionalParams: any[]): void;
|
|
86
91
|
clear(): void;
|
|
@@ -125,13 +130,13 @@ declare namespace _default {
|
|
|
125
130
|
profile(label?: string): void;
|
|
126
131
|
profileEnd(label?: string): void;
|
|
127
132
|
};
|
|
128
|
-
"__#
|
|
133
|
+
"__#13@#userLoggerWithOverridenMethods": any;
|
|
129
134
|
logLevel: string;
|
|
130
135
|
step(strings: any, ...values: any[]): void;
|
|
131
136
|
getLogs(context: string): string[];
|
|
132
|
-
"__#
|
|
137
|
+
"__#13@#stringifyLogs"(...args: any[]): string;
|
|
133
138
|
_templateLiteralLog(strings: any, ...args: any[]): void;
|
|
134
|
-
"__#
|
|
139
|
+
"__#13@#logWrapper"(argsArray: any, level: any): void;
|
|
135
140
|
assert(...args: any[]): void;
|
|
136
141
|
debug(...args: any[]): void;
|
|
137
142
|
error(...args: any[]): void;
|
|
@@ -154,7 +159,7 @@ declare namespace _default {
|
|
|
154
159
|
}, context?: any) => void;
|
|
155
160
|
let log: (...args: any[]) => void;
|
|
156
161
|
let logger: {
|
|
157
|
-
"__#
|
|
162
|
+
"__#13@#originalUserLogger": {
|
|
158
163
|
assert(condition?: boolean, ...data: any[]): void;
|
|
159
164
|
assert(value: any, message?: string, ...optionalParams: any[]): void;
|
|
160
165
|
clear(): void;
|
|
@@ -199,13 +204,13 @@ declare namespace _default {
|
|
|
199
204
|
profile(label?: string): void;
|
|
200
205
|
profileEnd(label?: string): void;
|
|
201
206
|
};
|
|
202
|
-
"__#
|
|
207
|
+
"__#13@#userLoggerWithOverridenMethods": any;
|
|
203
208
|
logLevel: string;
|
|
204
209
|
step(strings: any, ...values: any[]): void;
|
|
205
210
|
getLogs(context: string): string[];
|
|
206
|
-
"__#
|
|
211
|
+
"__#13@#stringifyLogs"(...args: any[]): string;
|
|
207
212
|
_templateLiteralLog(strings: any, ...args: any[]): void;
|
|
208
|
-
"__#
|
|
213
|
+
"__#13@#logWrapper"(argsArray: any, level: any): void;
|
|
209
214
|
assert(...args: any[]): void;
|
|
210
215
|
debug(...args: any[]): void;
|
|
211
216
|
error(...args: any[]): void;
|
|
@@ -225,13 +230,6 @@ declare namespace _default {
|
|
|
225
230
|
[key: string]: string;
|
|
226
231
|
} | string, value?: string | null) => void;
|
|
227
232
|
let step: (message: string) => void;
|
|
228
|
-
let label: (key: string, value?: string
|
|
229
|
-
let linkTest: (...testIds: string[]) => void;
|
|
233
|
+
let label: (key: string, value?: string) => void;
|
|
230
234
|
}
|
|
231
235
|
export default _default;
|
|
232
|
-
export type ArtifactFunction = typeof import("./reporter-functions.js").default.artifact;
|
|
233
|
-
export type LogFunction = typeof import("./reporter-functions.js").default.log;
|
|
234
|
-
export type LoggerService = typeof import("./services/index.js").services.logger;
|
|
235
|
-
export type MetaFunction = typeof import("./reporter-functions.js").default.keyValue;
|
|
236
|
-
export type StepFunction = typeof import("./reporter-functions.js").default.step;
|
|
237
|
-
export type LabelFunction = typeof import("./reporter-functions.js").default.label;
|
package/lib/reporter.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.label = exports.step = exports.meta = exports.logger = exports.log = exports.artifact = void 0;
|
|
7
7
|
// import TestomatClient from './client.js';
|
|
8
8
|
// import * as TRConstants from './constants.js';
|
|
9
9
|
const index_js_1 = require("./services/index.js");
|
|
@@ -14,14 +14,13 @@ exports.logger = index_js_1.services.logger;
|
|
|
14
14
|
exports.meta = reporter_functions_js_1.default.keyValue;
|
|
15
15
|
exports.step = reporter_functions_js_1.default.step;
|
|
16
16
|
exports.label = reporter_functions_js_1.default.label;
|
|
17
|
-
exports.linkTest = reporter_functions_js_1.default.linkTest;
|
|
18
17
|
/**
|
|
19
|
-
* @typedef {
|
|
20
|
-
* @typedef {
|
|
21
|
-
* @typedef {
|
|
22
|
-
* @typedef {
|
|
23
|
-
* @typedef {
|
|
24
|
-
* @typedef {
|
|
18
|
+
* @typedef {import('./reporter-functions.js')} artifact
|
|
19
|
+
* @typedef {import('./reporter-functions.js')} log
|
|
20
|
+
* @typedef {import('./services/index.js')} logger
|
|
21
|
+
* @typedef {import('./reporter-functions.js')} meta
|
|
22
|
+
* @typedef {import('./reporter-functions.js')} step
|
|
23
|
+
* @typedef {import('./reporter-functions.js')} label
|
|
25
24
|
*/
|
|
26
25
|
module.exports = {
|
|
27
26
|
/**
|
|
@@ -34,7 +33,6 @@ module.exports = {
|
|
|
34
33
|
meta: reporter_functions_js_1.default.keyValue,
|
|
35
34
|
step: reporter_functions_js_1.default.step,
|
|
36
35
|
label: reporter_functions_js_1.default.label,
|
|
37
|
-
linkTest: reporter_functions_js_1.default.linkTest,
|
|
38
36
|
// TestomatClient,
|
|
39
37
|
// TRConstants,
|
|
40
38
|
};
|
package/lib/services/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ export namespace services {
|
|
|
2
2
|
export { logger };
|
|
3
3
|
export { artifactStorage as artifacts };
|
|
4
4
|
export { keyValueStorage as keyValues };
|
|
5
|
-
export {
|
|
5
|
+
export { labelStorage as labels };
|
|
6
6
|
export function setContext(context: any): void;
|
|
7
7
|
}
|
|
8
8
|
import { logger } from './logger.js';
|
|
9
9
|
import { artifactStorage } from './artifacts.js';
|
|
10
10
|
import { keyValueStorage } from './key-values.js';
|
|
11
|
-
import {
|
|
11
|
+
import { labelStorage } from './labels.js';
|
package/lib/services/index.js
CHANGED
|
@@ -4,13 +4,13 @@ exports.services = void 0;
|
|
|
4
4
|
const logger_js_1 = require("./logger.js");
|
|
5
5
|
const artifacts_js_1 = require("./artifacts.js");
|
|
6
6
|
const key_values_js_1 = require("./key-values.js");
|
|
7
|
-
const
|
|
7
|
+
const labels_js_1 = require("./labels.js");
|
|
8
8
|
const data_storage_js_1 = require("../data-storage.js");
|
|
9
9
|
exports.services = {
|
|
10
10
|
logger: logger_js_1.logger,
|
|
11
11
|
artifacts: artifacts_js_1.artifactStorage,
|
|
12
12
|
keyValues: key_values_js_1.keyValueStorage,
|
|
13
|
-
|
|
13
|
+
labels: labels_js_1.labelStorage,
|
|
14
14
|
setContext: context => {
|
|
15
15
|
data_storage_js_1.dataStorage.setContext(context);
|
|
16
16
|
},
|
package/lib/services/labels.d.ts
CHANGED
package/lib/services/labels.js
CHANGED
|
@@ -27,7 +27,7 @@ class LabelStorage {
|
|
|
27
27
|
put(labels, context = null) {
|
|
28
28
|
if (!labels || !Array.isArray(labels))
|
|
29
29
|
return;
|
|
30
|
-
data_storage_js_1.dataStorage.putData('
|
|
30
|
+
data_storage_js_1.dataStorage.putData('labels', labels, context);
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Returns labels array for the test
|
|
@@ -35,7 +35,7 @@ class LabelStorage {
|
|
|
35
35
|
* @returns {string[]} labels array, e.g. ['smoke', 'severity:high', 'feature:user_account']
|
|
36
36
|
*/
|
|
37
37
|
get(context = null) {
|
|
38
|
-
const labelsList = data_storage_js_1.dataStorage.getData('
|
|
38
|
+
const labelsList = data_storage_js_1.dataStorage.getData('labels', context);
|
|
39
39
|
if (!labelsList || !labelsList?.length)
|
|
40
40
|
return [];
|
|
41
41
|
const allLabels = [];
|
package/lib/services/logger.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function checkForEnvPassedAsArguments(): void;
|