monocart-reporter 2.9.20 → 2.9.22
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 +1 -1
- package/lib/generate-report.js +6 -1
- package/lib/index.js +4 -4
- package/lib/packages/monocart-reporter-assets.js +2 -2
- package/lib/packages/monocart-reporter-vendor.js +22 -22
- package/lib/platform/share.js +1 -1
- package/lib/utils/pie.js +1 -1
- package/lib/visitor.js +8 -1
- package/package.json +89 -89
package/lib/generate-data.js
CHANGED
|
@@ -127,7 +127,7 @@ const generateData = async (results) => {
|
|
|
127
127
|
const locale = options.locale;
|
|
128
128
|
|
|
129
129
|
// add one last tick before end time
|
|
130
|
-
const timestamp =
|
|
130
|
+
const timestamp = Date.now();
|
|
131
131
|
const tickInfo = await getTickInfo(timestamp);
|
|
132
132
|
system.ticks.push(tickInfo);
|
|
133
133
|
|
package/lib/generate-report.js
CHANGED
|
@@ -205,12 +205,17 @@ const showTestResults = (reportData) => {
|
|
|
205
205
|
// for shards
|
|
206
206
|
const system = Array.isArray(reportData.system) ? reportData.system[0] : reportData.system;
|
|
207
207
|
|
|
208
|
+
// console.log(Util.dateFormat(reportData.date, reportData.locale));
|
|
209
|
+
|
|
210
|
+
const timezoneDate = Util.addTimezoneOffset(reportData.date, reportData.timezoneOffset);
|
|
211
|
+
// console.log(Util.dateFormat(timezoneDate, reportData.locale));
|
|
212
|
+
|
|
208
213
|
rows = rows.concat([{
|
|
209
214
|
name: 'Playwright',
|
|
210
215
|
value: `v${system.playwright}`
|
|
211
216
|
}, {
|
|
212
217
|
name: 'Date',
|
|
213
|
-
value: Util.dateFormat(
|
|
218
|
+
value: Util.dateFormat(timezoneDate, reportData.locale)
|
|
214
219
|
}, {
|
|
215
220
|
name: 'Duration',
|
|
216
221
|
value: Util.TF(reportData.duration)
|
package/lib/index.js
CHANGED
|
@@ -52,7 +52,7 @@ class MonocartReporter {
|
|
|
52
52
|
this.testMap = new Map();
|
|
53
53
|
|
|
54
54
|
this.system = getSystemInfo();
|
|
55
|
-
this.system.timestampStart =
|
|
55
|
+
this.system.timestampStart = timestampStart;
|
|
56
56
|
this.system.ticks = [];
|
|
57
57
|
|
|
58
58
|
this.tickTime = this.options.tickTime || 1000;
|
|
@@ -144,7 +144,7 @@ class MonocartReporter {
|
|
|
144
144
|
|
|
145
145
|
tickStart() {
|
|
146
146
|
this.tick_time_id = setTimeout(async () => {
|
|
147
|
-
const timestamp =
|
|
147
|
+
const timestamp = Date.now();
|
|
148
148
|
const tickInfo = await getTickInfo(timestamp);
|
|
149
149
|
this.system.ticks.push(tickInfo);
|
|
150
150
|
this.tickStart();
|
|
@@ -206,7 +206,7 @@ class MonocartReporter {
|
|
|
206
206
|
if (!test.timestamps) {
|
|
207
207
|
test.timestamps = [];
|
|
208
208
|
}
|
|
209
|
-
test.timestamps.push(
|
|
209
|
+
test.timestamps.push(Date.now());
|
|
210
210
|
|
|
211
211
|
// keep logs here with order
|
|
212
212
|
// result stderr and stdout without order
|
|
@@ -250,7 +250,7 @@ class MonocartReporter {
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
// timestamps
|
|
253
|
-
test.timestamps.push(
|
|
253
|
+
test.timestamps.push(Date.now());
|
|
254
254
|
|
|
255
255
|
}
|
|
256
256
|
|