@appsurify-testmap/rrweb-cypress-plugin 2.1.1-alpha.6
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 +2 -0
- package/dist/rrweb-cypress-plugin-reporter.cjs +384 -0
- package/dist/rrweb-cypress-plugin-reporter.cjs.map +1 -0
- package/dist/rrweb-cypress-plugin-reporter.d.cts +16 -0
- package/dist/rrweb-cypress-plugin-reporter.d.ts +16 -0
- package/dist/rrweb-cypress-plugin-reporter.js +367 -0
- package/dist/rrweb-cypress-plugin-reporter.js.map +1 -0
- package/dist/rrweb-cypress-plugin-reporter.umd.cjs +434 -0
- package/dist/rrweb-cypress-plugin-reporter.umd.cjs.map +7 -0
- package/dist/rrweb-cypress-plugin-reporter.umd.min.cjs +32 -0
- package/dist/rrweb-cypress-plugin-reporter.umd.min.cjs.map +7 -0
- package/dist/rrweb-cypress-plugin.cjs +537 -0
- package/dist/rrweb-cypress-plugin.cjs.map +1 -0
- package/dist/rrweb-cypress-plugin.d.cts +3 -0
- package/dist/rrweb-cypress-plugin.d.ts +3 -0
- package/dist/rrweb-cypress-plugin.js +537 -0
- package/dist/rrweb-cypress-plugin.js.map +1 -0
- package/dist/rrweb-cypress-plugin.umd.cjs +590 -0
- package/dist/rrweb-cypress-plugin.umd.cjs.map +7 -0
- package/dist/rrweb-cypress-plugin.umd.min.cjs +13171 -0
- package/dist/rrweb-cypress-plugin.umd.min.cjs.map +7 -0
- package/package.json +69 -0
package/Readme.md
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const path = require("path");
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
function _interopNamespaceDefault(e) {
|
|
5
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
6
|
+
if (e) {
|
|
7
|
+
for (const k in e) {
|
|
8
|
+
if (k !== "default") {
|
|
9
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: () => e[k]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
n.default = e;
|
|
18
|
+
return Object.freeze(n);
|
|
19
|
+
}
|
|
20
|
+
const path__namespace = /* @__PURE__ */ _interopNamespaceDefault(path);
|
|
21
|
+
const fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs);
|
|
22
|
+
var EventType = /* @__PURE__ */ ((EventType2) => {
|
|
23
|
+
EventType2[EventType2["DomContentLoaded"] = 0] = "DomContentLoaded";
|
|
24
|
+
EventType2[EventType2["Load"] = 1] = "Load";
|
|
25
|
+
EventType2[EventType2["FullSnapshot"] = 2] = "FullSnapshot";
|
|
26
|
+
EventType2[EventType2["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
|
|
27
|
+
EventType2[EventType2["Meta"] = 4] = "Meta";
|
|
28
|
+
EventType2[EventType2["Custom"] = 5] = "Custom";
|
|
29
|
+
EventType2[EventType2["Plugin"] = 6] = "Plugin";
|
|
30
|
+
return EventType2;
|
|
31
|
+
})(EventType || {});
|
|
32
|
+
var IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {
|
|
33
|
+
IncrementalSource2[IncrementalSource2["Mutation"] = 0] = "Mutation";
|
|
34
|
+
IncrementalSource2[IncrementalSource2["MouseMove"] = 1] = "MouseMove";
|
|
35
|
+
IncrementalSource2[IncrementalSource2["MouseInteraction"] = 2] = "MouseInteraction";
|
|
36
|
+
IncrementalSource2[IncrementalSource2["Scroll"] = 3] = "Scroll";
|
|
37
|
+
IncrementalSource2[IncrementalSource2["ViewportResize"] = 4] = "ViewportResize";
|
|
38
|
+
IncrementalSource2[IncrementalSource2["Input"] = 5] = "Input";
|
|
39
|
+
IncrementalSource2[IncrementalSource2["TouchMove"] = 6] = "TouchMove";
|
|
40
|
+
IncrementalSource2[IncrementalSource2["MediaInteraction"] = 7] = "MediaInteraction";
|
|
41
|
+
IncrementalSource2[IncrementalSource2["StyleSheetRule"] = 8] = "StyleSheetRule";
|
|
42
|
+
IncrementalSource2[IncrementalSource2["CanvasMutation"] = 9] = "CanvasMutation";
|
|
43
|
+
IncrementalSource2[IncrementalSource2["Font"] = 10] = "Font";
|
|
44
|
+
IncrementalSource2[IncrementalSource2["Log"] = 11] = "Log";
|
|
45
|
+
IncrementalSource2[IncrementalSource2["Drag"] = 12] = "Drag";
|
|
46
|
+
IncrementalSource2[IncrementalSource2["StyleDeclaration"] = 13] = "StyleDeclaration";
|
|
47
|
+
IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection";
|
|
48
|
+
IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
|
|
49
|
+
IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement";
|
|
50
|
+
IncrementalSource2[IncrementalSource2["VisibilityMutation"] = 17] = "VisibilityMutation";
|
|
51
|
+
return IncrementalSource2;
|
|
52
|
+
})(IncrementalSource || {});
|
|
53
|
+
var MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {
|
|
54
|
+
MouseInteractions2[MouseInteractions2["MouseUp"] = 0] = "MouseUp";
|
|
55
|
+
MouseInteractions2[MouseInteractions2["MouseDown"] = 1] = "MouseDown";
|
|
56
|
+
MouseInteractions2[MouseInteractions2["Click"] = 2] = "Click";
|
|
57
|
+
MouseInteractions2[MouseInteractions2["ContextMenu"] = 3] = "ContextMenu";
|
|
58
|
+
MouseInteractions2[MouseInteractions2["DblClick"] = 4] = "DblClick";
|
|
59
|
+
MouseInteractions2[MouseInteractions2["Focus"] = 5] = "Focus";
|
|
60
|
+
MouseInteractions2[MouseInteractions2["Blur"] = 6] = "Blur";
|
|
61
|
+
MouseInteractions2[MouseInteractions2["TouchStart"] = 7] = "TouchStart";
|
|
62
|
+
MouseInteractions2[MouseInteractions2["TouchMove_Departed"] = 8] = "TouchMove_Departed";
|
|
63
|
+
MouseInteractions2[MouseInteractions2["TouchEnd"] = 9] = "TouchEnd";
|
|
64
|
+
MouseInteractions2[MouseInteractions2["TouchCancel"] = 10] = "TouchCancel";
|
|
65
|
+
return MouseInteractions2;
|
|
66
|
+
})(MouseInteractions || {});
|
|
67
|
+
var MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {
|
|
68
|
+
MediaInteractions2[MediaInteractions2["Play"] = 0] = "Play";
|
|
69
|
+
MediaInteractions2[MediaInteractions2["Pause"] = 1] = "Pause";
|
|
70
|
+
MediaInteractions2[MediaInteractions2["Seeked"] = 2] = "Seeked";
|
|
71
|
+
MediaInteractions2[MediaInteractions2["VolumeChange"] = 3] = "VolumeChange";
|
|
72
|
+
MediaInteractions2[MediaInteractions2["RateChange"] = 4] = "RateChange";
|
|
73
|
+
return MediaInteractions2;
|
|
74
|
+
})(MediaInteractions || {});
|
|
75
|
+
var NodeType = /* @__PURE__ */ ((NodeType2) => {
|
|
76
|
+
NodeType2[NodeType2["Document"] = 0] = "Document";
|
|
77
|
+
NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
|
|
78
|
+
NodeType2[NodeType2["Element"] = 2] = "Element";
|
|
79
|
+
NodeType2[NodeType2["Text"] = 3] = "Text";
|
|
80
|
+
NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
|
|
81
|
+
NodeType2[NodeType2["Comment"] = 5] = "Comment";
|
|
82
|
+
return NodeType2;
|
|
83
|
+
})(NodeType || {});
|
|
84
|
+
function extractElementNodes(node) {
|
|
85
|
+
const flat = [];
|
|
86
|
+
function walk(n) {
|
|
87
|
+
if ((n == null ? void 0 : n.type) === NodeType.Element) {
|
|
88
|
+
flat.push({
|
|
89
|
+
id: n.id,
|
|
90
|
+
tagName: n.tagName,
|
|
91
|
+
xpath: n.xpath ?? void 0,
|
|
92
|
+
isVisible: n.isVisible ?? false,
|
|
93
|
+
isInteractive: n.isInteractive ?? false,
|
|
94
|
+
selector: n.selector ?? void 0,
|
|
95
|
+
attributes: n.attributes ?? {}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
for (const child of n.childNodes ?? []) {
|
|
99
|
+
walk(child);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
walk(node);
|
|
103
|
+
return flat;
|
|
104
|
+
}
|
|
105
|
+
function hasNodeId(data) {
|
|
106
|
+
return typeof data === "object" && data !== null && "id" in data && typeof data.id === "number";
|
|
107
|
+
}
|
|
108
|
+
function extractActionFromSnapshot(events, nodeMap) {
|
|
109
|
+
var _a, _b;
|
|
110
|
+
const logs = [];
|
|
111
|
+
for (const e of events) {
|
|
112
|
+
if (e.type !== EventType.IncrementalSnapshot) continue;
|
|
113
|
+
const eventId = e == null ? void 0 : e.id;
|
|
114
|
+
const data = e.data;
|
|
115
|
+
if (data.source === IncrementalSource.MouseMove || data.source === IncrementalSource.TouchMove) {
|
|
116
|
+
const positions = data.positions;
|
|
117
|
+
for (const pos of positions) {
|
|
118
|
+
const node2 = nodeMap.get(pos.id);
|
|
119
|
+
if (!node2) continue;
|
|
120
|
+
logs.push({
|
|
121
|
+
id: eventId,
|
|
122
|
+
timestamp: e.timestamp + pos.timeOffset,
|
|
123
|
+
source: data.source,
|
|
124
|
+
action: "hover",
|
|
125
|
+
nodeMeta: node2,
|
|
126
|
+
position: { x: pos.x, y: pos.y }
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const nodeId = hasNodeId(data) ? data.id : -2;
|
|
132
|
+
const node = nodeMap.get(nodeId);
|
|
133
|
+
if (!node) continue;
|
|
134
|
+
let action = null;
|
|
135
|
+
let value;
|
|
136
|
+
let position;
|
|
137
|
+
switch (data.source) {
|
|
138
|
+
case IncrementalSource.MouseInteraction: {
|
|
139
|
+
if (data.x && data.y) {
|
|
140
|
+
value = `x=${data.x}, y=${data.y}`;
|
|
141
|
+
position = { x: data.x, y: data.y };
|
|
142
|
+
}
|
|
143
|
+
switch (data.type) {
|
|
144
|
+
case MouseInteractions.Click:
|
|
145
|
+
action = "click";
|
|
146
|
+
break;
|
|
147
|
+
case MouseInteractions.DblClick:
|
|
148
|
+
action = "dblclick";
|
|
149
|
+
break;
|
|
150
|
+
case MouseInteractions.ContextMenu:
|
|
151
|
+
action = "contextmenu";
|
|
152
|
+
break;
|
|
153
|
+
case MouseInteractions.MouseDown:
|
|
154
|
+
action = "mousedown";
|
|
155
|
+
break;
|
|
156
|
+
case MouseInteractions.MouseUp:
|
|
157
|
+
action = "mouseup";
|
|
158
|
+
break;
|
|
159
|
+
case MouseInteractions.Focus:
|
|
160
|
+
action = "focus";
|
|
161
|
+
break;
|
|
162
|
+
case MouseInteractions.Blur:
|
|
163
|
+
action = "blur";
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
case IncrementalSource.Input: {
|
|
169
|
+
const tag = (_a = node.tagName) == null ? void 0 : _a.toLowerCase();
|
|
170
|
+
const rawType = (_b = node.attributes) == null ? void 0 : _b["type"];
|
|
171
|
+
const type = typeof rawType === "string" ? rawType.toLowerCase() : void 0;
|
|
172
|
+
const isCheckboxOrRadio = tag === "input" && (type === "checkbox" || type === "radio");
|
|
173
|
+
const isTextLike = tag === "input" || tag === "textarea";
|
|
174
|
+
const isSelect = tag === "select";
|
|
175
|
+
if (isCheckboxOrRadio) {
|
|
176
|
+
action = "check";
|
|
177
|
+
value = data.isChecked;
|
|
178
|
+
} else if (isSelect) {
|
|
179
|
+
action = "select";
|
|
180
|
+
value = data.text;
|
|
181
|
+
} else if (isTextLike) {
|
|
182
|
+
action = "type";
|
|
183
|
+
value = data.text;
|
|
184
|
+
} else {
|
|
185
|
+
action = "type";
|
|
186
|
+
value = data.text ?? data.isChecked;
|
|
187
|
+
}
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
case IncrementalSource.Scroll: {
|
|
191
|
+
action = "scroll";
|
|
192
|
+
value = `x=${data.x}, y=${data.y}`;
|
|
193
|
+
position = { x: data.x, y: data.y };
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
case IncrementalSource.Selection: {
|
|
197
|
+
action = "select";
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
case IncrementalSource.MediaInteraction: {
|
|
201
|
+
switch (data.type) {
|
|
202
|
+
case MediaInteractions.Play:
|
|
203
|
+
action = "play";
|
|
204
|
+
break;
|
|
205
|
+
case MediaInteractions.Pause:
|
|
206
|
+
action = "pause";
|
|
207
|
+
break;
|
|
208
|
+
case MediaInteractions.Seeked:
|
|
209
|
+
action = "seek";
|
|
210
|
+
break;
|
|
211
|
+
case MediaInteractions.VolumeChange:
|
|
212
|
+
action = "volume";
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
default:
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
if (action) {
|
|
221
|
+
logs.push({
|
|
222
|
+
id: eventId,
|
|
223
|
+
timestamp: e.timestamp,
|
|
224
|
+
source: data.source,
|
|
225
|
+
action,
|
|
226
|
+
nodeMeta: node,
|
|
227
|
+
value,
|
|
228
|
+
position
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return logs;
|
|
233
|
+
}
|
|
234
|
+
function generateReport({
|
|
235
|
+
events,
|
|
236
|
+
metadata
|
|
237
|
+
}) {
|
|
238
|
+
const pages = createPages(events);
|
|
239
|
+
return {
|
|
240
|
+
metadata,
|
|
241
|
+
pages
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
function createPages(events) {
|
|
245
|
+
const eventGroups = [];
|
|
246
|
+
let currentGroup = null;
|
|
247
|
+
for (const event of events) {
|
|
248
|
+
if (event.type === EventType.Meta) {
|
|
249
|
+
currentGroup = { meta: event, events: [] };
|
|
250
|
+
eventGroups.push(currentGroup);
|
|
251
|
+
} else if (currentGroup) {
|
|
252
|
+
currentGroup.events.push(event);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
const pageMap = /* @__PURE__ */ new Map();
|
|
256
|
+
let snapshotIndex = 0;
|
|
257
|
+
for (const { meta, events: events2 } of eventGroups) {
|
|
258
|
+
const metaData = meta.data;
|
|
259
|
+
const href = metaData.href;
|
|
260
|
+
if (!pageMap.has(href)) {
|
|
261
|
+
pageMap.set(href, {
|
|
262
|
+
id: `page-${pageMap.size}`,
|
|
263
|
+
href,
|
|
264
|
+
snapshots: [],
|
|
265
|
+
totalElementCount: 0,
|
|
266
|
+
interactedElementCount: 0,
|
|
267
|
+
coverageRatio: 0,
|
|
268
|
+
coveragePercent: 0
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
const page = pageMap.get(href);
|
|
272
|
+
let buffer = [];
|
|
273
|
+
let currentFull = null;
|
|
274
|
+
for (const event of events2) {
|
|
275
|
+
if (event.type === EventType.FullSnapshot) {
|
|
276
|
+
if (currentFull && buffer.length > 0) {
|
|
277
|
+
const snapshotEvents = [meta, currentFull, ...buffer];
|
|
278
|
+
page.snapshots.push(createSnapshot(snapshotEvents, snapshotIndex++));
|
|
279
|
+
}
|
|
280
|
+
currentFull = event;
|
|
281
|
+
buffer = [];
|
|
282
|
+
} else {
|
|
283
|
+
buffer.push(event);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
if (currentFull) {
|
|
287
|
+
const snapshotEvents = [meta, currentFull, ...buffer];
|
|
288
|
+
page.snapshots.push(createSnapshot(snapshotEvents, snapshotIndex++));
|
|
289
|
+
}
|
|
290
|
+
const allVisible = /* @__PURE__ */ new Map();
|
|
291
|
+
const allInteracted = /* @__PURE__ */ new Map();
|
|
292
|
+
for (const snap of page.snapshots) {
|
|
293
|
+
for (const el of snap.totalElements) {
|
|
294
|
+
allVisible.set(el.id, el);
|
|
295
|
+
}
|
|
296
|
+
for (const el of snap.interactedElements) {
|
|
297
|
+
allInteracted.set(el.id, el);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
page.totalElementCount = allVisible.size;
|
|
301
|
+
page.interactedElementCount = allInteracted.size;
|
|
302
|
+
page.coverageRatio = allVisible.size > 0 ? allInteracted.size / allVisible.size : 0;
|
|
303
|
+
page.coveragePercent = Math.round(page.coverageRatio * 1e4) / 100;
|
|
304
|
+
}
|
|
305
|
+
return Array.from(pageMap.values());
|
|
306
|
+
}
|
|
307
|
+
function createSnapshot(events, snapshotIndex) {
|
|
308
|
+
var _a;
|
|
309
|
+
const id = `snap-${snapshotIndex}`;
|
|
310
|
+
const fullSnapshot = events.find((e) => e.type === EventType.FullSnapshot);
|
|
311
|
+
const fullDom = fullSnapshot == null ? void 0 : fullSnapshot.data.node;
|
|
312
|
+
const elements = fullDom ? extractElementNodes(fullDom) : [];
|
|
313
|
+
const visibleElements = elements.filter((n) => n == null ? void 0 : n.isVisible);
|
|
314
|
+
const visibleInteractiveElements = visibleElements.filter((n) => n == null ? void 0 : n.isInteractive);
|
|
315
|
+
const nodeMap = /* @__PURE__ */ new Map();
|
|
316
|
+
for (const el of visibleElements) {
|
|
317
|
+
if (el.id != null) {
|
|
318
|
+
nodeMap.set(el.id, el);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
const actions = extractActionFromSnapshot(events, nodeMap);
|
|
322
|
+
const actionMap = /* @__PURE__ */ new Map();
|
|
323
|
+
for (const action of actions) {
|
|
324
|
+
const nodeMeta = action.nodeMeta;
|
|
325
|
+
if (!nodeMeta) continue;
|
|
326
|
+
if (!actionMap.has(nodeMeta)) actionMap.set(nodeMeta, []);
|
|
327
|
+
(_a = actionMap.get(nodeMeta)) == null ? void 0 : _a.push({
|
|
328
|
+
...action,
|
|
329
|
+
nodeMeta: void 0
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
const interactedElements = [];
|
|
333
|
+
actionMap.forEach((_actions, nodeMeta) => {
|
|
334
|
+
interactedElements.push(nodeMeta);
|
|
335
|
+
});
|
|
336
|
+
const totalCount = visibleInteractiveElements.length;
|
|
337
|
+
const interactedCount = interactedElements.length;
|
|
338
|
+
const ratio = totalCount > 0 ? interactedCount / totalCount : 0;
|
|
339
|
+
const percent = Math.round(ratio * 1e4) / 100;
|
|
340
|
+
return {
|
|
341
|
+
id,
|
|
342
|
+
events,
|
|
343
|
+
actions,
|
|
344
|
+
totalElements: visibleInteractiveElements,
|
|
345
|
+
interactedElements,
|
|
346
|
+
totalElementCount: totalCount,
|
|
347
|
+
interactedElementCount: interactedCount,
|
|
348
|
+
coverageRatio: ratio,
|
|
349
|
+
coveragePercent: percent
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
let pluginConfig = {
|
|
353
|
+
outputUIReportDir: "results/ui",
|
|
354
|
+
includeHtml: false,
|
|
355
|
+
compress: false,
|
|
356
|
+
upload: false,
|
|
357
|
+
uploadUrl: "",
|
|
358
|
+
projectId: "",
|
|
359
|
+
apiKey: ""
|
|
360
|
+
};
|
|
361
|
+
function sanitizeFileNamePart(name) {
|
|
362
|
+
return (name ?? "").trim().replace(/[\s:/\\<>|"'?*]+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
363
|
+
}
|
|
364
|
+
function registerRRWebReportTasks(on, config) {
|
|
365
|
+
pluginConfig = { ...pluginConfig, ...config };
|
|
366
|
+
on("task", {
|
|
367
|
+
saveRRWebReport(testRunResult) {
|
|
368
|
+
var _a;
|
|
369
|
+
const specName = sanitizeFileNamePart(testRunResult.spec.name);
|
|
370
|
+
const suiteTitle = sanitizeFileNamePart((_a = testRunResult.test.suite) == null ? void 0 : _a.title);
|
|
371
|
+
const testTitle = sanitizeFileNamePart(testRunResult.test.title);
|
|
372
|
+
const jsonFileName = `${suiteTitle ? suiteTitle + "-" : ""}${testTitle}.json`;
|
|
373
|
+
const jsonFilePath = path__namespace.join(pluginConfig.outputUIReportDir, specName, jsonFileName);
|
|
374
|
+
const report = generateReport({ events: testRunResult.recorderEvents });
|
|
375
|
+
fs__namespace.mkdirSync(pluginConfig.outputUIReportDir, { recursive: true });
|
|
376
|
+
fs__namespace.mkdirSync(path__namespace.dirname(jsonFilePath), { recursive: true });
|
|
377
|
+
fs__namespace.writeFileSync(jsonFilePath, JSON.stringify(report, null, 2), "utf-8");
|
|
378
|
+
console.log(`[ui-coverage] Saved report to ${jsonFilePath}`);
|
|
379
|
+
return null;
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
module.exports = registerRRWebReportTasks;
|
|
384
|
+
//# sourceMappingURL=rrweb-cypress-plugin-reporter.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rrweb-cypress-plugin-reporter.cjs","sources":["../../rrweb-ui-report/dist/rrweb-ui-report.js","../src/reporter.ts"],"sourcesContent":["var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n IncrementalSource2[IncrementalSource2[\"VisibilityMutation\"] = 17] = \"VisibilityMutation\";\n return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n return MouseInteractions2;\n})(MouseInteractions || {});\nvar MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {\n MediaInteractions2[MediaInteractions2[\"Play\"] = 0] = \"Play\";\n MediaInteractions2[MediaInteractions2[\"Pause\"] = 1] = \"Pause\";\n MediaInteractions2[MediaInteractions2[\"Seeked\"] = 2] = \"Seeked\";\n MediaInteractions2[MediaInteractions2[\"VolumeChange\"] = 3] = \"VolumeChange\";\n MediaInteractions2[MediaInteractions2[\"RateChange\"] = 4] = \"RateChange\";\n return MediaInteractions2;\n})(MediaInteractions || {});\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n return NodeType2;\n})(NodeType || {});\nfunction extractElementNodes(node) {\n const flat = [];\n function walk(n) {\n if ((n == null ? void 0 : n.type) === NodeType.Element) {\n flat.push({\n id: n.id,\n tagName: n.tagName,\n xpath: n.xpath ?? void 0,\n isVisible: n.isVisible ?? false,\n isInteractive: n.isInteractive ?? false,\n selector: n.selector ?? void 0,\n attributes: n.attributes ?? {}\n });\n }\n for (const child of n.childNodes ?? []) {\n walk(child);\n }\n }\n walk(node);\n return flat;\n}\nfunction hasNodeId(data) {\n return typeof data === \"object\" && data !== null && \"id\" in data && typeof data.id === \"number\";\n}\nfunction extractActionFromSnapshot(events, nodeMap) {\n var _a, _b;\n const logs = [];\n for (const e of events) {\n if (e.type !== EventType.IncrementalSnapshot) continue;\n const eventId = e == null ? void 0 : e.id;\n const data = e.data;\n if (data.source === IncrementalSource.MouseMove || data.source === IncrementalSource.TouchMove) {\n const positions = data.positions;\n for (const pos of positions) {\n const node2 = nodeMap.get(pos.id);\n if (!node2) continue;\n logs.push({\n id: eventId,\n timestamp: e.timestamp + pos.timeOffset,\n source: data.source,\n action: \"hover\",\n nodeMeta: node2,\n position: { x: pos.x, y: pos.y }\n });\n }\n continue;\n }\n const nodeId = hasNodeId(data) ? data.id : -2;\n const node = nodeMap.get(nodeId);\n if (!node) continue;\n let action = null;\n let value;\n let position;\n switch (data.source) {\n case IncrementalSource.MouseInteraction: {\n if (data.x && data.y) {\n value = `x=${data.x}, y=${data.y}`;\n position = { x: data.x, y: data.y };\n }\n switch (data.type) {\n case MouseInteractions.Click:\n action = \"click\";\n break;\n case MouseInteractions.DblClick:\n action = \"dblclick\";\n break;\n case MouseInteractions.ContextMenu:\n action = \"contextmenu\";\n break;\n case MouseInteractions.MouseDown:\n action = \"mousedown\";\n break;\n case MouseInteractions.MouseUp:\n action = \"mouseup\";\n break;\n case MouseInteractions.Focus:\n action = \"focus\";\n break;\n case MouseInteractions.Blur:\n action = \"blur\";\n break;\n }\n break;\n }\n case IncrementalSource.Input: {\n const tag = (_a = node.tagName) == null ? void 0 : _a.toLowerCase();\n const rawType = (_b = node.attributes) == null ? void 0 : _b[\"type\"];\n const type = typeof rawType === \"string\" ? rawType.toLowerCase() : void 0;\n const isCheckboxOrRadio = tag === \"input\" && (type === \"checkbox\" || type === \"radio\");\n const isTextLike = tag === \"input\" || tag === \"textarea\";\n const isSelect = tag === \"select\";\n if (isCheckboxOrRadio) {\n action = \"check\";\n value = data.isChecked;\n } else if (isSelect) {\n action = \"select\";\n value = data.text;\n } else if (isTextLike) {\n action = \"type\";\n value = data.text;\n } else {\n action = \"type\";\n value = data.text ?? data.isChecked;\n }\n break;\n }\n case IncrementalSource.Scroll: {\n action = \"scroll\";\n value = `x=${data.x}, y=${data.y}`;\n position = { x: data.x, y: data.y };\n break;\n }\n case IncrementalSource.Selection: {\n action = \"select\";\n break;\n }\n case IncrementalSource.MediaInteraction: {\n switch (data.type) {\n case MediaInteractions.Play:\n action = \"play\";\n break;\n case MediaInteractions.Pause:\n action = \"pause\";\n break;\n case MediaInteractions.Seeked:\n action = \"seek\";\n break;\n case MediaInteractions.VolumeChange:\n action = \"volume\";\n break;\n }\n break;\n }\n default:\n continue;\n }\n if (action) {\n logs.push({\n id: eventId,\n timestamp: e.timestamp,\n source: data.source,\n action,\n nodeMeta: node,\n value,\n position\n });\n }\n }\n return logs;\n}\nfunction generateReport({\n events,\n metadata\n}) {\n const pages = createPages(events);\n return {\n metadata,\n pages\n };\n}\nfunction createPages(events) {\n const eventGroups = [];\n let currentGroup = null;\n for (const event of events) {\n if (event.type === EventType.Meta) {\n currentGroup = { meta: event, events: [] };\n eventGroups.push(currentGroup);\n } else if (currentGroup) {\n currentGroup.events.push(event);\n }\n }\n const pageMap = /* @__PURE__ */ new Map();\n let snapshotIndex = 0;\n for (const { meta, events: events2 } of eventGroups) {\n const metaData = meta.data;\n const href = metaData.href;\n if (!pageMap.has(href)) {\n pageMap.set(href, {\n id: `page-${pageMap.size}`,\n href,\n snapshots: [],\n totalElementCount: 0,\n interactedElementCount: 0,\n coverageRatio: 0,\n coveragePercent: 0\n });\n }\n const page = pageMap.get(href);\n let buffer = [];\n let currentFull = null;\n for (const event of events2) {\n if (event.type === EventType.FullSnapshot) {\n if (currentFull && buffer.length > 0) {\n const snapshotEvents = [meta, currentFull, ...buffer];\n page.snapshots.push(createSnapshot(snapshotEvents, snapshotIndex++));\n }\n currentFull = event;\n buffer = [];\n } else {\n buffer.push(event);\n }\n }\n if (currentFull) {\n const snapshotEvents = [meta, currentFull, ...buffer];\n page.snapshots.push(createSnapshot(snapshotEvents, snapshotIndex++));\n }\n const allVisible = /* @__PURE__ */ new Map();\n const allInteracted = /* @__PURE__ */ new Map();\n for (const snap of page.snapshots) {\n for (const el of snap.totalElements) {\n allVisible.set(el.id, el);\n }\n for (const el of snap.interactedElements) {\n allInteracted.set(el.id, el);\n }\n }\n page.totalElementCount = allVisible.size;\n page.interactedElementCount = allInteracted.size;\n page.coverageRatio = allVisible.size > 0 ? allInteracted.size / allVisible.size : 0;\n page.coveragePercent = Math.round(page.coverageRatio * 1e4) / 100;\n }\n return Array.from(pageMap.values());\n}\nfunction createSnapshot(events, snapshotIndex) {\n var _a;\n const id = `snap-${snapshotIndex}`;\n const fullSnapshot = events.find((e) => e.type === EventType.FullSnapshot);\n const fullDom = fullSnapshot == null ? void 0 : fullSnapshot.data.node;\n const elements = fullDom ? extractElementNodes(fullDom) : [];\n const visibleElements = elements.filter((n) => n == null ? void 0 : n.isVisible);\n const visibleInteractiveElements = visibleElements.filter((n) => n == null ? void 0 : n.isInteractive);\n const nodeMap = /* @__PURE__ */ new Map();\n for (const el of visibleElements) {\n if (el.id != null) {\n nodeMap.set(el.id, el);\n }\n }\n const actions = extractActionFromSnapshot(events, nodeMap);\n const actionMap = /* @__PURE__ */ new Map();\n for (const action of actions) {\n const nodeMeta = action.nodeMeta;\n if (!nodeMeta) continue;\n if (!actionMap.has(nodeMeta)) actionMap.set(nodeMeta, []);\n (_a = actionMap.get(nodeMeta)) == null ? void 0 : _a.push({\n ...action,\n nodeMeta: void 0\n });\n }\n const interactedElements = [];\n actionMap.forEach((_actions, nodeMeta) => {\n interactedElements.push(nodeMeta);\n });\n const totalCount = visibleInteractiveElements.length;\n const interactedCount = interactedElements.length;\n const ratio = totalCount > 0 ? interactedCount / totalCount : 0;\n const percent = Math.round(ratio * 1e4) / 100;\n return {\n id,\n events,\n actions,\n totalElements: visibleInteractiveElements,\n interactedElements,\n totalElementCount: totalCount,\n interactedElementCount: interactedCount,\n coverageRatio: ratio,\n coveragePercent: percent\n };\n}\nexport {\n generateReport as default\n};\n//# sourceMappingURL=rrweb-ui-report.js.map\n","/// <reference types=\"cypress\" />\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport type { TestRunResult } from \"./types\";\nimport generateReport from '@appsurify-testmap/rrweb-ui-report';\n\n\nlet pluginConfig: {\n outputUIReportDir: string;\n includeHtml: boolean;\n compress: boolean;\n upload: boolean;\n uploadUrl: string;\n projectId: string;\n apiKey: string;\n} = {\n outputUIReportDir: 'results/ui',\n includeHtml: false,\n compress: false,\n upload: false,\n uploadUrl: '',\n projectId: '',\n apiKey: ''\n};\n\nfunction sanitizeFileNamePart(name: string | undefined): string {\n return (name ?? '')\n .trim()\n .replace(/[\\s:/\\\\<>|\"'?*]+/g, '-')\n .replace(/-+/g, '-')\n .replace(/^-|-$/g, '');\n}\n\nexport default function registerRRWebReportTasks(on: Cypress.PluginEvents, config?: Partial<typeof pluginConfig>) {\n pluginConfig = { ...pluginConfig, ...config };\n\n on('task', {\n saveRRWebReport(testRunResult: TestRunResult) {\n const specName = sanitizeFileNamePart(testRunResult.spec.name);\n const suiteTitle = sanitizeFileNamePart(testRunResult.test.suite?.title);\n const testTitle = sanitizeFileNamePart(testRunResult.test.title);\n const jsonFileName = `${suiteTitle ? suiteTitle + '-' : ''}${testTitle}.json`;\n const jsonFilePath = path.join(pluginConfig.outputUIReportDir, specName, jsonFileName);\n const report = generateReport({ events: testRunResult.recorderEvents });\n fs.mkdirSync(pluginConfig.outputUIReportDir, { recursive: true });\n fs.mkdirSync(path.dirname(jsonFilePath), { recursive: true });\n fs.writeFileSync(jsonFilePath, JSON.stringify(report, null, 2), 'utf-8');\n console.log(`[ui-coverage] Saved report to ${jsonFilePath}`);\n return null;\n }\n });\n}\n"],"names":["path","fs"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAI,YAA6B,kBAAC,eAAe;AAC/C,aAAW,WAAW,kBAAkB,IAAI,CAAC,IAAI;AACjD,aAAW,WAAW,MAAM,IAAI,CAAC,IAAI;AACrC,aAAW,WAAW,cAAc,IAAI,CAAC,IAAI;AAC7C,aAAW,WAAW,qBAAqB,IAAI,CAAC,IAAI;AACpD,aAAW,WAAW,MAAM,IAAI,CAAC,IAAI;AACrC,aAAW,WAAW,QAAQ,IAAI,CAAC,IAAI;AACvC,aAAW,WAAW,QAAQ,IAAI,CAAC,IAAI;AACvC,SAAO;AAC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nB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AACV;AAEA,SAAS,qBAAqB,MAAkC;AAC9D,UAAQ,QAAQ,IACb,KAAK,EACL,QAAQ,qBAAqB,GAAG,EAChC,QAAQ,OAAO,GAAG,EAClB,QAAQ,UAAU,EAAE;AACzB;AAEwB,SAAA,yBAAyB,IAA0B,QAAuC;AAChH,iBAAe,EAAE,GAAG,cAAc,GAAG,OAAO;AAE5C,KAAG,QAAQ;AAAA,IACT,gBAAgB,eAA8B;;AAC5C,YAAM,WAAW,qBAAqB,cAAc,KAAK,IAAI;AAC7D,YAAM,aAAa,sBAAqB,mBAAc,KAAK,UAAnB,mBAA0B,KAAK;AACvE,YAAM,YAAY,qBAAqB,cAAc,KAAK,KAAK;AAC/D,YAAM,eAAe,GAAG,aAAa,aAAa,MAAM,EAAE,GAAG,SAAS;AACtE,YAAM,eAAeA,gBAAK,KAAK,aAAa,mBAAmB,UAAU,YAAY;AACrF,YAAM,SAAS,eAAe,EAAE,QAAQ,cAAc,gBAAgB;AACtEC,oBAAG,UAAU,aAAa,mBAAmB,EAAE,WAAW,MAAM;AAC7DA,oBAAA,UAAUD,gBAAK,QAAQ,YAAY,GAAG,EAAE,WAAW,MAAM;AACzDC,oBAAA,cAAc,cAAc,KAAK,UAAU,QAAQ,MAAM,CAAC,GAAG,OAAO;AAC/D,cAAA,IAAI,iCAAiC,YAAY,EAAE;AACpD,aAAA;AAAA,IACT;AAAA,EAAA,CACD;AACH;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
|
|
3
|
+
declare let pluginConfig: {
|
|
4
|
+
outputUIReportDir: string;
|
|
5
|
+
includeHtml: boolean;
|
|
6
|
+
compress: boolean;
|
|
7
|
+
upload: boolean;
|
|
8
|
+
uploadUrl: string;
|
|
9
|
+
projectId: string;
|
|
10
|
+
apiKey: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
declare function registerRRWebReportTasks(on: Cypress.PluginEvents, config?: Partial<typeof pluginConfig>): void;
|
|
14
|
+
export default registerRRWebReportTasks;
|
|
15
|
+
|
|
16
|
+
export { }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
|
|
3
|
+
declare let pluginConfig: {
|
|
4
|
+
outputUIReportDir: string;
|
|
5
|
+
includeHtml: boolean;
|
|
6
|
+
compress: boolean;
|
|
7
|
+
upload: boolean;
|
|
8
|
+
uploadUrl: string;
|
|
9
|
+
projectId: string;
|
|
10
|
+
apiKey: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
declare function registerRRWebReportTasks(on: Cypress.PluginEvents, config?: Partial<typeof pluginConfig>): void;
|
|
14
|
+
export default registerRRWebReportTasks;
|
|
15
|
+
|
|
16
|
+
export { }
|