monocart-reporter 1.7.10 → 1.7.12
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/generate-data.js +14 -1
- package/lib/index.d.ts +14 -5
- package/lib/index.js +4 -1
- package/lib/index.mjs +1 -0
- package/lib/plugins/audit/audit.js +3 -3
- package/lib/plugins/coverage/coverage.js +12 -21
- package/lib/plugins/network/network.js +3 -3
- package/lib/runtime/monocart-reporter.js +1 -1
- package/lib/utils/util.js +30 -1
- package/package.json +3 -3
package/lib/utils/util.js
CHANGED
|
@@ -68,7 +68,10 @@ const Util = {
|
|
|
68
68
|
return parsed;
|
|
69
69
|
},
|
|
70
70
|
|
|
71
|
-
resolveOutputDir: (testInfo) => {
|
|
71
|
+
resolveOutputDir: (testInfo, options) => {
|
|
72
|
+
if (options && options.outputDir) {
|
|
73
|
+
return options.outputDir;
|
|
74
|
+
}
|
|
72
75
|
const outputDir = testInfo.project.outputDir || testInfo.config.outputDir;
|
|
73
76
|
if (outputDir) {
|
|
74
77
|
return outputDir;
|
|
@@ -76,6 +79,16 @@ const Util = {
|
|
|
76
79
|
return path.resolve(testInfo.outputDir, '../');
|
|
77
80
|
},
|
|
78
81
|
|
|
82
|
+
resolveGlobalOutputDir: async (testInfo, options) => {
|
|
83
|
+
if (options && options.outputDir) {
|
|
84
|
+
return options.outputDir;
|
|
85
|
+
}
|
|
86
|
+
const reporterOptions = Util.resolveReporterOptions(testInfo);
|
|
87
|
+
const outputFile = await Util.resolveOutputFile(reporterOptions.outputFile);
|
|
88
|
+
const outputDir = path.dirname(outputFile);
|
|
89
|
+
return outputDir;
|
|
90
|
+
},
|
|
91
|
+
|
|
79
92
|
resolveOutputFile: async (outputFile) => {
|
|
80
93
|
if (typeof outputFile === 'function') {
|
|
81
94
|
outputFile = await outputFile();
|
|
@@ -86,6 +99,22 @@ const Util = {
|
|
|
86
99
|
return './test-results/report.html';
|
|
87
100
|
},
|
|
88
101
|
|
|
102
|
+
resolveLogging: (testInfo, options) => {
|
|
103
|
+
if (options && options.logging) {
|
|
104
|
+
return options.logging;
|
|
105
|
+
}
|
|
106
|
+
const reporterOptions = Util.resolveReporterOptions(testInfo);
|
|
107
|
+
return reporterOptions.logging;
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
resolveCoverageOptions: (testInfo, options) => {
|
|
111
|
+
const reporterOptions = Util.resolveReporterOptions(testInfo);
|
|
112
|
+
return {
|
|
113
|
+
... reporterOptions.coverage,
|
|
114
|
+
... options
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
|
|
89
118
|
resolveReporterOptions: (testInfo) => {
|
|
90
119
|
if (!testInfo) {
|
|
91
120
|
return {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monocart-reporter",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.12",
|
|
4
4
|
"description": "A playwright test reporter. Shows suites/cases/steps with tree style, markdown annotations, custom columns/formatters/data collection visitors, console logs, style tags, send email.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"open": "^9.1.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@playwright/test": "^1.38.
|
|
55
|
+
"@playwright/test": "^1.38.1",
|
|
56
56
|
"axios": "^1.5.0",
|
|
57
57
|
"dotenv": "^16.3.1",
|
|
58
|
-
"eslint": "^8.
|
|
58
|
+
"eslint": "^8.50.0",
|
|
59
59
|
"eslint-config-plus": "^1.0.6",
|
|
60
60
|
"eslint-plugin-html": "^7.1.0",
|
|
61
61
|
"eslint-plugin-vue": "^9.17.0",
|