@testomatio/reporter 2.6.0 → 2.6.2
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 +10 -10
- package/lib/adapter/playwright.d.ts +2 -12
- package/lib/adapter/playwright.js +15 -72
- package/lib/adapter/utils/playwright.d.ts +25 -0
- package/lib/adapter/utils/playwright.js +123 -0
- package/lib/adapter/vitest.js +2 -1
- package/lib/bin/cli.js +1 -1
- package/lib/data-storage.d.ts +1 -1
- package/lib/data-storage.js +1 -0
- package/lib/pipe/debug.js +1 -1
- package/lib/pipe/html.d.ts +2 -3
- package/lib/pipe/html.js +745 -37
- package/lib/pipe/testomatio.js +13 -2
- package/lib/reporter-functions.d.ts +36 -11
- package/lib/reporter-functions.js +67 -25
- package/lib/reporter.d.ts +42 -86
- package/lib/services/artifacts.d.ts +1 -1
- package/lib/services/key-values.d.ts +1 -1
- package/lib/services/links.d.ts +1 -1
- package/lib/services/logger.d.ts +1 -1
- package/lib/template/testomatio-old.hbs +1421 -0
- package/lib/template/testomatio.hbs +3200 -1157
- package/lib/utils/log-formatter.d.ts +2 -1
- package/lib/utils/log-formatter.js +8 -4
- package/package.json +5 -2
- package/src/adapter/playwright.js +15 -79
- package/src/adapter/utils/playwright.js +121 -0
- package/src/adapter/vitest.js +2 -1
- package/src/bin/cli.js +1 -1
- package/src/data-storage.js +1 -0
- package/src/pipe/debug.js +1 -1
- package/src/pipe/html.js +844 -38
- package/src/pipe/testomatio.js +13 -2
- package/src/reporter-functions.js +68 -28
- package/src/template/testomatio-old.hbs +1421 -0
- package/src/template/testomatio.hbs +3200 -1157
- package/src/utils/log-formatter.js +9 -4
- package/types/types.d.ts +29 -5
- package/lib/services/labels.d.ts +0 -0
- package/lib/services/labels.js +0 -0
- package/src/services/labels.js +0 -1
|
@@ -102,11 +102,16 @@ export function formatError(error, message) {
|
|
|
102
102
|
* @returns {boolean}
|
|
103
103
|
*/
|
|
104
104
|
function isNotInternalFrame(frame) {
|
|
105
|
+
const fileName = frame.getFileName();
|
|
106
|
+
if (!fileName) return false;
|
|
107
|
+
|
|
108
|
+
const isFileUrl = fileName.startsWith('file://');
|
|
109
|
+
const hasPathSeparator = fileName.includes(sep) || fileName.includes('/') || isFileUrl;
|
|
110
|
+
|
|
105
111
|
return (
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
!
|
|
109
|
-
!frame.getFileName().includes('internal')
|
|
112
|
+
hasPathSeparator &&
|
|
113
|
+
!fileName.includes('node_modules') &&
|
|
114
|
+
!fileName.includes('internal')
|
|
110
115
|
);
|
|
111
116
|
}
|
|
112
117
|
|
package/types/types.d.ts
CHANGED
|
@@ -28,22 +28,22 @@ declare module '@testomatio/reporter' {
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Add a single label to the test report
|
|
31
|
-
* @param key - label key (e.g. 'severity', 'feature', or just 'smoke' for labels without values)
|
|
32
|
-
* @param value - optional label value (
|
|
31
|
+
* @param {string | {[key: string]: string}} key - label key (e.g. 'severity', 'feature', or just 'smoke' for labels without values)
|
|
32
|
+
* @param {string | null} [value=null] - optional label value (of custom field value) (used when key is a string)
|
|
33
33
|
*/
|
|
34
|
-
export function label(key: string, value?: string | null): void;
|
|
34
|
+
export function label(key: string | { [key: string]: string }, value?: string | null): void;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Add link(s) to the test report
|
|
38
38
|
* @param testIds - test IDs to link
|
|
39
39
|
*/
|
|
40
|
-
export function linkTest(...testIds: string[]): void;
|
|
40
|
+
export function linkTest(...testIds: (string | string[])[]): void;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Add JIRA issue link(s) to the test report
|
|
44
44
|
* @param jiraIds - JIRA issue IDs to link
|
|
45
45
|
*/
|
|
46
|
-
export function linkJira(...jiraIds: string[]): void;
|
|
46
|
+
export function linkJira(...jiraIds: (string | string[])[]): void;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Logger service for intercepting and managing logs
|
|
@@ -159,6 +159,12 @@ export interface TestData {
|
|
|
159
159
|
/** The unique identifier from Testomat.io of the test case. If provided, updates the existing test case with the given ID. */
|
|
160
160
|
test_id?: string;
|
|
161
161
|
|
|
162
|
+
/** The status of the test (passed, failed, skipped, etc.) */
|
|
163
|
+
status?: 'passed' | 'failed' | 'skipped';
|
|
164
|
+
|
|
165
|
+
/** An array of artifacts associated with the test case (screenshots, videos, traces, etc.) */
|
|
166
|
+
artifacts?: ArtifactData[];
|
|
167
|
+
|
|
162
168
|
/** An object representing an error that occurred during the execution of the test case. */
|
|
163
169
|
error?: Error;
|
|
164
170
|
|
|
@@ -207,6 +213,24 @@ export interface TestData {
|
|
|
207
213
|
overwrite?: boolean;
|
|
208
214
|
}
|
|
209
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Extended test data for HTML reporter.
|
|
218
|
+
*/
|
|
219
|
+
export interface HtmlTestData extends TestData {
|
|
220
|
+
meta?: { [key: string]: any } & {
|
|
221
|
+
attachments?: any[];
|
|
222
|
+
traces?: any;
|
|
223
|
+
console?: any;
|
|
224
|
+
stdout?: any;
|
|
225
|
+
stderr?: any;
|
|
226
|
+
logs?: any;
|
|
227
|
+
retryCount?: number;
|
|
228
|
+
isFlaky?: boolean;
|
|
229
|
+
attempts?: any[];
|
|
230
|
+
retries?: any[];
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
|
|
210
234
|
/**
|
|
211
235
|
* Object representing a result of a Run.
|
|
212
236
|
*/
|
package/lib/services/labels.d.ts
DELETED
|
File without changes
|
package/lib/services/labels.js
DELETED
|
File without changes
|
package/src/services/labels.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|