monocart-reporter 2.9.6 → 2.9.7
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/LICENSE +21 -21
- package/README.md +1180 -1180
- package/lib/cli.js +372 -372
- package/lib/common.js +244 -244
- package/lib/default/columns.js +79 -79
- package/lib/default/options.js +95 -95
- package/lib/default/summary.js +80 -80
- package/lib/default/template.html +47 -47
- package/lib/generate-data.js +174 -174
- package/lib/generate-report.js +360 -360
- package/lib/index.d.ts +268 -268
- package/lib/index.js +253 -253
- package/lib/index.mjs +19 -19
- package/lib/merge-data.js +405 -405
- package/lib/packages/monocart-reporter-assets.js +3 -3
- package/lib/platform/concurrency.js +74 -74
- package/lib/platform/share.js +369 -369
- package/lib/plugins/audit/audit.js +119 -119
- package/lib/plugins/comments.js +124 -124
- package/lib/plugins/coverage/coverage.js +169 -169
- package/lib/plugins/email.js +76 -76
- package/lib/plugins/metadata/metadata.js +25 -25
- package/lib/plugins/network/network.js +186 -186
- package/lib/plugins/state/client.js +152 -152
- package/lib/plugins/state/state.js +194 -194
- package/lib/utils/pie.js +148 -148
- package/lib/utils/system.js +145 -145
- package/lib/utils/util.js +511 -511
- package/lib/visitor.js +915 -915
- package/package.json +89 -89
package/lib/default/options.js
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
module.exports = () => ({
|
|
2
|
-
// logging levels: off, error, info, debug
|
|
3
|
-
logging: 'info',
|
|
4
|
-
|
|
5
|
-
// the report name
|
|
6
|
-
name: '',
|
|
7
|
-
|
|
8
|
-
// the output html file path (relative process.cwd)
|
|
9
|
-
outputFile: './monocart-report/index.html',
|
|
10
|
-
|
|
11
|
-
json: true,
|
|
12
|
-
zip: false,
|
|
13
|
-
|
|
14
|
-
// whether to copy attachments to the reporter output dir, defaults to true
|
|
15
|
-
// it is useful when there are multiple html reports being output.
|
|
16
|
-
copyAttachments: true,
|
|
17
|
-
|
|
18
|
-
// attachment path handler
|
|
19
|
-
attachmentPath: null,
|
|
20
|
-
// attachmentPath: (currentPath, extras) => `https://cenfun.github.io/monocart-reporter/${currentPath}`,
|
|
21
|
-
|
|
22
|
-
// custom trace viewer url
|
|
23
|
-
traceViewerUrl: 'https://trace.playwright.dev/?trace={traceUrl}',
|
|
24
|
-
|
|
25
|
-
// timezone offset in minutes, GMT+0800 = -480
|
|
26
|
-
timezoneOffset: 0,
|
|
27
|
-
|
|
28
|
-
// normal or exclude-idle
|
|
29
|
-
durationStrategy: null,
|
|
30
|
-
|
|
31
|
-
// global coverage settings for addCoverageReport API
|
|
32
|
-
coverage: null,
|
|
33
|
-
// coverage: {
|
|
34
|
-
// entryFilter: (entry) => true,
|
|
35
|
-
// sourceFilter: (sourcePath) => sourcePath.search(/src\/.+/) !== -1,
|
|
36
|
-
// },
|
|
37
|
-
|
|
38
|
-
// Global State Management
|
|
39
|
-
state: null,
|
|
40
|
-
|
|
41
|
-
// trend data handler
|
|
42
|
-
trend: null,
|
|
43
|
-
// trend: () => './monocart-report/index.json',
|
|
44
|
-
|
|
45
|
-
// custom tags style
|
|
46
|
-
tags: null,
|
|
47
|
-
// tags: {
|
|
48
|
-
// smoke: {
|
|
49
|
-
// 'background': '#6F9913'
|
|
50
|
-
// },
|
|
51
|
-
// sanity: {
|
|
52
|
-
// 'background': '#178F43'
|
|
53
|
-
// }
|
|
54
|
-
// },
|
|
55
|
-
|
|
56
|
-
// columns data handler
|
|
57
|
-
columns: null,
|
|
58
|
-
// columns: (defaultColumns) => {},
|
|
59
|
-
|
|
60
|
-
// rows data handler (suite, case and step)
|
|
61
|
-
visitor: null,
|
|
62
|
-
// visitor: (data, metadata) => {},
|
|
63
|
-
|
|
64
|
-
// enable/disable custom fields in comments. Defaults to true.
|
|
65
|
-
customFieldsInComments: true,
|
|
66
|
-
|
|
67
|
-
// mermaid options
|
|
68
|
-
mermaid: null,
|
|
69
|
-
// mermaid: {
|
|
70
|
-
// scriptSrc: 'https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js',
|
|
71
|
-
// // mermaid config https://mermaid.js.org/config/schema-docs/config.html
|
|
72
|
-
// config: {
|
|
73
|
-
// startOnLoad: false
|
|
74
|
-
// }
|
|
75
|
-
// },
|
|
76
|
-
|
|
77
|
-
// enable/disable group or levels
|
|
78
|
-
groupOptions: null,
|
|
79
|
-
// groupOptions: {
|
|
80
|
-
// group: true,
|
|
81
|
-
|
|
82
|
-
// shard: true,
|
|
83
|
-
// project: true,
|
|
84
|
-
// file: true,
|
|
85
|
-
// describe: true,
|
|
86
|
-
// step: false,
|
|
87
|
-
|
|
88
|
-
// merge: false
|
|
89
|
-
// },
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
// onEnd hook
|
|
93
|
-
onEnd: null
|
|
94
|
-
// onEnd: async (reportData, helper) => {}
|
|
95
|
-
});
|
|
1
|
+
module.exports = () => ({
|
|
2
|
+
// logging levels: off, error, info, debug
|
|
3
|
+
logging: 'info',
|
|
4
|
+
|
|
5
|
+
// the report name
|
|
6
|
+
name: '',
|
|
7
|
+
|
|
8
|
+
// the output html file path (relative process.cwd)
|
|
9
|
+
outputFile: './monocart-report/index.html',
|
|
10
|
+
|
|
11
|
+
json: true,
|
|
12
|
+
zip: false,
|
|
13
|
+
|
|
14
|
+
// whether to copy attachments to the reporter output dir, defaults to true
|
|
15
|
+
// it is useful when there are multiple html reports being output.
|
|
16
|
+
copyAttachments: true,
|
|
17
|
+
|
|
18
|
+
// attachment path handler
|
|
19
|
+
attachmentPath: null,
|
|
20
|
+
// attachmentPath: (currentPath, extras) => `https://cenfun.github.io/monocart-reporter/${currentPath}`,
|
|
21
|
+
|
|
22
|
+
// custom trace viewer url
|
|
23
|
+
traceViewerUrl: 'https://trace.playwright.dev/?trace={traceUrl}',
|
|
24
|
+
|
|
25
|
+
// timezone offset in minutes, GMT+0800 = -480
|
|
26
|
+
timezoneOffset: 0,
|
|
27
|
+
|
|
28
|
+
// normal or exclude-idle
|
|
29
|
+
durationStrategy: null,
|
|
30
|
+
|
|
31
|
+
// global coverage settings for addCoverageReport API
|
|
32
|
+
coverage: null,
|
|
33
|
+
// coverage: {
|
|
34
|
+
// entryFilter: (entry) => true,
|
|
35
|
+
// sourceFilter: (sourcePath) => sourcePath.search(/src\/.+/) !== -1,
|
|
36
|
+
// },
|
|
37
|
+
|
|
38
|
+
// Global State Management
|
|
39
|
+
state: null,
|
|
40
|
+
|
|
41
|
+
// trend data handler
|
|
42
|
+
trend: null,
|
|
43
|
+
// trend: () => './monocart-report/index.json',
|
|
44
|
+
|
|
45
|
+
// custom tags style
|
|
46
|
+
tags: null,
|
|
47
|
+
// tags: {
|
|
48
|
+
// smoke: {
|
|
49
|
+
// 'background': '#6F9913'
|
|
50
|
+
// },
|
|
51
|
+
// sanity: {
|
|
52
|
+
// 'background': '#178F43'
|
|
53
|
+
// }
|
|
54
|
+
// },
|
|
55
|
+
|
|
56
|
+
// columns data handler
|
|
57
|
+
columns: null,
|
|
58
|
+
// columns: (defaultColumns) => {},
|
|
59
|
+
|
|
60
|
+
// rows data handler (suite, case and step)
|
|
61
|
+
visitor: null,
|
|
62
|
+
// visitor: (data, metadata) => {},
|
|
63
|
+
|
|
64
|
+
// enable/disable custom fields in comments. Defaults to true.
|
|
65
|
+
customFieldsInComments: true,
|
|
66
|
+
|
|
67
|
+
// mermaid options
|
|
68
|
+
mermaid: null,
|
|
69
|
+
// mermaid: {
|
|
70
|
+
// scriptSrc: 'https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js',
|
|
71
|
+
// // mermaid config https://mermaid.js.org/config/schema-docs/config.html
|
|
72
|
+
// config: {
|
|
73
|
+
// startOnLoad: false
|
|
74
|
+
// }
|
|
75
|
+
// },
|
|
76
|
+
|
|
77
|
+
// enable/disable group or levels
|
|
78
|
+
groupOptions: null,
|
|
79
|
+
// groupOptions: {
|
|
80
|
+
// group: true,
|
|
81
|
+
|
|
82
|
+
// shard: true,
|
|
83
|
+
// project: true,
|
|
84
|
+
// file: true,
|
|
85
|
+
// describe: true,
|
|
86
|
+
// step: false,
|
|
87
|
+
|
|
88
|
+
// merge: false
|
|
89
|
+
// },
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
// onEnd hook
|
|
93
|
+
onEnd: null
|
|
94
|
+
// onEnd: async (reportData, helper) => {}
|
|
95
|
+
});
|
package/lib/default/summary.js
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
module.exports = () => ({
|
|
2
|
-
tests: {
|
|
3
|
-
name: 'Tests',
|
|
4
|
-
value: 0,
|
|
5
|
-
nav: true
|
|
6
|
-
},
|
|
7
|
-
passed: {
|
|
8
|
-
name: 'Passed',
|
|
9
|
-
value: 0,
|
|
10
|
-
color: 'green',
|
|
11
|
-
nav: true
|
|
12
|
-
},
|
|
13
|
-
flaky: {
|
|
14
|
-
name: 'Flaky',
|
|
15
|
-
value: 0,
|
|
16
|
-
color: 'orange',
|
|
17
|
-
nav: true
|
|
18
|
-
},
|
|
19
|
-
skipped: {
|
|
20
|
-
name: 'Skipped',
|
|
21
|
-
value: 0,
|
|
22
|
-
color: 'gray',
|
|
23
|
-
nav: true
|
|
24
|
-
},
|
|
25
|
-
failed: {
|
|
26
|
-
name: 'Failed',
|
|
27
|
-
value: 0,
|
|
28
|
-
color: '#d00',
|
|
29
|
-
nav: true
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
steps: {
|
|
33
|
-
name: 'Steps',
|
|
34
|
-
value: 0
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
suites: {
|
|
38
|
-
name: 'Suites',
|
|
39
|
-
value: 0
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
projects: {
|
|
43
|
-
name: 'Projects',
|
|
44
|
-
description: 'Suite type is project',
|
|
45
|
-
value: 0
|
|
46
|
-
},
|
|
47
|
-
files: {
|
|
48
|
-
name: 'Files',
|
|
49
|
-
description: 'Suite type is file',
|
|
50
|
-
value: 0
|
|
51
|
-
},
|
|
52
|
-
describes: {
|
|
53
|
-
name: 'Describes',
|
|
54
|
-
description: 'Suite type is describe',
|
|
55
|
-
value: 0
|
|
56
|
-
},
|
|
57
|
-
shards: {
|
|
58
|
-
name: 'Shards',
|
|
59
|
-
description: 'Suite type is shard (only in shading mode)',
|
|
60
|
-
value: 0
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
retries: {
|
|
64
|
-
name: 'Retries',
|
|
65
|
-
value: 0
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
errors: {
|
|
69
|
-
name: 'Errors',
|
|
70
|
-
value: 0
|
|
71
|
-
},
|
|
72
|
-
logs: {
|
|
73
|
-
name: 'Logs',
|
|
74
|
-
value: 0
|
|
75
|
-
},
|
|
76
|
-
attachments: {
|
|
77
|
-
name: 'Attachments',
|
|
78
|
-
value: 0
|
|
79
|
-
}
|
|
80
|
-
});
|
|
1
|
+
module.exports = () => ({
|
|
2
|
+
tests: {
|
|
3
|
+
name: 'Tests',
|
|
4
|
+
value: 0,
|
|
5
|
+
nav: true
|
|
6
|
+
},
|
|
7
|
+
passed: {
|
|
8
|
+
name: 'Passed',
|
|
9
|
+
value: 0,
|
|
10
|
+
color: 'green',
|
|
11
|
+
nav: true
|
|
12
|
+
},
|
|
13
|
+
flaky: {
|
|
14
|
+
name: 'Flaky',
|
|
15
|
+
value: 0,
|
|
16
|
+
color: 'orange',
|
|
17
|
+
nav: true
|
|
18
|
+
},
|
|
19
|
+
skipped: {
|
|
20
|
+
name: 'Skipped',
|
|
21
|
+
value: 0,
|
|
22
|
+
color: 'gray',
|
|
23
|
+
nav: true
|
|
24
|
+
},
|
|
25
|
+
failed: {
|
|
26
|
+
name: 'Failed',
|
|
27
|
+
value: 0,
|
|
28
|
+
color: '#d00',
|
|
29
|
+
nav: true
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
steps: {
|
|
33
|
+
name: 'Steps',
|
|
34
|
+
value: 0
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
suites: {
|
|
38
|
+
name: 'Suites',
|
|
39
|
+
value: 0
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
projects: {
|
|
43
|
+
name: 'Projects',
|
|
44
|
+
description: 'Suite type is project',
|
|
45
|
+
value: 0
|
|
46
|
+
},
|
|
47
|
+
files: {
|
|
48
|
+
name: 'Files',
|
|
49
|
+
description: 'Suite type is file',
|
|
50
|
+
value: 0
|
|
51
|
+
},
|
|
52
|
+
describes: {
|
|
53
|
+
name: 'Describes',
|
|
54
|
+
description: 'Suite type is describe',
|
|
55
|
+
value: 0
|
|
56
|
+
},
|
|
57
|
+
shards: {
|
|
58
|
+
name: 'Shards',
|
|
59
|
+
description: 'Suite type is shard (only in shading mode)',
|
|
60
|
+
value: 0
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
retries: {
|
|
64
|
+
name: 'Retries',
|
|
65
|
+
value: 0
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
errors: {
|
|
69
|
+
name: 'Errors',
|
|
70
|
+
value: 0
|
|
71
|
+
},
|
|
72
|
+
logs: {
|
|
73
|
+
name: 'Logs',
|
|
74
|
+
value: 0
|
|
75
|
+
},
|
|
76
|
+
attachments: {
|
|
77
|
+
name: 'Attachments',
|
|
78
|
+
value: 0
|
|
79
|
+
}
|
|
80
|
+
});
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<link rel="icon" href="data:,">
|
|
7
|
-
<title>{title}</title>
|
|
8
|
-
<style>
|
|
9
|
-
@keyframes fs-loading-animation {
|
|
10
|
-
0% {
|
|
11
|
-
transform: rotate(0deg);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
100% {
|
|
15
|
-
transform: rotate(360deg);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.fs-loading {
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: 50%;
|
|
22
|
-
left: 50%;
|
|
23
|
-
z-index: 100;
|
|
24
|
-
width: 50px;
|
|
25
|
-
height: 50px;
|
|
26
|
-
margin-top: -25px;
|
|
27
|
-
margin-left: -25px;
|
|
28
|
-
animation: 0.382s fs-loading-animation linear infinite;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.fs-loading svg {
|
|
32
|
-
display: block;
|
|
33
|
-
width: 100%;
|
|
34
|
-
height: 100%;
|
|
35
|
-
pointer-events: none;
|
|
36
|
-
}
|
|
37
|
-
</style>
|
|
38
|
-
</head>
|
|
39
|
-
<body>
|
|
40
|
-
<div class="fs-loading">
|
|
41
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
42
|
-
<path d="M1,8 A7 7 0 1 1 8 15" stroke="#999" stroke-width="2" stroke-linecap="round" fill="none"/>
|
|
43
|
-
</svg>
|
|
44
|
-
</div>
|
|
45
|
-
{content}
|
|
46
|
-
</body>
|
|
47
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<link rel="icon" href="data:,">
|
|
7
|
+
<title>{title}</title>
|
|
8
|
+
<style>
|
|
9
|
+
@keyframes fs-loading-animation {
|
|
10
|
+
0% {
|
|
11
|
+
transform: rotate(0deg);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
100% {
|
|
15
|
+
transform: rotate(360deg);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.fs-loading {
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 50%;
|
|
22
|
+
left: 50%;
|
|
23
|
+
z-index: 100;
|
|
24
|
+
width: 50px;
|
|
25
|
+
height: 50px;
|
|
26
|
+
margin-top: -25px;
|
|
27
|
+
margin-left: -25px;
|
|
28
|
+
animation: 0.382s fs-loading-animation linear infinite;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.fs-loading svg {
|
|
32
|
+
display: block;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
38
|
+
</head>
|
|
39
|
+
<body>
|
|
40
|
+
<div class="fs-loading">
|
|
41
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
42
|
+
<path d="M1,8 A7 7 0 1 1 8 15" stroke="#999" stroke-width="2" stroke-linecap="round" fill="none"/>
|
|
43
|
+
</svg>
|
|
44
|
+
</div>
|
|
45
|
+
{content}
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|