@appsurify-testmap/rrweb-cypress-plugin 3.5.0-alpha.1 → 3.10.0-alpha.1
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/dist/index.js +131 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +130 -39
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var O=(e,t)=>{for(var s in t)g(e,s,{get:t[s],enumerable:!0})},P=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of M(t))!N.call(e,n)&&n!==s&&g(e,n,{get:()=>t[n],enumerable:!(r=A(t,n))||r.enumerable});return e};var
|
|
1
|
+
"use strict";var g=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var O=(e,t)=>{for(var s in t)g(e,s,{get:t[s],enumerable:!0})},P=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of M(t))!N.call(e,n)&&n!==s&&g(e,n,{get:()=>t[n],enumerable:!(r=A(t,n))||r.enumerable});return e};var D=e=>P(g({},"__esModule",{value:!0}),e);var X={};O(X,{initializeTestmap:()=>T});module.exports=D(X);var b=new Map;function v(e,t){b.set(e,t)}function u(e){return b.get(e)}function d(e){return e.filter(t=>typeof t=="object"&&t!==null&&"log"in t&&t.log===!1?!1:typeof t=="string"||typeof t=="number"||typeof t=="boolean"||t===null)}function l(e){return e.titlePath().join(" > ")}function L(e){if(e)return{id:e.id,file:e.file,invocationDetails:w(e.invocationDetails),pending:e.pending,root:e.root,title:e.title,type:e.type}}function w(e){return{absoluteFile:e?.absoluteFile??"",column:e?.column??0,fileUrl:e?.fileUrl??"",function:e?.function??"",line:e?.line??0,originalFile:e?.originalFile??"",relativeFile:e?.relativeFile??""}}function S(e){return{runner:e.runner,spec:F(e.spec),browser:U(e.browser),test:z(e.test),recorderEvents:Array.isArray(e.recorderEvents)?e.recorderEvents:[]}}function F(e){return{name:e.name??"",absolute:e.absolute??"",relative:e.relative??"",specFilter:e.specFilter??"",specType:e.specType??"integration",baseName:e.baseName??"",fileExtension:e.fileExtension??"",fileName:e.fileName??"",id:e.id??""}}function U(e){return{name:e.name??"",version:e.version??"",displayName:e.displayName??"",family:e.family??"",majorVersion:e.majorVersion??"",channel:e.channel??"",path:e.path??""}}function z(e){return{suite:L(e.parent),file:e.file??"",duration:e.duration??0,id:e.id??"",invocationDetails:w(e.invocationDetails),pending:e.pending??!1,state:e.state??"unknown",sync:e.sync??!1,timedOut:e.timedOut??!1,title:e.title??"",titlePath:typeof e.titlePath=="function"?e.titlePath():[],fullTitle:typeof e.fullTitle=="function"?e.fullTitle():"",type:e.type??"test"}}var k=require("@appsurify-testmap/rrweb"),$=require("@appsurify-testmap/rrweb-plugin-sequential-id-record");var x=`(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrweb", [], f);} else if ("object" == typeof exports) {exports["rrweb"] = f();} else {g["rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __defProps = Object.defineProperties;
|
|
@@ -14367,7 +14367,8 @@ function initInputObserver({
|
|
|
14367
14367
|
maskInputOptions,
|
|
14368
14368
|
maskInputFn,
|
|
14369
14369
|
sampling,
|
|
14370
|
-
userTriggeredOnInput
|
|
14370
|
+
userTriggeredOnInput,
|
|
14371
|
+
trustSyntheticInput
|
|
14371
14372
|
}) {
|
|
14372
14373
|
function eventHandler(event) {
|
|
14373
14374
|
let target = getEventTarget(event);
|
|
@@ -14417,34 +14418,53 @@ function initInputObserver({
|
|
|
14417
14418
|
function cbWithDedup(target, v2) {
|
|
14418
14419
|
const lastInputValue = lastInputValueMap.get(target);
|
|
14419
14420
|
const el = target;
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
|
|
14421
|
+
if (trustSyntheticInput) {
|
|
14422
|
+
const isInitialEmpty = !v2.userTriggered && el.value === "" && !v2.isChecked && !lastInputValue;
|
|
14423
|
+
const isSelectDefaultSelection = el.tagName === "SELECT" && !v2.userTriggered && !lastInputValue && el.selectedIndex === 0;
|
|
14424
|
+
if (isInitialEmpty || isSelectDefaultSelection) {
|
|
14425
|
+
console.debug(
|
|
14426
|
+
\`[\${nowTimestamp()}] [rrweb:record/observer] phantom input ignored (trust mode)\`,
|
|
14427
|
+
{
|
|
14428
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
|
|
14429
|
+
node: index.describeNode(el),
|
|
14430
|
+
tag: el.tagName,
|
|
14431
|
+
value: el.value,
|
|
14432
|
+
isInitialEmpty,
|
|
14433
|
+
isSelectDefaultSelection
|
|
14434
|
+
}
|
|
14435
|
+
);
|
|
14436
|
+
return;
|
|
14437
|
+
}
|
|
14438
|
+
} else {
|
|
14439
|
+
const hasPlaceholder = el.hasAttribute("placeholder");
|
|
14440
|
+
const isEmpty = el.value === "";
|
|
14441
|
+
const isDefaultEmpty = typeof el.defaultValue === "string" ? el.defaultValue === "" : true;
|
|
14442
|
+
const isNonUser = !v2.userTriggered;
|
|
14443
|
+
const isRepeatEmpty = !lastInputValue || lastInputValue.text === "";
|
|
14444
|
+
const isLikelyPhantom = hasPlaceholder && isEmpty && isDefaultEmpty && isRepeatEmpty && isNonUser && !v2.isChecked && el.type !== "hidden" && INPUT_TAGS.includes(el.tagName);
|
|
14445
|
+
const isRenderDrivenTextInput = el.tagName === "INPUT" && el.type === "text" && !v2.userTriggered && v2.text === el.defaultValue && !lastInputValue && el.hasAttribute("placeholder");
|
|
14446
|
+
const isValueFromDefault = !v2.userTriggered && el.value === el.defaultValue && !lastInputValue && el.hasAttribute("placeholder") && !v2.isChecked && el.type !== "hidden" && INPUT_TAGS.includes(el.tagName);
|
|
14447
|
+
const isPhantomCheckbox = el.type === "checkbox" && !v2.userTriggered && !v2.isChecked && !lastInputValue;
|
|
14448
|
+
const isPhantomRadio = el.type === "radio" && !v2.userTriggered && !v2.isChecked && !lastInputValue;
|
|
14449
|
+
if (isLikelyPhantom || isRenderDrivenTextInput || isValueFromDefault || isPhantomCheckbox || isPhantomRadio) {
|
|
14450
|
+
console.debug(
|
|
14451
|
+
\`[\${nowTimestamp()}] [rrweb:record/observer] \\u26D4 phantom input ignored\`,
|
|
14452
|
+
{
|
|
14453
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
|
|
14454
|
+
node: index.describeNode(el),
|
|
14455
|
+
tag: el.tagName,
|
|
14456
|
+
nodeType: el.nodeType,
|
|
14457
|
+
attribute: el.attributes,
|
|
14458
|
+
value: el.value,
|
|
14459
|
+
isLikelyPhantom,
|
|
14460
|
+
isRenderDrivenTextInput,
|
|
14461
|
+
isValueFromDefault,
|
|
14462
|
+
isPhantomCheckbox,
|
|
14463
|
+
isPhantomRadio
|
|
14464
|
+
}
|
|
14465
|
+
);
|
|
14466
|
+
return;
|
|
14467
|
+
}
|
|
14448
14468
|
}
|
|
14449
14469
|
if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) {
|
|
14450
14470
|
lastInputValueMap.set(target, v2);
|
|
@@ -16508,8 +16528,15 @@ class NavigationManager {
|
|
|
16508
16528
|
return;
|
|
16509
16529
|
if (this.locked)
|
|
16510
16530
|
return;
|
|
16511
|
-
this.
|
|
16512
|
-
|
|
16531
|
+
if (this.pendingNavigation) {
|
|
16532
|
+
this.cancelTimers();
|
|
16533
|
+
this.disconnectSettlingObserver();
|
|
16534
|
+
this.pendingNavigation = null;
|
|
16535
|
+
this.onSnapshot(true);
|
|
16536
|
+
} else {
|
|
16537
|
+
this.cancelTimers();
|
|
16538
|
+
this.disconnectSettlingObserver();
|
|
16539
|
+
}
|
|
16513
16540
|
this.pendingNavigation = data;
|
|
16514
16541
|
if (this.frozen) {
|
|
16515
16542
|
return;
|
|
@@ -16723,7 +16750,7 @@ class ProcessedNodeManager {
|
|
|
16723
16750
|
destroy() {
|
|
16724
16751
|
}
|
|
16725
16752
|
}
|
|
16726
|
-
const version$1 = "3.
|
|
16753
|
+
const version$1 = "3.10.0-alpha.1";
|
|
16727
16754
|
let wrappedEmit;
|
|
16728
16755
|
let takeFullSnapshot$1;
|
|
16729
16756
|
let canvasManager;
|
|
@@ -16772,6 +16799,7 @@ function record(options = {}) {
|
|
|
16772
16799
|
recordAfter = options.recordAfter === "DOMContentLoaded" ? options.recordAfter : "load",
|
|
16773
16800
|
flushCustomEvent = options.flushCustomEvent !== void 0 ? options.flushCustomEvent : "after",
|
|
16774
16801
|
userTriggeredOnInput = false,
|
|
16802
|
+
trustSyntheticInput = false,
|
|
16775
16803
|
collectFonts = false,
|
|
16776
16804
|
inlineImages = false,
|
|
16777
16805
|
plugins,
|
|
@@ -16846,6 +16874,11 @@ function record(options = {}) {
|
|
|
16846
16874
|
let checkoutPending = false;
|
|
16847
16875
|
let checkoutDebounceTimer = null;
|
|
16848
16876
|
let checkoutFreezeTimestamp = null;
|
|
16877
|
+
let lastScrollEmitTime = 0;
|
|
16878
|
+
const scrollSettleTime = (sampling.scroll || 100) * 2;
|
|
16879
|
+
let lastSignificantMutationTime = 0;
|
|
16880
|
+
const mutationGracePeriod = 500;
|
|
16881
|
+
let hadVisibilityCheckoutInGrace = false;
|
|
16849
16882
|
const eventProcessor = (e2) => {
|
|
16850
16883
|
for (const plugin3 of plugins || []) {
|
|
16851
16884
|
if (plugin3.eventProcessor) {
|
|
@@ -16936,6 +16969,13 @@ function record(options = {}) {
|
|
|
16936
16969
|
}
|
|
16937
16970
|
};
|
|
16938
16971
|
const wrappedMutationEmit = (m) => {
|
|
16972
|
+
var _a3, _b2;
|
|
16973
|
+
var _a2, _b;
|
|
16974
|
+
const totalChanges = ((_a3 = (_a2 = m.adds) == null ? void 0 : _a2.length) != null ? _a3 : 0) + ((_b2 = (_b = m.removes) == null ? void 0 : _b.length) != null ? _b2 : 0);
|
|
16975
|
+
if (totalChanges > 10) {
|
|
16976
|
+
lastSignificantMutationTime = nowTimestamp();
|
|
16977
|
+
hadVisibilityCheckoutInGrace = false;
|
|
16978
|
+
}
|
|
16939
16979
|
wrappedEmit({
|
|
16940
16980
|
type: EventType.IncrementalSnapshot,
|
|
16941
16981
|
data: __spreadValues({
|
|
@@ -16951,12 +16991,15 @@ function record(options = {}) {
|
|
|
16951
16991
|
}, v2)
|
|
16952
16992
|
});
|
|
16953
16993
|
};
|
|
16954
|
-
const wrappedScrollEmit = (p) =>
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
|
|
16994
|
+
const wrappedScrollEmit = (p) => {
|
|
16995
|
+
lastScrollEmitTime = nowTimestamp();
|
|
16996
|
+
wrappedEmit({
|
|
16997
|
+
type: EventType.IncrementalSnapshot,
|
|
16998
|
+
data: __spreadValues({
|
|
16999
|
+
source: IncrementalSource.Scroll
|
|
17000
|
+
}, p)
|
|
17001
|
+
});
|
|
17002
|
+
};
|
|
16960
17003
|
const wrappedCanvasMutationEmit = (p) => wrappedEmit({
|
|
16961
17004
|
type: EventType.IncrementalSnapshot,
|
|
16962
17005
|
data: __spreadValues({
|
|
@@ -17038,9 +17081,19 @@ function record(options = {}) {
|
|
|
17038
17081
|
mutationCb: recordVisibility ? wrappedVisibilityEmit : () => {
|
|
17039
17082
|
},
|
|
17040
17083
|
notifyActivity: checkoutEveryNvm != null ? (count) => {
|
|
17084
|
+
const now = nowTimestamp();
|
|
17085
|
+
const scrollRecent = now - lastScrollEmitTime < scrollSettleTime;
|
|
17086
|
+
const mutationRecent = now - lastSignificantMutationTime < mutationGracePeriod;
|
|
17087
|
+
if (scrollRecent && !mutationRecent) {
|
|
17088
|
+
return;
|
|
17089
|
+
}
|
|
17090
|
+
if (mutationRecent && hadVisibilityCheckoutInGrace) {
|
|
17091
|
+
return;
|
|
17092
|
+
}
|
|
17041
17093
|
visibilityMutationCount += count;
|
|
17042
17094
|
if (visibilityMutationCount >= checkoutEveryNvm) {
|
|
17043
17095
|
visibilityMutationCount = 0;
|
|
17096
|
+
hadVisibilityCheckoutInGrace = true;
|
|
17044
17097
|
if (checkoutDebounce) {
|
|
17045
17098
|
if (!checkoutPending) {
|
|
17046
17099
|
checkoutPending = true;
|
|
@@ -17273,6 +17326,7 @@ function record(options = {}) {
|
|
|
17273
17326
|
recordCanvas,
|
|
17274
17327
|
inlineImages,
|
|
17275
17328
|
userTriggeredOnInput,
|
|
17329
|
+
trustSyntheticInput,
|
|
17276
17330
|
collectFonts,
|
|
17277
17331
|
doc,
|
|
17278
17332
|
maskInputFn,
|
|
@@ -17351,6 +17405,43 @@ function record(options = {}) {
|
|
|
17351
17405
|
);
|
|
17352
17406
|
}
|
|
17353
17407
|
return () => {
|
|
17408
|
+
if (recording) {
|
|
17409
|
+
const activeEl = document.activeElement;
|
|
17410
|
+
if (activeEl && INPUT_TAGS.includes(activeEl.tagName)) {
|
|
17411
|
+
const inputEl = activeEl;
|
|
17412
|
+
const id = mirror.getId(inputEl);
|
|
17413
|
+
if (id !== -1) {
|
|
17414
|
+
const lastValue = lastInputValueMap.get(inputEl);
|
|
17415
|
+
let text = inputEl.value;
|
|
17416
|
+
let isChecked = false;
|
|
17417
|
+
const type = getInputType(inputEl) || "";
|
|
17418
|
+
if (type === "radio" || type === "checkbox") {
|
|
17419
|
+
isChecked = inputEl.checked;
|
|
17420
|
+
} else if (maskInputOptions[inputEl.tagName.toLowerCase()] || maskInputOptions[type]) {
|
|
17421
|
+
text = maskInputValue({
|
|
17422
|
+
element: inputEl,
|
|
17423
|
+
maskInputOptions,
|
|
17424
|
+
tagName: inputEl.tagName,
|
|
17425
|
+
type,
|
|
17426
|
+
value: text,
|
|
17427
|
+
maskInputFn
|
|
17428
|
+
});
|
|
17429
|
+
}
|
|
17430
|
+
if (!lastValue || lastValue.text !== text || lastValue.isChecked !== isChecked) {
|
|
17431
|
+
const inputData = userTriggeredOnInput ? { text, isChecked, userTriggered: false } : { text, isChecked };
|
|
17432
|
+
lastInputValueMap.set(inputEl, inputData);
|
|
17433
|
+
wrappedEmit({
|
|
17434
|
+
type: EventType.IncrementalSnapshot,
|
|
17435
|
+
data: __spreadProps(__spreadValues({
|
|
17436
|
+
source: IncrementalSource.Input
|
|
17437
|
+
}, inputData), {
|
|
17438
|
+
id
|
|
17439
|
+
})
|
|
17440
|
+
});
|
|
17441
|
+
}
|
|
17442
|
+
}
|
|
17443
|
+
}
|
|
17444
|
+
}
|
|
17354
17445
|
if (checkoutDebounceTimer) {
|
|
17355
17446
|
clearTimeout(checkoutDebounceTimer);
|
|
17356
17447
|
checkoutDebounceTimer = null;
|
|
@@ -17426,5 +17517,5 @@ exports.record = record;
|
|
|
17426
17517
|
return module.exports;
|
|
17427
17518
|
}))
|
|
17428
17519
|
//# sourceMappingURL=rrweb-record.umd.cjs.map
|
|
17429
|
-
`;var B={slimDOMOptions:"all",inlineStylesheet:!0,recordDOM:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,checkoutEveryNvm:60,maskInputOptions:{password:!0},sampling:{mousemove:!1,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!1,Blur:!1,TouchStart:!1,TouchEnd:!1},scroll:100,media:100,input:"last",canvas:"all",visibility:{mode:"none",debounce:50,throttle:100,threshold:.5,sensitivity:.05,rafThrottle:100}},flushCustomEvent:"after",recordAfter:"DOMContentLoaded",userTriggeredOnInput:!0};function C(e,t){let s={...e};for(let r in t){let n=t[r],
|
|
17520
|
+
`;var B={slimDOMOptions:"all",inlineStylesheet:!0,recordDOM:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,checkoutEveryNvm:60,maskInputOptions:{password:!0},sampling:{mousemove:!1,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!1,Blur:!1,TouchStart:!1,TouchEnd:!1},scroll:100,media:100,input:"last",canvas:"all",visibility:{mode:"none",debounce:50,throttle:100,threshold:.5,sensitivity:.05,rafThrottle:100}},flushCustomEvent:"after",recordAfter:"DOMContentLoaded",userTriggeredOnInput:!0,trustSyntheticInput:!0};function C(e,t){let s={...e};for(let r in t){let n=t[r],i=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&i&&typeof i=="object"&&!Array.isArray(i)?s[r]=C(i,n):n!==void 0&&(s[r]=n)}return s}var p=class{recordFn=null;stopFn=null;targetWindow=null;context;eventCounter=0;events=[];recordOptions;pendingEvents=[];recorderScriptVersion="unknown";recorderLibVersion=k.version;constructor(t){this.recordOptions=C(B,t??{}),this.context={pushEvent:s=>this.events.push(s)}}handleEmit(t){if(t.type===0||t.type===1)return;let s={...t};this.context.pushEvent(s)}inject(t){let s=t;if(this.targetWindow=t,s.rrweb){this.recordFn=s.rrweb.record??null;return}let r=t.document.createElement("script");r.type="text/javascript",r.innerHTML=x,t.document.head.appendChild(r);let n=t.rrweb;if(!n||!n.record){console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);return}this.recordFn=n.record,this.recorderScriptVersion=this.recordFn.getVersion()}start(){if(!this.targetWindow||!this.recordFn){console.debug(`[${Date.now()}] [recorder] Not ready to start`);return}if(this.stopFn){console.debug(`[${Date.now()}] [recorder] Already recording`);return}this.stopFn=this.recordFn({emit:t=>this.handleEmit(t),plugins:[(0,$.getRecordSequentialIdPlugin)({key:"id",getId:()=>++this.eventCounter})],...this.recordOptions}),this.flush()}stop(){this.flush(),this.stopFn?.(),this.stopFn=null}reset(){this.eventCounter=0,this.events=[],this.stop(),this.context={pushEvent:t=>this.events.push(t)}}flush(){if(!this.recordFn)return;let t=[];for(let s of this.pendingEvents)try{this.recordFn.addCustomEvent(s.tag,s.payload)}catch{console.debug(`[${Date.now()}] [recorder] flush failed for custom event: ${s.tag}`),t.push(s)}this.pendingEvents=t}addCustomEvent(t,s){let r={tag:t,payload:s};if(!this.recordFn||!this.stopFn){console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${t}`),this.pendingEvents.push(r);return}try{this.recordFn.addCustomEvent(t,s)}catch(n){console.debug(`[${Date.now()}] [recorder] error adding custom event: ${t}`,n),this.pendingEvents.push(r)}}isRecordingReady(){return!!this.recordFn&&!!this.stopFn}isRecording(){return this.recordFn?.isRecording()||!1}getScriptVersion(){return`@appsurify-testmap/rrweb-record:${this.recorderScriptVersion}`}getLibVersion(){return`@appsurify-testmap/rrweb:${this.recorderLibVersion}`}getEvents(){return this.events}getMirror(){return this.recordFn?.mirror}bind(t){this.context=t}setEventCounter(t){this.eventCounter=t}};var h=p;var y=Cypress.env("testmap")??{},H=typeof y=="object"&&"recordingOpts"in y?y.recordingOpts:h,o=new h(H),_=()=>{Cypress.on("test:before:run",V).on("window:before:load",K).on("window:before:unload",j).on("window:unload",G).on("window:load",Y).on("test:after:run",J).on("command:queue:end",q).on("fail",Z),afterEach(()=>{o.stop();let e=Cypress.currentTest;if(!e)return;let t=l({titlePath:()=>e.titlePath}),s=u(t);if(!s)return;s.recorderEvents.map(n=>{if(n.type!==5)return n;let i=s.commandLiveRefs.get(n.data.payload.id);return n.data.payload.state=i?.state??"unknown",n.data.payload.args=d(i?.get("args")),n.data.payload.query=i?.get("query"),n.data.payload.timeout=i?.get("timeout"),n.data.payload.name=i?.get("name"),n.data.payload.type=i?.get("type"),i?.get("prev")&&(n.data.payload.prev={state:i?.get("prev").state,name:i?.get("prev").get("name"),args:d(i?.get("prev").get("args")),type:i?.get("prev").get("type"),query:i?.get("prev").get("query"),id:i?.get("prev").get("id")}),i?.get("next")&&(n.data.payload.next={state:i?.get("next").state,name:i?.get("next").get("name"),args:d(i?.get("next").get("args")),type:i?.get("next").get("type"),query:i?.get("next").get("query"),id:i?.get("next").get("id")}),n}),console.debug(`[${Date.now()}] [cypress] afterEach:`,s.recorderEvents);let r=S(s);try{cy.task("saveRRWebReport",{testRunResult:r},{log:!1})}catch(n){console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`,n)}})},V=(e,t)=>{let s=l(t),r={runner:{source:"cypress",type:Cypress.testingType,version:Cypress.version,platform:Cypress.platform,arch:Cypress.arch,recorder:{scriptVersion:o.getLibVersion()||"unknown",libVersion:o.getLibVersion()||"unknown"}},spec:Cypress.spec,test:t,browser:Cypress.browser,autWindow:null,waitForPaint:()=>Promise.resolve(void 0),paintComplete:!1,recorderEvents:[],commandLiveRefs:new Map};v(s,r),o.bind({pushEvent:n=>{if(console.debug(`[${Date.now()}] [cypress] pushEvent`,n),r.recorderEvents.push(n),n.type===5){let f=r.commandLiveRefs.get(n.data.payload.id)?.get("subject"),m=f?.selector,c=o.getMirror()?.getMeta(f?.[0]);n.data.payload.element={...c,selector:m,childNodes:[]}}}})};var j=e=>{},G=e=>{try{o.stop()}catch{}},K=e=>{o.inject(e);let t=Cypress.currentTest;if(!t)return;let s=l({titlePath:()=>t.titlePath}),r=u(s);r&&(r.runner.recorder.scriptVersion=o.getScriptVersion(),r.autWindow=e,r.paintComplete=!1)},Y=e=>{console.debug(`[${Date.now()}] [cypress] onWindowLoad`,e);let t=Cypress.currentTest;if(!t)return;let s=l({titlePath:()=>t.titlePath}),r=u(s);r&&(r.autWindow||(r.autWindow=e,r.paintComplete=!1),r.waitForPaint=n=>new Promise(i=>{let m=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{i(n)})})},a=(()=>{let c=!1;return()=>{c||(c=!0,m())}})();["interactive","complete"].includes(e.document.readyState)?a():(e.addEventListener("DOMContentLoaded",a,{once:!0}),e.addEventListener("load",a,{once:!0}),setTimeout(()=>{console.warn("\u23F3 Timeout: forcing resolution"),a()},5e3))}),r.waitForPaint().then(async()=>{r.paintComplete=!0,o.inject(e),o.start()}))};var q=()=>{},Z=(e,t)=>{throw e},J=async(e,t)=>{console.debug(`[${Date.now()}] [cypress] onTestAfterRun`,e,t),o.stop()};var E=()=>{Cypress.mocha.getRunner().on("hook",Q)},Q=()=>{},I=()=>{beforeEach("",()=>{}),afterEach("",()=>{})};var R=()=>{_(),E(),I()};var T=()=>{R()};0&&(module.exports={initializeTestmap});
|
|
17430
17521
|
//# sourceMappingURL=index.js.map
|