@appsurify-testmap/rrweb-cypress-plugin 2.1.2-alpha.2 → 2.1.2-alpha.5
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 +30 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -12860,6 +12860,7 @@ class VisibilityManager {
|
|
|
12860
12860
|
__publicField(this, "mirror");
|
|
12861
12861
|
__publicField(this, "mutationCb");
|
|
12862
12862
|
__publicField(this, "rafId", null);
|
|
12863
|
+
__publicField(this, "intervalId", null);
|
|
12863
12864
|
__publicField(this, "rafThrottle");
|
|
12864
12865
|
__publicField(this, "lastFlushTime", 0);
|
|
12865
12866
|
__publicField(this, "elements", /* @__PURE__ */ new Set());
|
|
@@ -12892,7 +12893,7 @@ class VisibilityManager {
|
|
|
12892
12893
|
this.throttle = Number((_c = visibilitySampling == null ? void 0 : visibilitySampling.throttle) != null ? _c : 100);
|
|
12893
12894
|
this.threshold = Number((_d = visibilitySampling == null ? void 0 : visibilitySampling.threshold) != null ? _d : 0.5);
|
|
12894
12895
|
this.sensitivity = Number((_e = visibilitySampling == null ? void 0 : visibilitySampling.sensitivity) != null ? _e : 0.05);
|
|
12895
|
-
this.rafThrottle = Number((_f = visibilitySampling == null ? void 0 : visibilitySampling.rafThrottle) != null ? _f :
|
|
12896
|
+
this.rafThrottle = Number((_f = visibilitySampling == null ? void 0 : visibilitySampling.rafThrottle) != null ? _f : 50);
|
|
12896
12897
|
doc.querySelectorAll("*").forEach((el) => this.observe(el));
|
|
12897
12898
|
const mo = new MutationObserver((mutations) => {
|
|
12898
12899
|
mutations.forEach((m) => {
|
|
@@ -12915,14 +12916,25 @@ class VisibilityManager {
|
|
|
12915
12916
|
startPendingFlushLoop() {
|
|
12916
12917
|
if (this.disabled)
|
|
12917
12918
|
return;
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
this.lastFlushTime
|
|
12921
|
-
|
|
12922
|
-
|
|
12919
|
+
if (typeof requestAnimationFrame === "function") {
|
|
12920
|
+
const loop = (timestamp) => {
|
|
12921
|
+
if (timestamp - this.lastFlushTime >= this.rafThrottle) {
|
|
12922
|
+
this.lastFlushTime = timestamp;
|
|
12923
|
+
this.flushPendingVisibilityMutations();
|
|
12924
|
+
}
|
|
12925
|
+
this.rafId = requestAnimationFrame(loop);
|
|
12926
|
+
};
|
|
12923
12927
|
this.rafId = requestAnimationFrame(loop);
|
|
12924
|
-
}
|
|
12925
|
-
|
|
12928
|
+
} else {
|
|
12929
|
+
const loop = () => {
|
|
12930
|
+
const now = performance.now();
|
|
12931
|
+
if (now - this.lastFlushTime >= this.rafThrottle) {
|
|
12932
|
+
this.lastFlushTime = now;
|
|
12933
|
+
this.flushPendingVisibilityMutations();
|
|
12934
|
+
}
|
|
12935
|
+
};
|
|
12936
|
+
this.intervalId = setInterval(loop, this.rafThrottle);
|
|
12937
|
+
}
|
|
12926
12938
|
}
|
|
12927
12939
|
flushPendingVisibilityMutations() {
|
|
12928
12940
|
if (this.disabled)
|
|
@@ -12997,6 +13009,7 @@ class VisibilityManager {
|
|
|
12997
13009
|
}
|
|
12998
13010
|
unfreeze() {
|
|
12999
13011
|
this.frozen = false;
|
|
13012
|
+
this.flushPendingVisibilityMutations();
|
|
13000
13013
|
}
|
|
13001
13014
|
lock() {
|
|
13002
13015
|
this.locked = true;
|
|
@@ -13008,11 +13021,17 @@ class VisibilityManager {
|
|
|
13008
13021
|
this.elements.clear();
|
|
13009
13022
|
this.previousState.clear();
|
|
13010
13023
|
this.pending.clear();
|
|
13011
|
-
if (this.rafId)
|
|
13024
|
+
if (this.rafId) {
|
|
13012
13025
|
cancelAnimationFrame(this.rafId);
|
|
13026
|
+
this.rafId = null;
|
|
13027
|
+
}
|
|
13028
|
+
if (this.intervalId) {
|
|
13029
|
+
clearInterval(this.intervalId);
|
|
13030
|
+
this.intervalId = null;
|
|
13031
|
+
}
|
|
13013
13032
|
}
|
|
13014
13033
|
}
|
|
13015
|
-
const version$1 = "2.1.2-alpha.
|
|
13034
|
+
const version$1 = "2.1.2-alpha.5";
|
|
13016
13035
|
let wrappedEmit;
|
|
13017
13036
|
let takeFullSnapshot$1;
|
|
13018
13037
|
let canvasManager;
|
|
@@ -13637,5 +13656,5 @@ if (typeof module.exports == "object" && typeof exports == "object") {
|
|
|
13637
13656
|
return module.exports;
|
|
13638
13657
|
}))
|
|
13639
13658
|
//# sourceMappingURL=rrweb-record.umd.cjs.map
|
|
13640
|
-
`;var j={slimDOMOptions:"all",inlineStylesheet:!0,recordDOM:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,maskInputOptions:{password:!0},sampling:{mousemove:!1,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!1,TouchEnd:!1},scroll:100,media:100,input:"last",canvas:"all",visibility:{mode:"
|
|
13659
|
+
`;var j={slimDOMOptions:"all",inlineStylesheet:!0,recordDOM:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,maskInputOptions:{password:!0},sampling:{mousemove:!1,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!1,TouchEnd:!1},scroll:100,media:100,input:"last",canvas:"all",visibility:{mode:"none",debounce:50,threshold:.5,sensitivity:.05,rafThrottle:50}},flushCustomEvent:"after",recordAfter:"DOMContentLoaded",userTriggeredOnInput:!0};function I(e,t){let r={...e};for(let n in t){let s=t[n],o=e[n];s&&typeof s=="object"&&!Array.isArray(s)&&o&&typeof o=="object"&&!Array.isArray(o)?r[n]=I(o,s):s!==void 0&&(r[n]=s)}return r}var h=class{recordFn=null;stopFn=null;targetWindow=null;context;eventCounter=0;events=[];recordOptions;pendingEvents=[];recorderScriptVersion="unknown";recorderLibVersion=$.version;constructor(t){this.recordOptions=I(j,t??{}),this.context={pushEvent:r=>this.events.push(r)}}handleEmit(t){if(t.type===0||t.type===1)return;let r={...t};this.context.pushEvent(r)}inject(t){let r=t;if(this.targetWindow=t,r.rrweb){this.recordFn=r.rrweb.record??null;return}let n=t.document.createElement("script");n.type="text/javascript",n.innerHTML=x,t.document.head.appendChild(n);let s=t.rrweb;if(!s||!s.record){console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);return}this.recordFn=s.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,C.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 r of this.pendingEvents)try{this.recordFn.addCustomEvent(r.tag,r.payload)}catch{console.debug(`[${Date.now()}] [recorder] flush failed for custom event: ${r.tag}`),t.push(r)}this.pendingEvents=t}addCustomEvent(t,r){let n={tag:t,payload:r};if(!this.recordFn||!this.stopFn){console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${t}`),this.pendingEvents.push(n);return}try{this.recordFn.addCustomEvent(t,r)}catch(s){console.debug(`[${Date.now()}] [recorder] error adding custom event: ${t}`,s),this.pendingEvents.push(n)}}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 f=h;var y=Cypress.env("testmap")??{},V=typeof y=="object"&&"recordingOpts"in y?y.recordingOpts:f,i=new f(V),E=()=>{Cypress.on("test:before:run",H).on("log:added",G).on("log:changed",K).on("window:before:load",J).on("window:before:unload",Y).on("window:unload",Z).on("window:load",q).on("command:enqueued",Q).on("command:start",ee).on("command:end",te).on("command:retry",X).on("skipped:command:end",re).on("test:after:run",ie).on("command:failed",ne).on("command:queue:end",se).on("fail",oe),afterEach(()=>{let e=Cypress.currentTest;if(!e)return;let t=a({titlePath:()=>e.titlePath}),r=l(t);if(!r)return;r.recorderEvents.map(s=>{if(s.type!==5)return s;let o=r.commandLiveRefs.get(s.data.payload.id);return s.data.payload.state=o?.state??"unknown",s.data.payload.args=p(o?.get("args")),s.data.payload.query=o?.get("query"),s.data.payload.timeout=o?.get("timeout"),s.data.payload.name=o?.get("name"),s.data.payload.type=o?.get("type"),o?.get("prev")&&(s.data.payload.prev={state:o?.get("prev").state,name:o?.get("prev").get("name"),args:p(o?.get("prev").get("args")),type:o?.get("prev").get("type"),query:o?.get("prev").get("query"),id:o?.get("prev").get("id")}),o?.get("next")&&(s.data.payload.next={state:o?.get("next").state,name:o?.get("next").get("name"),args:p(o?.get("next").get("args")),type:o?.get("next").get("type"),query:o?.get("next").get("query"),id:o?.get("next").get("id")}),s}),console.debug(`[${Date.now()}] [cypress] afterEach:`,r.recorderEvents);let n=S(r);try{cy.task("saveRRWebReport",{testRunResult:n},{log:!1})}catch(s){console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`,s)}})},H=(e,t)=>{let r=a(t),n={runner:{source:"cypress",type:Cypress.testingType,version:Cypress.version,platform:Cypress.platform,arch:Cypress.arch,recorder:{scriptVersion:i.getLibVersion()||"unknown",libVersion:i.getLibVersion()||"unknown"}},spec:Cypress.spec,test:t,browser:Cypress.browser,autWindow:null,waitForPaint:()=>Promise.resolve(void 0),paintComplete:!1,recorderEvents:[],commandLiveRefs:new Map};v(r,n),i.bind({pushEvent:s=>{if(console.debug(`[${Date.now()}] [cypress] pushEvent`,s),n.recorderEvents.push(s),s.type===5){let u=n.commandLiveRefs.get(s.data.payload.id)?.get("subject"),m=u?.selector??w(u),d=i.getMirror()?.getMeta(u?.[0]);s.data.payload.element={...d,selector:m,childNodes:[]}}}})},G=(e,t)=>{},K=(e,t)=>{},Y=e=>{},Z=e=>{try{i.stop()}catch{}},J=e=>{i.inject(e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&(n.runner.recorder.scriptVersion=i.getScriptVersion(),n.autWindow=e,n.paintComplete=!1)},q=e=>{console.debug(`[${Date.now()}] [cypress] onWindowLoad`,e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&(n.autWindow||(n.autWindow=e,n.paintComplete=!1),n.waitForPaint=s=>new Promise(o=>{let m=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{o(s)})})},c=(()=>{let d=!1;return()=>{d||(d=!0,m())}})();["interactive","complete"].includes(e.document.readyState)?c():(e.addEventListener("DOMContentLoaded",c,{once:!0}),e.addEventListener("load",c,{once:!0}),setTimeout(()=>{console.warn("\u23F3 Timeout: forcing resolution"),c()},5e3))}),n.waitForPaint().then(async()=>{n.paintComplete=!0,i.inject(e),i.start()}))},Q=e=>{let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&n.commandLiveRefs.set(e.id,e)},X=e=>{},ee=e=>{let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&n.commandLiveRefs.set(e.attributes.id,e)},te=e=>{console.debug(`[${Date.now()}] [cypress] onCommandEnd`,e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);if(!n)return;(async()=>{!n.paintComplete&&typeof n.waitForPaint=="function"&&(await n.waitForPaint(),n.paintComplete=!0)})(),i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id})},ne=(e,t)=>{console.debug(`[${Date.now()}] [cypress] onCommandFailed`,e),i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id})},re=e=>{console.debug(`[${Date.now()}] [cypress] onSkippedCommandEnd`,e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&(n.commandLiveRefs.set(e.attributes.id,e),i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id}))},se=()=>{},oe=(e,t)=>{throw e},ie=async(e,t)=>{console.debug(`[${Date.now()}] [cypress] onTestAfterRun`,e,t),i.stop()};var _=()=>{Cypress.mocha.getRunner().on("hook",ae)},ae=()=>{},R=()=>{beforeEach("",()=>{}),afterEach("",()=>{})};var T=()=>{E(),_(),R()};var M=()=>{T()};0&&(module.exports={initializeTestmap});
|
|
13641
13660
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/browser/runtime.ts","../src/browser/utils.ts","../src/recorder/RRWebRecorder.ts","../src/recorder/index.ts","../src/browser/events/cypress.ts","../src/browser/events/mocha.ts","../src/browser/events/index.ts","../src/browser/index.ts"],"sourcesContent":["import { initializeTestmap } from './browser'\n\nexport { initializeTestmap };\n","import type { TestRunContext } from '../types';\n\n\nexport const testContexts = new Map<string, TestRunContext>();\n\nexport function setCurrentTestContext(key: string, ctx: TestRunContext): void {\n testContexts.set(key, ctx);\n}\n\nexport function getCurrentTestContext(key: string): TestRunContext | undefined {\n return testContexts.get(key);\n}\n\nexport function clearTestContext(key: string): void {\n testContexts.delete(key);\n}\n\n\n","/// <reference types=\"cypress\" />\nimport type {\n TestSuiteInfo,\n TestInfo,\n TestInfoInvocationDetails,\n TestRunResult,\n TestRunContext, SpecInfo, BrowserInfo,\n} from '../types';\n\n\nexport function safeSerializeArray(arr: unknown[]): (string | number | boolean | null)[] {\n return arr\n .filter((value): value is string | number | boolean | null => {\n // Удаляем { log: false }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof value === 'object' && value !== null && 'log' in value && (value as any).log === false) {\n return false;\n }\n\n // Пропускаем только примитивы\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n value === null\n );\n });\n}\n\nexport function buildSelector(subject: JQuery<HTMLElement> | undefined): string | null {\n const el = subject?.[0];\n if (!el) return null;\n\n const tag = el.tagName.toLowerCase();\n const id = el.id ? `#${el.id}` : '';\n const classSelector = Array.from(el.classList)\n .map(cls => `.${cls}`)\n .join('');\n\n return `${tag}${id}${classSelector}`;\n}\n\nexport function getTestKey(test: Mocha.Test | { titlePath: () => string[] }): string {\n return test.titlePath().join(' > ');\n}\n\nexport function getSizeInBytes(data: unknown): number {\n let str: string;\n\n if (typeof data === 'string') {\n str = data;\n } else {\n try {\n str = JSON.stringify(data);\n } catch {\n return 0;\n }\n }\n\n return new TextEncoder().encode(str).length;\n}\n\nexport function formatBytes(bytes: number): string {\n const kb = bytes / 1024;\n const mb = kb / 1024;\n\n if (mb >= 1) return `${mb.toFixed(2)} MB`;\n if (kb >= 1) return `${kb.toFixed(2)} KB`;\n return `${bytes} B`;\n}\n\nexport async function createHash(data: object): Promise<string> {\n const json = JSON.stringify(data);\n const buffer = new TextEncoder().encode(json);\n const hashBuffer = await crypto.subtle.digest('SHA-256', buffer);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n}\n\n\nexport function prepareTestSuite(suite: Mocha.Suite & {id: string, type: string} | undefined): TestSuiteInfo | undefined {\n if (!suite) return undefined;\n\n\n return {\n id: suite.id,\n file: suite.file,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(suite.invocationDetails),\n pending: suite.pending,\n root: suite.root,\n title: suite.title,\n type: suite.type,\n }\n}\n\nexport function prepareTest(test: Mocha.Test & {id: string, type: string, parent: Mocha.Suite | undefined}): TestInfo {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const suite = prepareTestSuite(test.parent);\n console.log(\"Suite\", suite);\n return {\n suite: suite,\n file: test.file,\n duration: test.duration,\n id: test.id,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending,\n state: test.state,\n sync: test.sync,\n timedOut: test.timedOut,\n title: test.title,\n titlePath: test.titlePath(),\n fullTitle: test.fullTitle(),\n type: test.type,\n }\n}\n\nexport function safeInvocationDetails(details?: Partial<TestInfoInvocationDetails>): TestInfoInvocationDetails {\n return {\n absoluteFile: details?.absoluteFile ?? '',\n column: details?.column ?? 0,\n fileUrl: details?.fileUrl ?? '',\n function: details?.function ?? '',\n line: details?.line ?? 0,\n originalFile: details?.originalFile ?? '',\n relativeFile: details?.relativeFile ?? '',\n };\n}\n\n\nexport function mapTestRunContextToResult(ctx: TestRunContext): TestRunResult {\n\n return {\n runner: ctx.runner,\n spec: mapSpec(ctx.spec),\n browser: mapBrowser(ctx.browser),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n test: mapTest(ctx.test),\n recorderEvents: Array.isArray(ctx.recorderEvents) ? ctx.recorderEvents : [],\n };\n}\n\nexport function mapSpec(spec: Cypress.Spec): SpecInfo {\n return {\n name: spec.name ?? '',\n absolute: spec.absolute ?? '',\n relative: spec.relative ?? '',\n specFilter: spec.specFilter ?? '',\n specType: spec.specType ?? 'integration',\n baseName: spec.baseName ?? '',\n fileExtension: spec.fileExtension ?? '',\n fileName: spec.fileName ?? '',\n id: spec.id ?? '',\n };\n}\n\nexport function mapBrowser(browser: Cypress.Browser): BrowserInfo {\n return {\n name: browser.name ?? '',\n version: browser.version ?? '',\n displayName: browser.displayName ?? '',\n family: browser.family ?? '',\n majorVersion: browser.majorVersion ?? '',\n channel: browser.channel ?? '',\n path: browser.path ?? '',\n };\n}\n\nexport function mapTest(test: Mocha.Test & {id: string}): TestInfo {\n\n\n return {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n suite: prepareTestSuite(test.parent),\n file: test.file ?? '',\n duration: test.duration ?? 0,\n id: test.id ?? '',\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending ?? false,\n state: test.state ?? 'unknown',\n sync: test.sync ?? false,\n timedOut: test.timedOut ?? false,\n title: test.title ?? '',\n titlePath: typeof test.titlePath === 'function' ? test.titlePath() : [],\n fullTitle: typeof test.fullTitle === 'function' ? test.fullTitle() : '',\n type: test.type ?? 'test',\n };\n}\n","import type { record, recordOptions } from '@appsurify-testmap/rrweb';\nimport { version as libVersion, utils } from '@appsurify-testmap/rrweb';\nimport type { Mirror } from '@appsurify-testmap/rrweb-snapshot';\nimport { getRecordSequentialIdPlugin } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport rrSrc from './releases/rrweb-record.umd.cjs.src';\n\nimport type { RecorderContext, Recorder, RecorderEvent } from './types';\nimport { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\n\ninterface WindowWithRRWeb extends Window {\n rrweb?: {\n record: typeof record | null;\n };\n}\n\nexport const defaultRecordOptions: recordOptions<eventWithTime> = {\n slimDOMOptions: 'all',\n inlineStylesheet: true,\n recordDOM: true,\n recordCanvas: true,\n collectFonts: true,\n inlineImages: true,\n // checkoutEveryNvm: 10,\n // excludeAttribute: /data-(cy|test(id)?|cypress|highlight-el|cypress-el)/i,\n maskInputOptions: { password: true },\n sampling: {\n mousemove: false,\n mouseInteraction: {\n MouseUp: false,\n MouseDown: false,\n Click: true,\n ContextMenu: true,\n DblClick: true,\n Focus: true,\n Blur: true,\n TouchStart: false,\n TouchEnd: false,\n },\n scroll: 100,\n media: 100,\n input: 'last',\n canvas: 'all',\n visibility: {\n mode: 'debounce',\n debounce: 50,\n threshold: 0.5,\n sensitivity: 0.05,\n rafThrottle: 50\n }\n },\n flushCustomEvent: 'after',\n // recordAfter: 'DOMContentStabilized',\n recordAfter: 'DOMContentLoaded',\n userTriggeredOnInput: true,\n}\n\nfunction deepMerge<T>(target: T, source: Partial<T>): T {\n const result = { ...target };\n\n for (const key in source) {\n const sourceValue = source[key];\n const targetValue = target[key];\n\n if (\n sourceValue &&\n typeof sourceValue === 'object' &&\n !Array.isArray(sourceValue) &&\n targetValue &&\n typeof targetValue === 'object' &&\n !Array.isArray(targetValue)\n ) {\n result[key] = deepMerge(targetValue, sourceValue);\n } else if (sourceValue !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n result[key] = sourceValue as any;\n }\n }\n\n return result;\n}\n\nexport class RRWebRecorder implements Recorder {\n private recordFn: typeof record | null = null;\n private stopFn: (() => void) | undefined | null = null;\n private targetWindow: Window | null = null;\n private context: RecorderContext;\n private eventCounter = 0;\n private events: RecorderEvent[] = [];\n private recordOptions?: recordOptions<eventWithTime>;\n private pendingEvents: {\n tag: string;\n payload: Record<string, unknown>;\n }[] = [];\n private recorderScriptVersion = 'unknown';\n private recorderLibVersion = libVersion;\n\n constructor(options?: recordOptions<eventWithTime>) {\n this.recordOptions = deepMerge(defaultRecordOptions, options ?? {});\n this.context = {\n pushEvent: (event) => this.events.push(event),\n };\n }\n\n private handleEmit(event: RecorderEvent) {\n if (event.type === 0 || event.type === 1) {\n return;\n }\n const rrEvent: RecorderEvent = {\n ...event,\n };\n this.context.pushEvent(rrEvent);\n }\n\n public inject(win: Window) {\n const w = win as WindowWithRRWeb;\n\n this.targetWindow = win;\n\n if (w.rrweb) {\n this.recordFn = w.rrweb.record ?? null;\n return;\n }\n\n const script = win.document.createElement('script');\n script.type = 'text/javascript';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n script.innerHTML = rrSrc;\n win.document.head.appendChild(script);\n\n const recheck = (win as WindowWithRRWeb).rrweb;\n if (!recheck || !recheck.record) {\n console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);\n return;\n }\n\n this.recordFn = recheck.record;\n // console.debug(`[${Date.now()}] [recorder] Recorder loaded: `, this.recordFn.getVersion());\n this.recorderScriptVersion = this.recordFn.getVersion();\n }\n\n public start() {\n if (!this.targetWindow || !this.recordFn) {\n console.debug(`[${Date.now()}] [recorder] Not ready to start`);\n return;\n }\n\n if (this.stopFn) {\n console.debug(`[${Date.now()}] [recorder] Already recording`);\n return;\n }\n\n\n this.stopFn = this.recordFn({\n emit: (event: RecorderEvent) => this.handleEmit(event),\n plugins: [\n getRecordSequentialIdPlugin({\n key: 'id',\n getId: () => ++this.eventCounter,\n }),\n ],\n ...this.recordOptions\n });\n\n this.flush();\n }\n\n public stop() {\n this.flush();\n this.stopFn?.();\n this.stopFn = null;\n }\n\n public reset() {\n this.eventCounter = 0;\n this.events = [];\n this.stop();\n this.context = {\n pushEvent: (event) => this.events.push(event),\n };\n }\n\n public flush() {\n if (!this.recordFn) return;\n\n const stillPending: typeof this.pendingEvents = [];\n\n for (const evt of this.pendingEvents) {\n try {\n this.recordFn.addCustomEvent(evt.tag, evt.payload);\n } catch (err) {\n console.debug(`[${Date.now()}] [recorder] flush failed for custom event: ${evt.tag}`);\n stillPending.push(evt);\n }\n }\n\n this.pendingEvents = stillPending;\n }\n\n public addCustomEvent(tag: string, payload: Record<string, unknown>) {\n const event = { tag, payload };\n\n if (!this.recordFn || !this.stopFn) {\n console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${tag}`);\n this.pendingEvents.push(event);\n return;\n }\n\n try {\n this.recordFn.addCustomEvent(tag, payload);\n } catch (error) {\n console.debug(`[${Date.now()}] [recorder] error adding custom event: ${tag}`, error);\n this.pendingEvents.push(event);\n }\n }\n\n public isRecordingReady(): boolean {\n return !!this.recordFn && !!this.stopFn;\n }\n\n public isRecording(): boolean {\n return this.recordFn?.isRecording() || false;\n }\n\n public getScriptVersion(): string {\n return `@appsurify-testmap/rrweb-record:${this.recorderScriptVersion}`;\n }\n\n public getLibVersion(): string {\n return `@appsurify-testmap/rrweb:${this.recorderLibVersion}`;\n }\n\n public getEvents(): readonly RecorderEvent[] {\n return this.events;\n }\n\n public getMirror(): Mirror | undefined {\n return (this.recordFn as unknown as { mirror?: Mirror })?.mirror;\n }\n\n public bind(ctx: RecorderContext) {\n this.context = ctx;\n }\n\n public setEventCounter(value: number) {\n this.eventCounter = value;\n }\n\n}\n","import { RRWebRecorder } from './RRWebRecorder';\n\n\nexport default RRWebRecorder;\n","/// <reference types=\"cypress\" />\n\nimport {getCurrentTestContext, setCurrentTestContext} from '../runtime';\nimport {safeSerializeArray, buildSelector, getTestKey, mapTestRunContextToResult} from '../utils';\nimport RRWebRecorder from '../../recorder';\nimport defaultRecordOptions from '../../recorder';\nimport type {RecorderEvent} from '../../recorder/types';\nimport type {TestRunContext} from '../../types';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst testmapEnv = Cypress.env('testmap') ?? {};\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst recordingOpts = typeof testmapEnv === 'object' && 'recordingOpts' in testmapEnv\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ? testmapEnv.recordingOpts\n : defaultRecordOptions;\n// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\nconst recorder = new RRWebRecorder(recordingOpts);\n\nexport const registerCypressEventListeners = () => {\n\n Cypress\n .on('test:before:run', onTestBeforeRun)\n .on('log:added', onLogAdded)\n .on('log:changed', onLogChanged)\n .on('window:before:load', onWindowBeforeLoad)\n .on('window:before:unload', onWindowBeforeUnload)\n .on('window:unload', onWindowUnload)\n .on('window:load', onWindowLoad)\n .on('command:enqueued', onCommandEnqueued)\n .on('command:start', onCommandStart)\n .on('command:end', onCommandEnd)\n .on('command:retry', onCommandRetry)\n .on('skipped:command:end', onSkippedCommandEnd)\n .on('test:after:run', onTestAfterRun)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('command:failed', onCommandFailed)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('command:queue:end', onCommandQueueEnd)\n .on('fail', onFail);\n\n\n afterEach(() => {\n // console.debug(`[${Date.now()}] [cypress] afterEach:`);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // console.debug(`[${Date.now()}] [cypress] afterEach:`, ctx);\n ctx.recorderEvents.map((event) => {\n if (event.type !== 5 ) return event;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const liveCommand = ctx.commandLiveRefs.get(event.data.payload.id) as Cypress.CommandQueue;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // event.data.payload.element = element;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n event.data.payload.state = liveCommand?.state ?? 'unknown';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // event.data.payload.args = liveCommand?.get('args');\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-call\n event.data.payload.args = safeSerializeArray(liveCommand?.get('args'));\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.query = liveCommand?.get('query');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.timeout = liveCommand?.get('timeout');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.name = liveCommand?.get('name');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.type = liveCommand?.get('type');\n\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (liveCommand?.get('prev')) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.prev = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n state: liveCommand?.get('prev').state,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n name: liveCommand?.get('prev').get('name'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n args: safeSerializeArray(liveCommand?.get('prev').get('args')),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n type: liveCommand?.get('prev').get('type'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n query: liveCommand?.get('prev').get('query'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n id: liveCommand?.get('prev').get('id'),\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (liveCommand?.get('next')) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.next = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n state: liveCommand?.get('next').state,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n name: liveCommand?.get('next').get('name'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n args: safeSerializeArray(liveCommand?.get('next').get('args')),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n type: liveCommand?.get('next').get('type'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n query: liveCommand?.get('next').get('query'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n id: liveCommand?.get('next').get('id'),\n };\n }\n return event;\n })\n console.debug(`[${Date.now()}] [cypress] afterEach:`, ctx.recorderEvents);\n\n // const testRunResult: TestRunResult = {\n // spec: ctx.spec as unknown as SpecInfo,\n // test: prepareTest(ctx.test),\n // browser: ctx.browser as BrowserInfo,\n // recorderEvents: ctx.recorderEvents,\n // }\n\n const testRunResult = mapTestRunContextToResult(ctx);\n\n\n // const testRunResultSize = getSizeInBytes(testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:`, testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:size:`, formatBytes(testRunResultSize));\n // const debugReport = new UICoverageReport(testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:debugReport:`, debugReport.toJSON());\n\n try {\n cy.task('saveRRWebReport', {\n testRunResult\n }, { log: false });\n } catch (e) {\n console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`, e);\n }\n\n });\n\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // Cypress.Commands.overwrite('type', (originalFn, subject, text, options) => {\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // return originalFn(subject, text, options).then(() => {\n // if (Cypress.dom.isElement(subject[0])) {\n // const el = subject[0];\n // if (el) {\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // el.dispatchEvent(new Event('input', { bubbles: true }));\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // el.dispatchEvent(new Event('change', { bubbles: true }));\n // }\n // }\n // });\n // });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onTestBeforeRun = (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n // console.debug(`[${Date.now()}] [cypress] onTestBeforeRun`, attributes, test);\n const testKey = getTestKey(test);\n const testRunContext: TestRunContext = {\n runner: {\n source: 'cypress',\n type: Cypress.testingType,\n version: Cypress.version,\n platform: Cypress.platform,\n arch: Cypress.arch,\n recorder: {\n scriptVersion: recorder.getLibVersion() || 'unknown',\n libVersion: recorder.getLibVersion() || 'unknown'\n }\n\n },\n spec: Cypress.spec,\n test: test,\n browser: Cypress.browser,\n autWindow: null,\n waitForPaint: () => Promise.resolve(undefined),\n paintComplete: false,\n recorderEvents: [] as RecorderEvent[],\n commandLiveRefs: new Map<string, Cypress.CommandQueue>()\n };\n\n setCurrentTestContext(testKey, testRunContext);\n\n recorder.bind({\n pushEvent: (event) => {\n console.debug(`[${Date.now()}] [cypress] pushEvent`, event);\n testRunContext.recorderEvents.push(event)\n if (event.type === 5) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const liveCommand = testRunContext.commandLiveRefs.get(event.data.payload.id) as Cypress.CommandQueue;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n const subject = liveCommand?.get('subject')\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-argument\n const selector = subject?.selector ?? buildSelector(subject);\n\n const mirror = recorder.getMirror();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n const element = mirror?.getMeta(subject?.[0]);\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.element = {\n ...element,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n selector,\n childNodes: []\n };\n }\n },\n });\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogAdded = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`[${Date.now()}] [cypress] onLogAdded`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogChanged = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`[${Date.now()}] [cypress] onLogChanged`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowBeforeUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowBeforeUnload`, event);\n // try {\n // recorder.stop();\n // // eslint-disable-next-line @typescript-eslint/no-unused-vars\n // } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowUnload`, event);\n try {\n recorder.stop();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowBeforeLoad = (win: Cypress.AUTWindow) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowBeforeLoad`, win);\n recorder.inject(win);\n // recorder.start();\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n ctx.runner.recorder!.scriptVersion = recorder.getScriptVersion();\n ctx.autWindow = win;\n ctx.paintComplete = false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowLoad = (win: Cypress.AUTWindow) => {\n console.debug(`[${Date.now()}] [cypress] onWindowLoad`, win);\n // recorder.inject(win);\n // recorder.start();\n // console.debug(`[${Date.now()}] [cypress] onWindowLoad after start`, recorder.isRecording());\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n if (!ctx.autWindow) {\n ctx.autWindow = win;\n ctx.paintComplete = false;\n }\n\n ctx.waitForPaint = (value?: unknown): Promise<unknown> => {\n return new Promise<unknown>((resolve) => {\n const maxWaitMs = 5000;\n\n const captureAfterPaint = () => {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n resolve(value);\n });\n });\n };\n\n const safeResolve = (() => {\n let called = false;\n return () => {\n if (!called) {\n called = true;\n captureAfterPaint();\n }\n };\n })();\n\n if (['interactive', 'complete'].includes(win.document.readyState)) {\n safeResolve();\n } else {\n win.addEventListener('DOMContentLoaded', safeResolve, { once: true });\n win.addEventListener('load', safeResolve, { once: true });\n setTimeout(() => {\n console.warn('⏳ Timeout: forcing resolution');\n safeResolve();\n }, maxWaitMs);\n }\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/require-await\n void ctx.waitForPaint().then(async () => {\n ctx.paintComplete = true;\n recorder.inject(win);\n recorder.start();\n });\n // console.debug(`[${Date.now()}] [cypress] onWindowLoad after waitForPaint`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandEnqueued = (command: Cypress.EnqueuedCommandAttributes) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandEnqueued`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.id, command);\n\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandRetry = (command: Cypress.CommandQueue) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandRetry`, command);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandStart = (command: Cypress.CommandQueue) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandStart`, command);\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.attributes.id, command);\n\n // If need before state\n // recorder.addCustomEvent(`${command.attributes.name}`, {\n // id: command.attributes.id,\n // });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandEnd = (command: Cypress.CommandQueue) => {\n console.debug(`[${Date.now()}] [cypress] onCommandEnd`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n const waitWindowLoaded = async () => {\n if (!ctx.paintComplete && typeof ctx.waitForPaint === 'function') {\n await ctx.waitForPaint();\n ctx.paintComplete = true;\n }\n }\n void waitWindowLoaded();\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n // void waitWindowLoaded();\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandFailed = (command: Cypress.CommandQueue, err: unknown) => {\n console.debug(`[${Date.now()}] [cypress] onCommandFailed`, command);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onSkippedCommandEnd = (command: Cypress.CommandQueue) => {\n console.debug(`[${Date.now()}] [cypress] onSkippedCommandEnd`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.attributes.id, command);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandQueueEnd = () => {\n // console.debug(`[${Date.now()}] [cypress] onCommandQueueEnd`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onFail = (error: Cypress.CypressError, mocha: Mocha.Runnable) => {\n // console.debug(`[${Date.now()}] [cypress] onFail`, {error, mocha});\n throw error;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/require-await\nconst onTestAfterRun = async (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n console.debug(`[${Date.now()}] [cypress] onTestAfterRun`, attributes, test);\n recorder.stop();\n\n // const testKey = getTestKey(test);\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n //\n // console.debug(`[${Date.now()}] [cypress] onTestAfterRun`, ctx.recorderEvents);\n};\n\n\n","/// <reference types=\"cypress\" />\n\n\nexport const registerMochaEventListeners = () => {\n // ⚠️ Плохой стиль, отключает всю типизацию\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((Cypress as any).mocha.getRunner() as Mocha.Runner)\n .on('hook', onHook);\n};\n\nconst onHook = () => {\n // console.debug(`🟡 [${Date.now()}] [mocha] onHook:`);\n};\n\nexport const injectMochaHookFunctions = () => {\n\n beforeEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] beforeEach:`);\n });\n\n afterEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] afterEach:`);\n // const currentTest = Cypress.currentTest;\n // const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n //\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n // const serializedReport = serializeTestRunContextToJson(ctx);\n // console.log(`${Date.now()} [afterEach]`, currentTest, serializedReport);\n // cy.task('saveSnapshotReport', serializedReport)\n });\n\n};\n","import { registerCypressEventListeners } from \"./cypress\";\nimport { registerMochaEventListeners, injectMochaHookFunctions } from \"./mocha\";\n\nexport const enableTestmap = () => {\n registerCypressEventListeners();\n registerMochaEventListeners();\n injectMochaHookFunctions();\n};\n","import { enableTestmap } from './events';\n\nexport const initializeTestmap = () => {\n // if (isTestmap().Initialized) {\n // return;\n // }\n enableTestmap();\n}\n"],"mappings":"yaAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,uBAAAE,IAAA,eAAAC,EAAAH,ICGO,IAAMI,EAAe,IAAI,IAEzB,SAASC,EAAsBC,EAAaC,EAA2B,CAC5EH,EAAa,IAAIE,EAAKC,CAAG,CAC3B,CAEO,SAASC,EAAsBF,EAAyC,CAC7E,OAAOF,EAAa,IAAIE,CAAG,CAC7B,CCDO,SAASG,EAAmBC,EAAsD,CACvF,OAAOA,EACJ,O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C,EAAQ,WAAW,OAAQ,CAElD,GAAIA,EAAQ,WAAW,EAC3B,CAAC,EACL,EAGM5B,GAAoB,IAAM,CAEhC,EAIMC,GAAS,CAAC6B,EAA6BC,IAA0B,CAEnE,MAAMD,CACV,EAKMhC,GAAiB,MAAOe,EAAgCC,IAAqB,CAC/E,QAAQ,MAAM,IAAI,KAAK,IAAI,8BAA+BD,EAAYC,CAAI,EAC1E9B,EAAS,KAAK,CAOlB,EC/fO,IAAMgD,EAA8B,IAAM,CAG7C,QAAgB,MAAM,UAAU,EAC7B,GAAG,OAAQC,EAAM,CACxB,EAEMA,GAAS,IAAM,CAErB,EAEaC,EAA2B,IAAM,CAE5C,WAAW,GAAI,IAAK,CAEpB,CAAC,EAED,UAAU,GAAI,IAAK,CAUnB,CAAC,CAEH,EC7BO,IAAMC,EAAgB,IAAM,CACjCC,EAA8B,EAC9BC,EAA4B,EAC5BC,EAAyB,CAC3B,ECLO,IAAMC,EAAoB,IAAM,CAInCC,EAAc,CAClB","names":["src_exports","__export","initializeTestmap","__toCommonJS","testContexts","setCurrentTestContext","key","ctx","getCurrentTestContext","safeSerializeArray","arr","value","buildSelector","subject","el","tag","id","classSelector","cls","getTestKey","test","prepareTestSuite","suite","safeInvocationDetails","safeInvocationDetails","details","mapTestRunContextToResult","ctx","mapSpec","mapBrowser","mapTest","spec","browser","test","prepareTestSuite","import_rrweb","import_rrweb_plugin_sequential_id_record","defaultRecordOptions","deepMerge","target","source","result","key","sourceValue","targetValue","RRWebRecorder","libVersion","options","event","rrEvent","win","w","script","rrweb_record_umd_cjs_default","recheck","stillPending","evt","tag","payload","error","ctx","value","recorder_default","RRWebRecorder","testmapEnv","recordingOpts","recorder_default","recorder","registerCypressEventListeners","onTestBeforeRun","onLogAdded","onLogChanged","onWindowBeforeLoad","onWindowBeforeUnload","onWindowUnload","onWindowLoad","onCommandEnqueued","onCommandStart","onCommandEnd","onCommandRetry","onSkippedCommandEnd","onTestAfterRun","onCommandFailed","onCommandQueueEnd","onFail","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","event","liveCommand","safeSerializeArray","testRunResult","mapTestRunContextToResult","e","attributes","test","testRunContext","setCurrentTestContext","subject","selector","buildSelector","element","log","win","value","resolve","captureAfterPaint","safeResolve","called","command","err","error","mocha","registerMochaEventListeners","onHook","injectMochaHookFunctions","enableTestmap","registerCypressEventListeners","registerMochaEventListeners","injectMochaHookFunctions","initializeTestmap","enableTestmap"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/browser/runtime.ts","../src/browser/utils.ts","../src/recorder/RRWebRecorder.ts","../src/recorder/index.ts","../src/browser/events/cypress.ts","../src/browser/events/mocha.ts","../src/browser/events/index.ts","../src/browser/index.ts"],"sourcesContent":["import { initializeTestmap } from './browser'\n\nexport { initializeTestmap };\n","import type { TestRunContext } from '../types';\n\n\nexport const testContexts = new Map<string, TestRunContext>();\n\nexport function setCurrentTestContext(key: string, ctx: TestRunContext): void {\n testContexts.set(key, ctx);\n}\n\nexport function getCurrentTestContext(key: string): TestRunContext | undefined {\n return testContexts.get(key);\n}\n\nexport function clearTestContext(key: string): void {\n testContexts.delete(key);\n}\n\n\n","/// <reference types=\"cypress\" />\nimport type {\n TestSuiteInfo,\n TestInfo,\n TestInfoInvocationDetails,\n TestRunResult,\n TestRunContext, SpecInfo, BrowserInfo,\n} from '../types';\n\n\nexport function safeSerializeArray(arr: unknown[]): (string | number | boolean | null)[] {\n return arr\n .filter((value): value is string | number | boolean | null => {\n // Удаляем { log: false }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof value === 'object' && value !== null && 'log' in value && (value as any).log === false) {\n return false;\n }\n\n // Пропускаем только примитивы\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n value === null\n );\n });\n}\n\nexport function buildSelector(subject: JQuery<HTMLElement> | undefined): string | null {\n const el = subject?.[0];\n if (!el) return null;\n\n const tag = el.tagName.toLowerCase();\n const id = el.id ? `#${el.id}` : '';\n const classSelector = Array.from(el.classList)\n .map(cls => `.${cls}`)\n .join('');\n\n return `${tag}${id}${classSelector}`;\n}\n\nexport function getTestKey(test: Mocha.Test | { titlePath: () => string[] }): string {\n return test.titlePath().join(' > ');\n}\n\nexport function getSizeInBytes(data: unknown): number {\n let str: string;\n\n if (typeof data === 'string') {\n str = data;\n } else {\n try {\n str = JSON.stringify(data);\n } catch {\n return 0;\n }\n }\n\n return new TextEncoder().encode(str).length;\n}\n\nexport function formatBytes(bytes: number): string {\n const kb = bytes / 1024;\n const mb = kb / 1024;\n\n if (mb >= 1) return `${mb.toFixed(2)} MB`;\n if (kb >= 1) return `${kb.toFixed(2)} KB`;\n return `${bytes} B`;\n}\n\nexport async function createHash(data: object): Promise<string> {\n const json = JSON.stringify(data);\n const buffer = new TextEncoder().encode(json);\n const hashBuffer = await crypto.subtle.digest('SHA-256', buffer);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n}\n\n\nexport function prepareTestSuite(suite: Mocha.Suite & {id: string, type: string} | undefined): TestSuiteInfo | undefined {\n if (!suite) return undefined;\n\n\n return {\n id: suite.id,\n file: suite.file,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(suite.invocationDetails),\n pending: suite.pending,\n root: suite.root,\n title: suite.title,\n type: suite.type,\n }\n}\n\nexport function prepareTest(test: Mocha.Test & {id: string, type: string, parent: Mocha.Suite | undefined}): TestInfo {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const suite = prepareTestSuite(test.parent);\n console.log(\"Suite\", suite);\n return {\n suite: suite,\n file: test.file,\n duration: test.duration,\n id: test.id,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending,\n state: test.state,\n sync: test.sync,\n timedOut: test.timedOut,\n title: test.title,\n titlePath: test.titlePath(),\n fullTitle: test.fullTitle(),\n type: test.type,\n }\n}\n\nexport function safeInvocationDetails(details?: Partial<TestInfoInvocationDetails>): TestInfoInvocationDetails {\n return {\n absoluteFile: details?.absoluteFile ?? '',\n column: details?.column ?? 0,\n fileUrl: details?.fileUrl ?? '',\n function: details?.function ?? '',\n line: details?.line ?? 0,\n originalFile: details?.originalFile ?? '',\n relativeFile: details?.relativeFile ?? '',\n };\n}\n\n\nexport function mapTestRunContextToResult(ctx: TestRunContext): TestRunResult {\n\n return {\n runner: ctx.runner,\n spec: mapSpec(ctx.spec),\n browser: mapBrowser(ctx.browser),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n test: mapTest(ctx.test),\n recorderEvents: Array.isArray(ctx.recorderEvents) ? ctx.recorderEvents : [],\n };\n}\n\nexport function mapSpec(spec: Cypress.Spec): SpecInfo {\n return {\n name: spec.name ?? '',\n absolute: spec.absolute ?? '',\n relative: spec.relative ?? '',\n specFilter: spec.specFilter ?? '',\n specType: spec.specType ?? 'integration',\n baseName: spec.baseName ?? '',\n fileExtension: spec.fileExtension ?? '',\n fileName: spec.fileName ?? '',\n id: spec.id ?? '',\n };\n}\n\nexport function mapBrowser(browser: Cypress.Browser): BrowserInfo {\n return {\n name: browser.name ?? '',\n version: browser.version ?? '',\n displayName: browser.displayName ?? '',\n family: browser.family ?? '',\n majorVersion: browser.majorVersion ?? '',\n channel: browser.channel ?? '',\n path: browser.path ?? '',\n };\n}\n\nexport function mapTest(test: Mocha.Test & {id: string}): TestInfo {\n\n\n return {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n suite: prepareTestSuite(test.parent),\n file: test.file ?? '',\n duration: test.duration ?? 0,\n id: test.id ?? '',\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending ?? false,\n state: test.state ?? 'unknown',\n sync: test.sync ?? false,\n timedOut: test.timedOut ?? false,\n title: test.title ?? '',\n titlePath: typeof test.titlePath === 'function' ? test.titlePath() : [],\n fullTitle: typeof test.fullTitle === 'function' ? test.fullTitle() : '',\n type: test.type ?? 'test',\n };\n}\n","import type { record, recordOptions } from '@appsurify-testmap/rrweb';\nimport { version as libVersion, utils } from '@appsurify-testmap/rrweb';\nimport type { Mirror } from '@appsurify-testmap/rrweb-snapshot';\nimport { getRecordSequentialIdPlugin } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport rrSrc from './releases/rrweb-record.umd.cjs.src';\n\nimport type { RecorderContext, RecorderEvent } from './types';\nimport { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\n\ninterface WindowWithRRWeb extends Window {\n rrweb?: {\n record: typeof record | null;\n };\n}\n\nexport const defaultRecordOptions: recordOptions<eventWithTime> = {\n slimDOMOptions: 'all',\n inlineStylesheet: true,\n recordDOM: true,\n recordCanvas: true,\n collectFonts: true,\n inlineImages: true,\n // checkoutEveryNvm: 10,\n // excludeAttribute: /data-(cy|test(id)?|cypress|highlight-el|cypress-el)/i,\n maskInputOptions: { password: true },\n sampling: {\n mousemove: false,\n mouseInteraction: {\n MouseUp: false,\n MouseDown: false,\n Click: true,\n ContextMenu: true,\n DblClick: true,\n Focus: true,\n Blur: true,\n TouchStart: false,\n TouchEnd: false,\n },\n scroll: 100,\n media: 100,\n input: 'last',\n canvas: 'all',\n visibility: {\n mode: 'none',\n debounce: 50,\n threshold: 0.5,\n sensitivity: 0.05,\n rafThrottle: 50\n }\n },\n flushCustomEvent: 'after',\n // recordAfter: 'DOMContentStabilized',\n recordAfter: 'DOMContentLoaded',\n userTriggeredOnInput: true,\n}\n\nfunction deepMerge<T>(target: T, source: Partial<T>): T {\n const result = { ...target };\n\n for (const key in source) {\n const sourceValue = source[key];\n const targetValue = target[key];\n\n if (\n sourceValue &&\n typeof sourceValue === 'object' &&\n !Array.isArray(sourceValue) &&\n targetValue &&\n typeof targetValue === 'object' &&\n !Array.isArray(targetValue)\n ) {\n result[key] = deepMerge(targetValue, sourceValue);\n } else if (sourceValue !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n result[key] = sourceValue as any;\n }\n }\n\n return result;\n}\n\nexport class RRWebRecorder {\n private recordFn: typeof record | null = null;\n private stopFn: (() => void) | undefined | null = null;\n private targetWindow: Window | null = null;\n private context: RecorderContext;\n private eventCounter = 0;\n private events: RecorderEvent[] = [];\n private recordOptions?: recordOptions<eventWithTime>;\n private pendingEvents: {\n tag: string;\n payload: Record<string, unknown>;\n }[] = [];\n private recorderScriptVersion = 'unknown';\n private recorderLibVersion = libVersion;\n\n constructor(options?: recordOptions<eventWithTime>) {\n this.recordOptions = deepMerge(defaultRecordOptions, options ?? {});\n this.context = {\n pushEvent: (event) => this.events.push(event),\n };\n }\n\n private handleEmit(event: RecorderEvent) {\n if (event.type === 0 || event.type === 1) {\n return;\n }\n const rrEvent: RecorderEvent = {\n ...event,\n };\n this.context.pushEvent(rrEvent);\n }\n\n public inject(win: Window) {\n const w = win as WindowWithRRWeb;\n\n this.targetWindow = win;\n\n if (w.rrweb) {\n this.recordFn = w.rrweb.record ?? null;\n return;\n }\n\n const script = win.document.createElement('script');\n script.type = 'text/javascript';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n script.innerHTML = rrSrc;\n win.document.head.appendChild(script);\n\n const recheck = (win as WindowWithRRWeb).rrweb;\n if (!recheck || !recheck.record) {\n console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);\n return;\n }\n\n this.recordFn = recheck.record;\n // console.debug(`[${Date.now()}] [recorder] Recorder loaded: `, this.recordFn.getVersion());\n this.recorderScriptVersion = this.recordFn.getVersion();\n }\n\n public start() {\n if (!this.targetWindow || !this.recordFn) {\n console.debug(`[${Date.now()}] [recorder] Not ready to start`);\n return;\n }\n\n if (this.stopFn) {\n console.debug(`[${Date.now()}] [recorder] Already recording`);\n return;\n }\n\n\n this.stopFn = this.recordFn({\n emit: (event: RecorderEvent) => this.handleEmit(event),\n plugins: [\n getRecordSequentialIdPlugin({\n key: 'id',\n getId: () => ++this.eventCounter,\n }),\n ],\n ...this.recordOptions\n });\n\n this.flush();\n }\n\n public stop() {\n this.flush();\n this.stopFn?.();\n this.stopFn = null;\n }\n\n public reset() {\n this.eventCounter = 0;\n this.events = [];\n this.stop();\n this.context = {\n pushEvent: (event) => this.events.push(event),\n };\n }\n\n public flush() {\n if (!this.recordFn) return;\n\n const stillPending: typeof this.pendingEvents = [];\n\n for (const evt of this.pendingEvents) {\n try {\n this.recordFn.addCustomEvent(evt.tag, evt.payload);\n } catch (err) {\n console.debug(`[${Date.now()}] [recorder] flush failed for custom event: ${evt.tag}`);\n stillPending.push(evt);\n }\n }\n\n this.pendingEvents = stillPending;\n }\n\n public addCustomEvent(tag: string, payload: Record<string, unknown>) {\n const event = { tag, payload };\n\n if (!this.recordFn || !this.stopFn) {\n console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${tag}`);\n this.pendingEvents.push(event);\n return;\n }\n\n try {\n this.recordFn.addCustomEvent(tag, payload);\n } catch (error) {\n console.debug(`[${Date.now()}] [recorder] error adding custom event: ${tag}`, error);\n this.pendingEvents.push(event);\n }\n }\n\n public isRecordingReady(): boolean {\n return !!this.recordFn && !!this.stopFn;\n }\n\n public isRecording(): boolean {\n return this.recordFn?.isRecording() || false;\n }\n\n public getScriptVersion(): string {\n return `@appsurify-testmap/rrweb-record:${this.recorderScriptVersion}`;\n }\n\n public getLibVersion(): string {\n return `@appsurify-testmap/rrweb:${this.recorderLibVersion}`;\n }\n\n public getEvents(): readonly RecorderEvent[] {\n return this.events;\n }\n\n public getMirror(): Mirror | undefined {\n return (this.recordFn as unknown as { mirror?: Mirror })?.mirror;\n }\n\n public bind(ctx: RecorderContext) {\n this.context = ctx;\n }\n\n public setEventCounter(value: number) {\n this.eventCounter = value;\n }\n\n}\n","import { RRWebRecorder } from './RRWebRecorder';\n\n\nexport default RRWebRecorder;\n","/// <reference types=\"cypress\" />\n\nimport {getCurrentTestContext, setCurrentTestContext} from '../runtime';\nimport {safeSerializeArray, buildSelector, getTestKey, mapTestRunContextToResult} from '../utils';\nimport RRWebRecorder from '../../recorder';\nimport defaultRecordOptions from '../../recorder';\nimport type {RecorderEvent} from '../../recorder/types';\nimport type {TestRunContext} from '../../types';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst testmapEnv = Cypress.env('testmap') ?? {};\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst recordingOpts = typeof testmapEnv === 'object' && 'recordingOpts' in testmapEnv\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ? testmapEnv.recordingOpts\n : defaultRecordOptions;\n// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\nconst recorder = new RRWebRecorder(recordingOpts);\n\nexport const registerCypressEventListeners = () => {\n\n Cypress\n .on('test:before:run', onTestBeforeRun)\n .on('log:added', onLogAdded)\n .on('log:changed', onLogChanged)\n .on('window:before:load', onWindowBeforeLoad)\n .on('window:before:unload', onWindowBeforeUnload)\n .on('window:unload', onWindowUnload)\n .on('window:load', onWindowLoad)\n .on('command:enqueued', onCommandEnqueued)\n .on('command:start', onCommandStart)\n .on('command:end', onCommandEnd)\n .on('command:retry', onCommandRetry)\n .on('skipped:command:end', onSkippedCommandEnd)\n .on('test:after:run', onTestAfterRun)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('command:failed', onCommandFailed)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('command:queue:end', onCommandQueueEnd)\n .on('fail', onFail);\n\n\n afterEach(() => {\n // console.debug(`[${Date.now()}] [cypress] afterEach:`);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // console.debug(`[${Date.now()}] [cypress] afterEach:`, ctx);\n ctx.recorderEvents.map((event) => {\n if (event.type !== 5 ) return event;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const liveCommand = ctx.commandLiveRefs.get(event.data.payload.id) as Cypress.CommandQueue;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // event.data.payload.element = element;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n event.data.payload.state = liveCommand?.state ?? 'unknown';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // event.data.payload.args = liveCommand?.get('args');\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-call\n event.data.payload.args = safeSerializeArray(liveCommand?.get('args'));\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.query = liveCommand?.get('query');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.timeout = liveCommand?.get('timeout');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.name = liveCommand?.get('name');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.type = liveCommand?.get('type');\n\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (liveCommand?.get('prev')) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.prev = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n state: liveCommand?.get('prev').state,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n name: liveCommand?.get('prev').get('name'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n args: safeSerializeArray(liveCommand?.get('prev').get('args')),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n type: liveCommand?.get('prev').get('type'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n query: liveCommand?.get('prev').get('query'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n id: liveCommand?.get('prev').get('id'),\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (liveCommand?.get('next')) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.next = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n state: liveCommand?.get('next').state,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n name: liveCommand?.get('next').get('name'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n args: safeSerializeArray(liveCommand?.get('next').get('args')),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n type: liveCommand?.get('next').get('type'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n query: liveCommand?.get('next').get('query'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n id: liveCommand?.get('next').get('id'),\n };\n }\n return event;\n })\n console.debug(`[${Date.now()}] [cypress] afterEach:`, ctx.recorderEvents);\n\n // const testRunResult: TestRunResult = {\n // spec: ctx.spec as unknown as SpecInfo,\n // test: prepareTest(ctx.test),\n // browser: ctx.browser as BrowserInfo,\n // recorderEvents: ctx.recorderEvents,\n // }\n\n const testRunResult = mapTestRunContextToResult(ctx);\n\n\n // const testRunResultSize = getSizeInBytes(testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:`, testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:size:`, formatBytes(testRunResultSize));\n // const debugReport = new UICoverageReport(testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:debugReport:`, debugReport.toJSON());\n\n try {\n cy.task('saveRRWebReport', {\n testRunResult\n }, { log: false });\n } catch (e) {\n console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`, e);\n }\n\n });\n\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // Cypress.Commands.overwrite('type', (originalFn, subject, text, options) => {\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // return originalFn(subject, text, options).then(() => {\n // if (Cypress.dom.isElement(subject[0])) {\n // const el = subject[0];\n // if (el) {\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // el.dispatchEvent(new Event('input', { bubbles: true }));\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // el.dispatchEvent(new Event('change', { bubbles: true }));\n // }\n // }\n // });\n // });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onTestBeforeRun = (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n // console.debug(`[${Date.now()}] [cypress] onTestBeforeRun`, attributes, test);\n const testKey = getTestKey(test);\n const testRunContext: TestRunContext = {\n runner: {\n source: 'cypress',\n type: Cypress.testingType,\n version: Cypress.version,\n platform: Cypress.platform,\n arch: Cypress.arch,\n recorder: {\n scriptVersion: recorder.getLibVersion() || 'unknown',\n libVersion: recorder.getLibVersion() || 'unknown'\n }\n\n },\n spec: Cypress.spec,\n test: test,\n browser: Cypress.browser,\n autWindow: null,\n waitForPaint: () => Promise.resolve(undefined),\n paintComplete: false,\n recorderEvents: [] as RecorderEvent[],\n commandLiveRefs: new Map<string, Cypress.CommandQueue>()\n };\n\n setCurrentTestContext(testKey, testRunContext);\n\n recorder.bind({\n pushEvent: (event) => {\n console.debug(`[${Date.now()}] [cypress] pushEvent`, event);\n testRunContext.recorderEvents.push(event)\n if (event.type === 5) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const liveCommand = testRunContext.commandLiveRefs.get(event.data.payload.id) as Cypress.CommandQueue;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n const subject = liveCommand?.get('subject')\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-argument\n const selector = subject?.selector ?? buildSelector(subject);\n\n const mirror = recorder.getMirror();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n const element = mirror?.getMeta(subject?.[0]);\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.element = {\n ...element,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n selector,\n childNodes: []\n };\n }\n },\n });\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogAdded = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`[${Date.now()}] [cypress] onLogAdded`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogChanged = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`[${Date.now()}] [cypress] onLogChanged`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowBeforeUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowBeforeUnload`, event);\n // try {\n // recorder.stop();\n // // eslint-disable-next-line @typescript-eslint/no-unused-vars\n // } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowUnload`, event);\n try {\n recorder.stop();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowBeforeLoad = (win: Cypress.AUTWindow) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowBeforeLoad`, win);\n recorder.inject(win);\n // recorder.start();\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n ctx.runner.recorder!.scriptVersion = recorder.getScriptVersion();\n ctx.autWindow = win;\n ctx.paintComplete = false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowLoad = (win: Cypress.AUTWindow) => {\n console.debug(`[${Date.now()}] [cypress] onWindowLoad`, win);\n // recorder.inject(win);\n // recorder.start();\n // console.debug(`[${Date.now()}] [cypress] onWindowLoad after start`, recorder.isRecording());\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n if (!ctx.autWindow) {\n ctx.autWindow = win;\n ctx.paintComplete = false;\n }\n\n ctx.waitForPaint = (value?: unknown): Promise<unknown> => {\n return new Promise<unknown>((resolve) => {\n const maxWaitMs = 5000;\n\n const captureAfterPaint = () => {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n resolve(value);\n });\n });\n };\n\n const safeResolve = (() => {\n let called = false;\n return () => {\n if (!called) {\n called = true;\n captureAfterPaint();\n }\n };\n })();\n\n if (['interactive', 'complete'].includes(win.document.readyState)) {\n safeResolve();\n } else {\n win.addEventListener('DOMContentLoaded', safeResolve, { once: true });\n win.addEventListener('load', safeResolve, { once: true });\n setTimeout(() => {\n console.warn('⏳ Timeout: forcing resolution');\n safeResolve();\n }, maxWaitMs);\n }\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/require-await\n void ctx.waitForPaint().then(async () => {\n ctx.paintComplete = true;\n recorder.inject(win);\n recorder.start();\n });\n // console.debug(`[${Date.now()}] [cypress] onWindowLoad after waitForPaint`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandEnqueued = (command: Cypress.EnqueuedCommandAttributes) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandEnqueued`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.id, command);\n\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandRetry = (command: Cypress.CommandQueue) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandRetry`, command);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandStart = (command: Cypress.CommandQueue) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandStart`, command);\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.attributes.id, command);\n\n // If need before state\n // recorder.addCustomEvent(`${command.attributes.name}`, {\n // id: command.attributes.id,\n // });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandEnd = (command: Cypress.CommandQueue) => {\n console.debug(`[${Date.now()}] [cypress] onCommandEnd`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n const waitWindowLoaded = async () => {\n if (!ctx.paintComplete && typeof ctx.waitForPaint === 'function') {\n await ctx.waitForPaint();\n ctx.paintComplete = true;\n }\n }\n void waitWindowLoaded();\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n // void waitWindowLoaded();\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandFailed = (command: Cypress.CommandQueue, err: unknown) => {\n console.debug(`[${Date.now()}] [cypress] onCommandFailed`, command);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onSkippedCommandEnd = (command: Cypress.CommandQueue) => {\n console.debug(`[${Date.now()}] [cypress] onSkippedCommandEnd`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.attributes.id, command);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandQueueEnd = () => {\n // console.debug(`[${Date.now()}] [cypress] onCommandQueueEnd`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onFail = (error: Cypress.CypressError, mocha: Mocha.Runnable) => {\n // console.debug(`[${Date.now()}] [cypress] onFail`, {error, mocha});\n throw error;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/require-await\nconst onTestAfterRun = async (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n console.debug(`[${Date.now()}] [cypress] onTestAfterRun`, attributes, test);\n recorder.stop();\n\n // const testKey = getTestKey(test);\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n //\n // console.debug(`[${Date.now()}] [cypress] onTestAfterRun`, ctx.recorderEvents);\n};\n\n\n","/// <reference types=\"cypress\" />\n\n\nexport const registerMochaEventListeners = () => {\n // ⚠️ Плохой стиль, отключает всю типизацию\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((Cypress as any).mocha.getRunner() as Mocha.Runner)\n .on('hook', onHook);\n};\n\nconst onHook = () => {\n // console.debug(`🟡 [${Date.now()}] [mocha] onHook:`);\n};\n\nexport const injectMochaHookFunctions = () => {\n\n beforeEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] beforeEach:`);\n });\n\n afterEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] afterEach:`);\n // const currentTest = Cypress.currentTest;\n // const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n //\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n // const serializedReport = serializeTestRunContextToJson(ctx);\n // console.log(`${Date.now()} [afterEach]`, currentTest, serializedReport);\n // cy.task('saveSnapshotReport', serializedReport)\n });\n\n};\n","import { registerCypressEventListeners } from \"./cypress\";\nimport { registerMochaEventListeners, injectMochaHookFunctions } from \"./mocha\";\n\nexport const enableTestmap = () => {\n registerCypressEventListeners();\n registerMochaEventListeners();\n injectMochaHookFunctions();\n};\n","import { enableTestmap } from './events';\n\nexport const initializeTestmap = () => {\n // if (isTestmap().Initialized) {\n // return;\n // }\n enableTestmap();\n}\n"],"mappings":"yaAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,uBAAAE,IAAA,eAAAC,EAAAH,ICGO,IAAMI,EAAe,IAAI,IAEzB,SAASC,EAAsBC,EAAaC,EAA2B,CAC5EH,EAAa,IAAIE,EAAKC,CAAG,CAC3B,CAEO,SAASC,EAAsBF,EAAyC,CAC7E,OAAOF,EAAa,IAAIE,CAAG,CAC7B,CCDO,SAASG,EAAmBC,EAAsD,CACvF,OAAOA,EACJ,OAAQC,GAGH,OAAOA,GAAU,UAAYA,IAAU,MAAQ,QAASA,GAAUA,EAAc,MAAQ,GACnF,GAKP,OAAOA,GAAU,UACjB,OAAOA,GAAU,UACjB,OAAOA,GAAU,WACjBA,IAAU,IAEb,CACL,CAEO,SAASC,EAAcC,EAAyD,CACrF,IAAMC,EAAKD,IAAU,CAAC,EACtB,GAAI,CAACC,EAAI,OAAO,KAEhB,IAAMC,EAAMD,EAAG,QAAQ,YAA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AS,KAAK,CAOlB,EC/fO,IAAMgD,EAA8B,IAAM,CAG7C,QAAgB,MAAM,UAAU,EAC7B,GAAG,OAAQC,EAAM,CACxB,EAEMA,GAAS,IAAM,CAErB,EAEaC,EAA2B,IAAM,CAE5C,WAAW,GAAI,IAAK,CAEpB,CAAC,EAED,UAAU,GAAI,IAAK,CAUnB,CAAC,CAEH,EC7BO,IAAMC,EAAgB,IAAM,CACjCC,EAA8B,EAC9BC,EAA4B,EAC5BC,EAAyB,CAC3B,ECLO,IAAMC,EAAoB,IAAM,CAInCC,EAAc,CAClB","names":["src_exports","__export","initializeTestmap","__toCommonJS","testContexts","setCurrentTestContext","key","ctx","getCurrentTestContext","safeSerializeArray","arr","value","buildSelector","subject","el","tag","id","classSelector","cls","getTestKey","test","prepareTestSuite","suite","safeInvocationDetails","safeInvocationDetails","details","mapTestRunContextToResult","ctx","mapSpec","mapBrowser","mapTest","spec","browser","test","prepareTestSuite","import_rrweb","import_rrweb_plugin_sequential_id_record","defaultRecordOptions","deepMerge","target","source","result","key","sourceValue","targetValue","RRWebRecorder","libVersion","options","event","rrEvent","win","w","script","rrweb_record_umd_cjs_default","recheck","stillPending","evt","tag","payload","error","ctx","value","recorder_default","RRWebRecorder","testmapEnv","recordingOpts","recorder_default","recorder","registerCypressEventListeners","onTestBeforeRun","onLogAdded","onLogChanged","onWindowBeforeLoad","onWindowBeforeUnload","onWindowUnload","onWindowLoad","onCommandEnqueued","onCommandStart","onCommandEnd","onCommandRetry","onSkippedCommandEnd","onTestAfterRun","onCommandFailed","onCommandQueueEnd","onFail","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","event","liveCommand","safeSerializeArray","testRunResult","mapTestRunContextToResult","e","attributes","test","testRunContext","setCurrentTestContext","subject","selector","buildSelector","element","log","win","value","resolve","captureAfterPaint","safeResolve","called","command","err","error","mocha","registerMochaEventListeners","onHook","injectMochaHookFunctions","enableTestmap","registerCypressEventListeners","registerMochaEventListeners","injectMochaHookFunctions","initializeTestmap","enableTestmap"]}
|
package/dist/index.mjs
CHANGED
|
@@ -12860,6 +12860,7 @@ class VisibilityManager {
|
|
|
12860
12860
|
__publicField(this, "mirror");
|
|
12861
12861
|
__publicField(this, "mutationCb");
|
|
12862
12862
|
__publicField(this, "rafId", null);
|
|
12863
|
+
__publicField(this, "intervalId", null);
|
|
12863
12864
|
__publicField(this, "rafThrottle");
|
|
12864
12865
|
__publicField(this, "lastFlushTime", 0);
|
|
12865
12866
|
__publicField(this, "elements", /* @__PURE__ */ new Set());
|
|
@@ -12892,7 +12893,7 @@ class VisibilityManager {
|
|
|
12892
12893
|
this.throttle = Number((_c = visibilitySampling == null ? void 0 : visibilitySampling.throttle) != null ? _c : 100);
|
|
12893
12894
|
this.threshold = Number((_d = visibilitySampling == null ? void 0 : visibilitySampling.threshold) != null ? _d : 0.5);
|
|
12894
12895
|
this.sensitivity = Number((_e = visibilitySampling == null ? void 0 : visibilitySampling.sensitivity) != null ? _e : 0.05);
|
|
12895
|
-
this.rafThrottle = Number((_f = visibilitySampling == null ? void 0 : visibilitySampling.rafThrottle) != null ? _f :
|
|
12896
|
+
this.rafThrottle = Number((_f = visibilitySampling == null ? void 0 : visibilitySampling.rafThrottle) != null ? _f : 50);
|
|
12896
12897
|
doc.querySelectorAll("*").forEach((el) => this.observe(el));
|
|
12897
12898
|
const mo = new MutationObserver((mutations) => {
|
|
12898
12899
|
mutations.forEach((m) => {
|
|
@@ -12915,14 +12916,25 @@ class VisibilityManager {
|
|
|
12915
12916
|
startPendingFlushLoop() {
|
|
12916
12917
|
if (this.disabled)
|
|
12917
12918
|
return;
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
this.lastFlushTime
|
|
12921
|
-
|
|
12922
|
-
|
|
12919
|
+
if (typeof requestAnimationFrame === "function") {
|
|
12920
|
+
const loop = (timestamp) => {
|
|
12921
|
+
if (timestamp - this.lastFlushTime >= this.rafThrottle) {
|
|
12922
|
+
this.lastFlushTime = timestamp;
|
|
12923
|
+
this.flushPendingVisibilityMutations();
|
|
12924
|
+
}
|
|
12925
|
+
this.rafId = requestAnimationFrame(loop);
|
|
12926
|
+
};
|
|
12923
12927
|
this.rafId = requestAnimationFrame(loop);
|
|
12924
|
-
}
|
|
12925
|
-
|
|
12928
|
+
} else {
|
|
12929
|
+
const loop = () => {
|
|
12930
|
+
const now = performance.now();
|
|
12931
|
+
if (now - this.lastFlushTime >= this.rafThrottle) {
|
|
12932
|
+
this.lastFlushTime = now;
|
|
12933
|
+
this.flushPendingVisibilityMutations();
|
|
12934
|
+
}
|
|
12935
|
+
};
|
|
12936
|
+
this.intervalId = setInterval(loop, this.rafThrottle);
|
|
12937
|
+
}
|
|
12926
12938
|
}
|
|
12927
12939
|
flushPendingVisibilityMutations() {
|
|
12928
12940
|
if (this.disabled)
|
|
@@ -12997,6 +13009,7 @@ class VisibilityManager {
|
|
|
12997
13009
|
}
|
|
12998
13010
|
unfreeze() {
|
|
12999
13011
|
this.frozen = false;
|
|
13012
|
+
this.flushPendingVisibilityMutations();
|
|
13000
13013
|
}
|
|
13001
13014
|
lock() {
|
|
13002
13015
|
this.locked = true;
|
|
@@ -13008,11 +13021,17 @@ class VisibilityManager {
|
|
|
13008
13021
|
this.elements.clear();
|
|
13009
13022
|
this.previousState.clear();
|
|
13010
13023
|
this.pending.clear();
|
|
13011
|
-
if (this.rafId)
|
|
13024
|
+
if (this.rafId) {
|
|
13012
13025
|
cancelAnimationFrame(this.rafId);
|
|
13026
|
+
this.rafId = null;
|
|
13027
|
+
}
|
|
13028
|
+
if (this.intervalId) {
|
|
13029
|
+
clearInterval(this.intervalId);
|
|
13030
|
+
this.intervalId = null;
|
|
13031
|
+
}
|
|
13013
13032
|
}
|
|
13014
13033
|
}
|
|
13015
|
-
const version$1 = "2.1.2-alpha.
|
|
13034
|
+
const version$1 = "2.1.2-alpha.5";
|
|
13016
13035
|
let wrappedEmit;
|
|
13017
13036
|
let takeFullSnapshot$1;
|
|
13018
13037
|
let canvasManager;
|
|
@@ -13637,5 +13656,5 @@ if (typeof module.exports == "object" && typeof exports == "object") {
|
|
|
13637
13656
|
return module.exports;
|
|
13638
13657
|
}))
|
|
13639
13658
|
//# sourceMappingURL=rrweb-record.umd.cjs.map
|
|
13640
|
-
`;var P={slimDOMOptions:"all",inlineStylesheet:!0,recordDOM:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,maskInputOptions:{password:!0},sampling:{mousemove:!1,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!1,TouchEnd:!1},scroll:100,media:100,input:"last",canvas:"all",visibility:{mode:"
|
|
13659
|
+
`;var P={slimDOMOptions:"all",inlineStylesheet:!0,recordDOM:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,maskInputOptions:{password:!0},sampling:{mousemove:!1,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!1,TouchEnd:!1},scroll:100,media:100,input:"last",canvas:"all",visibility:{mode:"none",debounce:50,threshold:.5,sensitivity:.05,rafThrottle:50}},flushCustomEvent:"after",recordAfter:"DOMContentLoaded",userTriggeredOnInput:!0};function x(e,t){let r={...e};for(let n in t){let s=t[n],o=e[n];s&&typeof s=="object"&&!Array.isArray(s)&&o&&typeof o=="object"&&!Array.isArray(o)?r[n]=x(o,s):s!==void 0&&(r[n]=s)}return r}var h=class{recordFn=null;stopFn=null;targetWindow=null;context;eventCounter=0;events=[];recordOptions;pendingEvents=[];recorderScriptVersion="unknown";recorderLibVersion=A;constructor(t){this.recordOptions=x(P,t??{}),this.context={pushEvent:r=>this.events.push(r)}}handleEmit(t){if(t.type===0||t.type===1)return;let r={...t};this.context.pushEvent(r)}inject(t){let r=t;if(this.targetWindow=t,r.rrweb){this.recordFn=r.rrweb.record??null;return}let n=t.document.createElement("script");n.type="text/javascript",n.innerHTML=S,t.document.head.appendChild(n);let s=t.rrweb;if(!s||!s.record){console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);return}this.recordFn=s.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:[O({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 r of this.pendingEvents)try{this.recordFn.addCustomEvent(r.tag,r.payload)}catch{console.debug(`[${Date.now()}] [recorder] flush failed for custom event: ${r.tag}`),t.push(r)}this.pendingEvents=t}addCustomEvent(t,r){let n={tag:t,payload:r};if(!this.recordFn||!this.stopFn){console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${t}`),this.pendingEvents.push(n);return}try{this.recordFn.addCustomEvent(t,r)}catch(s){console.debug(`[${Date.now()}] [recorder] error adding custom event: ${t}`,s),this.pendingEvents.push(n)}}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 f=h;var g=Cypress.env("testmap")??{},L=typeof g=="object"&&"recordingOpts"in g?g.recordingOpts:f,i=new f(L),$=()=>{Cypress.on("test:before:run",D).on("log:added",F).on("log:changed",U).on("window:before:load",B).on("window:before:unload",W).on("window:unload",z).on("window:load",j).on("command:enqueued",V).on("command:start",G).on("command:end",K).on("command:retry",H).on("skipped:command:end",Z).on("test:after:run",Q).on("command:failed",Y).on("command:queue:end",J).on("fail",q),afterEach(()=>{let e=Cypress.currentTest;if(!e)return;let t=a({titlePath:()=>e.titlePath}),r=l(t);if(!r)return;r.recorderEvents.map(s=>{if(s.type!==5)return s;let o=r.commandLiveRefs.get(s.data.payload.id);return s.data.payload.state=o?.state??"unknown",s.data.payload.args=p(o?.get("args")),s.data.payload.query=o?.get("query"),s.data.payload.timeout=o?.get("timeout"),s.data.payload.name=o?.get("name"),s.data.payload.type=o?.get("type"),o?.get("prev")&&(s.data.payload.prev={state:o?.get("prev").state,name:o?.get("prev").get("name"),args:p(o?.get("prev").get("args")),type:o?.get("prev").get("type"),query:o?.get("prev").get("query"),id:o?.get("prev").get("id")}),o?.get("next")&&(s.data.payload.next={state:o?.get("next").state,name:o?.get("next").get("name"),args:p(o?.get("next").get("args")),type:o?.get("next").get("type"),query:o?.get("next").get("query"),id:o?.get("next").get("id")}),s}),console.debug(`[${Date.now()}] [cypress] afterEach:`,r.recorderEvents);let n=k(r);try{cy.task("saveRRWebReport",{testRunResult:n},{log:!1})}catch(s){console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`,s)}})},D=(e,t)=>{let r=a(t),n={runner:{source:"cypress",type:Cypress.testingType,version:Cypress.version,platform:Cypress.platform,arch:Cypress.arch,recorder:{scriptVersion:i.getLibVersion()||"unknown",libVersion:i.getLibVersion()||"unknown"}},spec:Cypress.spec,test:t,browser:Cypress.browser,autWindow:null,waitForPaint:()=>Promise.resolve(void 0),paintComplete:!1,recorderEvents:[],commandLiveRefs:new Map};b(r,n),i.bind({pushEvent:s=>{if(console.debug(`[${Date.now()}] [cypress] pushEvent`,s),n.recorderEvents.push(s),s.type===5){let u=n.commandLiveRefs.get(s.data.payload.id)?.get("subject"),m=u?.selector??v(u),d=i.getMirror()?.getMeta(u?.[0]);s.data.payload.element={...d,selector:m,childNodes:[]}}}})},F=(e,t)=>{},U=(e,t)=>{},W=e=>{},z=e=>{try{i.stop()}catch{}},B=e=>{i.inject(e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&(n.runner.recorder.scriptVersion=i.getScriptVersion(),n.autWindow=e,n.paintComplete=!1)},j=e=>{console.debug(`[${Date.now()}] [cypress] onWindowLoad`,e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&(n.autWindow||(n.autWindow=e,n.paintComplete=!1),n.waitForPaint=s=>new Promise(o=>{let m=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{o(s)})})},c=(()=>{let d=!1;return()=>{d||(d=!0,m())}})();["interactive","complete"].includes(e.document.readyState)?c():(e.addEventListener("DOMContentLoaded",c,{once:!0}),e.addEventListener("load",c,{once:!0}),setTimeout(()=>{console.warn("\u23F3 Timeout: forcing resolution"),c()},5e3))}),n.waitForPaint().then(async()=>{n.paintComplete=!0,i.inject(e),i.start()}))},V=e=>{let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&n.commandLiveRefs.set(e.id,e)},H=e=>{},G=e=>{let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&n.commandLiveRefs.set(e.attributes.id,e)},K=e=>{console.debug(`[${Date.now()}] [cypress] onCommandEnd`,e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);if(!n)return;(async()=>{!n.paintComplete&&typeof n.waitForPaint=="function"&&(await n.waitForPaint(),n.paintComplete=!0)})(),i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id})},Y=(e,t)=>{console.debug(`[${Date.now()}] [cypress] onCommandFailed`,e),i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id})},Z=e=>{console.debug(`[${Date.now()}] [cypress] onSkippedCommandEnd`,e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&(n.commandLiveRefs.set(e.attributes.id,e),i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id}))},J=()=>{},q=(e,t)=>{throw e},Q=async(e,t)=>{console.debug(`[${Date.now()}] [cypress] onTestAfterRun`,e,t),i.stop()};var C=()=>{Cypress.mocha.getRunner().on("hook",X)},X=()=>{},I=()=>{beforeEach("",()=>{}),afterEach("",()=>{})};var E=()=>{$(),C(),I()};var ee=()=>{E()};export{ee as initializeTestmap};
|
|
13641
13660
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/browser/runtime.ts","../src/browser/utils.ts","../src/recorder/RRWebRecorder.ts","../src/recorder/index.ts","../src/browser/events/cypress.ts","../src/browser/events/mocha.ts","../src/browser/events/index.ts","../src/browser/index.ts"],"sourcesContent":["import type { TestRunContext } from '../types';\n\n\nexport const testContexts = new Map<string, TestRunContext>();\n\nexport function setCurrentTestContext(key: string, ctx: TestRunContext): void {\n testContexts.set(key, ctx);\n}\n\nexport function getCurrentTestContext(key: string): TestRunContext | undefined {\n return testContexts.get(key);\n}\n\nexport function clearTestContext(key: string): void {\n testContexts.delete(key);\n}\n\n\n","/// <reference types=\"cypress\" />\nimport type {\n TestSuiteInfo,\n TestInfo,\n TestInfoInvocationDetails,\n TestRunResult,\n TestRunContext, SpecInfo, BrowserInfo,\n} from '../types';\n\n\nexport function safeSerializeArray(arr: unknown[]): (string | number | boolean | null)[] {\n return arr\n .filter((value): value is string | number | boolean | null => {\n // Удаляем { log: false }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof value === 'object' && value !== null && 'log' in value && (value as any).log === false) {\n return false;\n }\n\n // Пропускаем только примитивы\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n value === null\n );\n });\n}\n\nexport function buildSelector(subject: JQuery<HTMLElement> | undefined): string | null {\n const el = subject?.[0];\n if (!el) return null;\n\n const tag = el.tagName.toLowerCase();\n const id = el.id ? `#${el.id}` : '';\n const classSelector = Array.from(el.classList)\n .map(cls => `.${cls}`)\n .join('');\n\n return `${tag}${id}${classSelector}`;\n}\n\nexport function getTestKey(test: Mocha.Test | { titlePath: () => string[] }): string {\n return test.titlePath().join(' > ');\n}\n\nexport function getSizeInBytes(data: unknown): number {\n let str: string;\n\n if (typeof data === 'string') {\n str = data;\n } else {\n try {\n str = JSON.stringify(data);\n } catch {\n return 0;\n }\n }\n\n return new TextEncoder().encode(str).length;\n}\n\nexport function formatBytes(bytes: number): string {\n const kb = bytes / 1024;\n const mb = kb / 1024;\n\n if (mb >= 1) return `${mb.toFixed(2)} MB`;\n if (kb >= 1) return `${kb.toFixed(2)} KB`;\n return `${bytes} B`;\n}\n\nexport async function createHash(data: object): Promise<string> {\n const json = JSON.stringify(data);\n const buffer = new TextEncoder().encode(json);\n const hashBuffer = await crypto.subtle.digest('SHA-256', buffer);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n}\n\n\nexport function prepareTestSuite(suite: Mocha.Suite & {id: string, type: string} | undefined): TestSuiteInfo | undefined {\n if (!suite) return undefined;\n\n\n return {\n id: suite.id,\n file: suite.file,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(suite.invocationDetails),\n pending: suite.pending,\n root: suite.root,\n title: suite.title,\n type: suite.type,\n }\n}\n\nexport function prepareTest(test: Mocha.Test & {id: string, type: string, parent: Mocha.Suite | undefined}): TestInfo {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const suite = prepareTestSuite(test.parent);\n console.log(\"Suite\", suite);\n return {\n suite: suite,\n file: test.file,\n duration: test.duration,\n id: test.id,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending,\n state: test.state,\n sync: test.sync,\n timedOut: test.timedOut,\n title: test.title,\n titlePath: test.titlePath(),\n fullTitle: test.fullTitle(),\n type: test.type,\n }\n}\n\nexport function safeInvocationDetails(details?: Partial<TestInfoInvocationDetails>): TestInfoInvocationDetails {\n return {\n absoluteFile: details?.absoluteFile ?? '',\n column: details?.column ?? 0,\n fileUrl: details?.fileUrl ?? '',\n function: details?.function ?? '',\n line: details?.line ?? 0,\n originalFile: details?.originalFile ?? '',\n relativeFile: details?.relativeFile ?? '',\n };\n}\n\n\nexport function mapTestRunContextToResult(ctx: TestRunContext): TestRunResult {\n\n return {\n runner: ctx.runner,\n spec: mapSpec(ctx.spec),\n browser: mapBrowser(ctx.browser),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n test: mapTest(ctx.test),\n recorderEvents: Array.isArray(ctx.recorderEvents) ? ctx.recorderEvents : [],\n };\n}\n\nexport function mapSpec(spec: Cypress.Spec): SpecInfo {\n return {\n name: spec.name ?? '',\n absolute: spec.absolute ?? '',\n relative: spec.relative ?? '',\n specFilter: spec.specFilter ?? '',\n specType: spec.specType ?? 'integration',\n baseName: spec.baseName ?? '',\n fileExtension: spec.fileExtension ?? '',\n fileName: spec.fileName ?? '',\n id: spec.id ?? '',\n };\n}\n\nexport function mapBrowser(browser: Cypress.Browser): BrowserInfo {\n return {\n name: browser.name ?? '',\n version: browser.version ?? '',\n displayName: browser.displayName ?? '',\n family: browser.family ?? '',\n majorVersion: browser.majorVersion ?? '',\n channel: browser.channel ?? '',\n path: browser.path ?? '',\n };\n}\n\nexport function mapTest(test: Mocha.Test & {id: string}): TestInfo {\n\n\n return {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n suite: prepareTestSuite(test.parent),\n file: test.file ?? '',\n duration: test.duration ?? 0,\n id: test.id ?? '',\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending ?? false,\n state: test.state ?? 'unknown',\n sync: test.sync ?? false,\n timedOut: test.timedOut ?? false,\n title: test.title ?? '',\n titlePath: typeof test.titlePath === 'function' ? test.titlePath() : [],\n fullTitle: typeof test.fullTitle === 'function' ? test.fullTitle() : '',\n type: test.type ?? 'test',\n };\n}\n","import type { record, recordOptions } from '@appsurify-testmap/rrweb';\nimport { version as libVersion, utils } from '@appsurify-testmap/rrweb';\nimport type { Mirror } from '@appsurify-testmap/rrweb-snapshot';\nimport { getRecordSequentialIdPlugin } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport rrSrc from './releases/rrweb-record.umd.cjs.src';\n\nimport type { RecorderContext, Recorder, RecorderEvent } from './types';\nimport { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\n\ninterface WindowWithRRWeb extends Window {\n rrweb?: {\n record: typeof record | null;\n };\n}\n\nexport const defaultRecordOptions: recordOptions<eventWithTime> = {\n slimDOMOptions: 'all',\n inlineStylesheet: true,\n recordDOM: true,\n recordCanvas: true,\n collectFonts: true,\n inlineImages: true,\n // checkoutEveryNvm: 10,\n // excludeAttribute: /data-(cy|test(id)?|cypress|highlight-el|cypress-el)/i,\n maskInputOptions: { password: true },\n sampling: {\n mousemove: false,\n mouseInteraction: {\n MouseUp: false,\n MouseDown: false,\n Click: true,\n ContextMenu: true,\n DblClick: true,\n Focus: true,\n Blur: true,\n TouchStart: false,\n TouchEnd: false,\n },\n scroll: 100,\n media: 100,\n input: 'last',\n canvas: 'all',\n visibility: {\n mode: 'debounce',\n debounce: 50,\n threshold: 0.5,\n sensitivity: 0.05,\n rafThrottle: 50\n }\n },\n flushCustomEvent: 'after',\n // recordAfter: 'DOMContentStabilized',\n recordAfter: 'DOMContentLoaded',\n userTriggeredOnInput: true,\n}\n\nfunction deepMerge<T>(target: T, source: Partial<T>): T {\n const result = { ...target };\n\n for (const key in source) {\n const sourceValue = source[key];\n const targetValue = target[key];\n\n if (\n sourceValue &&\n typeof sourceValue === 'object' &&\n !Array.isArray(sourceValue) &&\n targetValue &&\n typeof targetValue === 'object' &&\n !Array.isArray(targetValue)\n ) {\n result[key] = deepMerge(targetValue, sourceValue);\n } else if (sourceValue !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n result[key] = sourceValue as any;\n }\n }\n\n return result;\n}\n\nexport class RRWebRecorder implements Recorder {\n private recordFn: typeof record | null = null;\n private stopFn: (() => void) | undefined | null = null;\n private targetWindow: Window | null = null;\n private context: RecorderContext;\n private eventCounter = 0;\n private events: RecorderEvent[] = [];\n private recordOptions?: recordOptions<eventWithTime>;\n private pendingEvents: {\n tag: string;\n payload: Record<string, unknown>;\n }[] = [];\n private recorderScriptVersion = 'unknown';\n private recorderLibVersion = libVersion;\n\n constructor(options?: recordOptions<eventWithTime>) {\n this.recordOptions = deepMerge(defaultRecordOptions, options ?? {});\n this.context = {\n pushEvent: (event) => this.events.push(event),\n };\n }\n\n private handleEmit(event: RecorderEvent) {\n if (event.type === 0 || event.type === 1) {\n return;\n }\n const rrEvent: RecorderEvent = {\n ...event,\n };\n this.context.pushEvent(rrEvent);\n }\n\n public inject(win: Window) {\n const w = win as WindowWithRRWeb;\n\n this.targetWindow = win;\n\n if (w.rrweb) {\n this.recordFn = w.rrweb.record ?? null;\n return;\n }\n\n const script = win.document.createElement('script');\n script.type = 'text/javascript';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n script.innerHTML = rrSrc;\n win.document.head.appendChild(script);\n\n const recheck = (win as WindowWithRRWeb).rrweb;\n if (!recheck || !recheck.record) {\n console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);\n return;\n }\n\n this.recordFn = recheck.record;\n // console.debug(`[${Date.now()}] [recorder] Recorder loaded: `, this.recordFn.getVersion());\n this.recorderScriptVersion = this.recordFn.getVersion();\n }\n\n public start() {\n if (!this.targetWindow || !this.recordFn) {\n console.debug(`[${Date.now()}] [recorder] Not ready to start`);\n return;\n }\n\n if (this.stopFn) {\n console.debug(`[${Date.now()}] [recorder] Already recording`);\n return;\n }\n\n\n this.stopFn = this.recordFn({\n emit: (event: RecorderEvent) => this.handleEmit(event),\n plugins: [\n getRecordSequentialIdPlugin({\n key: 'id',\n getId: () => ++this.eventCounter,\n }),\n ],\n ...this.recordOptions\n });\n\n this.flush();\n }\n\n public stop() {\n this.flush();\n this.stopFn?.();\n this.stopFn = null;\n }\n\n public reset() {\n this.eventCounter = 0;\n this.events = [];\n this.stop();\n this.context = {\n pushEvent: (event) => this.events.push(event),\n };\n }\n\n public flush() {\n if (!this.recordFn) return;\n\n const stillPending: typeof this.pendingEvents = [];\n\n for (const evt of this.pendingEvents) {\n try {\n this.recordFn.addCustomEvent(evt.tag, evt.payload);\n } catch (err) {\n console.debug(`[${Date.now()}] [recorder] flush failed for custom event: ${evt.tag}`);\n stillPending.push(evt);\n }\n }\n\n this.pendingEvents = stillPending;\n }\n\n public addCustomEvent(tag: string, payload: Record<string, unknown>) {\n const event = { tag, payload };\n\n if (!this.recordFn || !this.stopFn) {\n console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${tag}`);\n this.pendingEvents.push(event);\n return;\n }\n\n try {\n this.recordFn.addCustomEvent(tag, payload);\n } catch (error) {\n console.debug(`[${Date.now()}] [recorder] error adding custom event: ${tag}`, error);\n this.pendingEvents.push(event);\n }\n }\n\n public isRecordingReady(): boolean {\n return !!this.recordFn && !!this.stopFn;\n }\n\n public isRecording(): boolean {\n return this.recordFn?.isRecording() || false;\n }\n\n public getScriptVersion(): string {\n return `@appsurify-testmap/rrweb-record:${this.recorderScriptVersion}`;\n }\n\n public getLibVersion(): string {\n return `@appsurify-testmap/rrweb:${this.recorderLibVersion}`;\n }\n\n public getEvents(): readonly RecorderEvent[] {\n return this.events;\n }\n\n public getMirror(): Mirror | undefined {\n return (this.recordFn as unknown as { mirror?: Mirror })?.mirror;\n }\n\n public bind(ctx: RecorderContext) {\n this.context = ctx;\n }\n\n public setEventCounter(value: number) {\n this.eventCounter = value;\n }\n\n}\n","import { RRWebRecorder } from './RRWebRecorder';\n\n\nexport default RRWebRecorder;\n","/// <reference types=\"cypress\" />\n\nimport {getCurrentTestContext, setCurrentTestContext} from '../runtime';\nimport {safeSerializeArray, buildSelector, getTestKey, mapTestRunContextToResult} from '../utils';\nimport RRWebRecorder from '../../recorder';\nimport defaultRecordOptions from '../../recorder';\nimport type {RecorderEvent} from '../../recorder/types';\nimport type {TestRunContext} from '../../types';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst testmapEnv = Cypress.env('testmap') ?? {};\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst recordingOpts = typeof testmapEnv === 'object' && 'recordingOpts' in testmapEnv\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ? testmapEnv.recordingOpts\n : defaultRecordOptions;\n// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\nconst recorder = new RRWebRecorder(recordingOpts);\n\nexport const registerCypressEventListeners = () => {\n\n Cypress\n .on('test:before:run', onTestBeforeRun)\n .on('log:added', onLogAdded)\n .on('log:changed', onLogChanged)\n .on('window:before:load', onWindowBeforeLoad)\n .on('window:before:unload', onWindowBeforeUnload)\n .on('window:unload', onWindowUnload)\n .on('window:load', onWindowLoad)\n .on('command:enqueued', onCommandEnqueued)\n .on('command:start', onCommandStart)\n .on('command:end', onCommandEnd)\n .on('command:retry', onCommandRetry)\n .on('skipped:command:end', onSkippedCommandEnd)\n .on('test:after:run', onTestAfterRun)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('command:failed', onCommandFailed)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('command:queue:end', onCommandQueueEnd)\n .on('fail', onFail);\n\n\n afterEach(() => {\n // console.debug(`[${Date.now()}] [cypress] afterEach:`);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // console.debug(`[${Date.now()}] [cypress] afterEach:`, ctx);\n ctx.recorderEvents.map((event) => {\n if (event.type !== 5 ) return event;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const liveCommand = ctx.commandLiveRefs.get(event.data.payload.id) as Cypress.CommandQueue;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // event.data.payload.element = element;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n event.data.payload.state = liveCommand?.state ?? 'unknown';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // event.data.payload.args = liveCommand?.get('args');\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-call\n event.data.payload.args = safeSerializeArray(liveCommand?.get('args'));\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.query = liveCommand?.get('query');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.timeout = liveCommand?.get('timeout');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.name = liveCommand?.get('name');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.type = liveCommand?.get('type');\n\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (liveCommand?.get('prev')) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.prev = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n state: liveCommand?.get('prev').state,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n name: liveCommand?.get('prev').get('name'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n args: safeSerializeArray(liveCommand?.get('prev').get('args')),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n type: liveCommand?.get('prev').get('type'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n query: liveCommand?.get('prev').get('query'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n id: liveCommand?.get('prev').get('id'),\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (liveCommand?.get('next')) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.next = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n state: liveCommand?.get('next').state,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n name: liveCommand?.get('next').get('name'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n args: safeSerializeArray(liveCommand?.get('next').get('args')),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n type: liveCommand?.get('next').get('type'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n query: liveCommand?.get('next').get('query'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n id: liveCommand?.get('next').get('id'),\n };\n }\n return event;\n })\n console.debug(`[${Date.now()}] [cypress] afterEach:`, ctx.recorderEvents);\n\n // const testRunResult: TestRunResult = {\n // spec: ctx.spec as unknown as SpecInfo,\n // test: prepareTest(ctx.test),\n // browser: ctx.browser as BrowserInfo,\n // recorderEvents: ctx.recorderEvents,\n // }\n\n const testRunResult = mapTestRunContextToResult(ctx);\n\n\n // const testRunResultSize = getSizeInBytes(testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:`, testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:size:`, formatBytes(testRunResultSize));\n // const debugReport = new UICoverageReport(testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:debugReport:`, debugReport.toJSON());\n\n try {\n cy.task('saveRRWebReport', {\n testRunResult\n }, { log: false });\n } catch (e) {\n console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`, e);\n }\n\n });\n\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // Cypress.Commands.overwrite('type', (originalFn, subject, text, options) => {\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // return originalFn(subject, text, options).then(() => {\n // if (Cypress.dom.isElement(subject[0])) {\n // const el = subject[0];\n // if (el) {\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // el.dispatchEvent(new Event('input', { bubbles: true }));\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // el.dispatchEvent(new Event('change', { bubbles: true }));\n // }\n // }\n // });\n // });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onTestBeforeRun = (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n // console.debug(`[${Date.now()}] [cypress] onTestBeforeRun`, attributes, test);\n const testKey = getTestKey(test);\n const testRunContext: TestRunContext = {\n runner: {\n source: 'cypress',\n type: Cypress.testingType,\n version: Cypress.version,\n platform: Cypress.platform,\n arch: Cypress.arch,\n recorder: {\n scriptVersion: recorder.getLibVersion() || 'unknown',\n libVersion: recorder.getLibVersion() || 'unknown'\n }\n\n },\n spec: Cypress.spec,\n test: test,\n browser: Cypress.browser,\n autWindow: null,\n waitForPaint: () => Promise.resolve(undefined),\n paintComplete: false,\n recorderEvents: [] as RecorderEvent[],\n commandLiveRefs: new Map<string, Cypress.CommandQueue>()\n };\n\n setCurrentTestContext(testKey, testRunContext);\n\n recorder.bind({\n pushEvent: (event) => {\n console.debug(`[${Date.now()}] [cypress] pushEvent`, event);\n testRunContext.recorderEvents.push(event)\n if (event.type === 5) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const liveCommand = testRunContext.commandLiveRefs.get(event.data.payload.id) as Cypress.CommandQueue;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n const subject = liveCommand?.get('subject')\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-argument\n const selector = subject?.selector ?? buildSelector(subject);\n\n const mirror = recorder.getMirror();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n const element = mirror?.getMeta(subject?.[0]);\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.element = {\n ...element,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n selector,\n childNodes: []\n };\n }\n },\n });\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogAdded = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`[${Date.now()}] [cypress] onLogAdded`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogChanged = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`[${Date.now()}] [cypress] onLogChanged`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowBeforeUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowBeforeUnload`, event);\n // try {\n // recorder.stop();\n // // eslint-disable-next-line @typescript-eslint/no-unused-vars\n // } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowUnload`, event);\n try {\n recorder.stop();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowBeforeLoad = (win: Cypress.AUTWindow) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowBeforeLoad`, win);\n recorder.inject(win);\n // recorder.start();\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n ctx.runner.recorder!.scriptVersion = recorder.getScriptVersion();\n ctx.autWindow = win;\n ctx.paintComplete = false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowLoad = (win: Cypress.AUTWindow) => {\n console.debug(`[${Date.now()}] [cypress] onWindowLoad`, win);\n // recorder.inject(win);\n // recorder.start();\n // console.debug(`[${Date.now()}] [cypress] onWindowLoad after start`, recorder.isRecording());\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n if (!ctx.autWindow) {\n ctx.autWindow = win;\n ctx.paintComplete = false;\n }\n\n ctx.waitForPaint = (value?: unknown): Promise<unknown> => {\n return new Promise<unknown>((resolve) => {\n const maxWaitMs = 5000;\n\n const captureAfterPaint = () => {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n resolve(value);\n });\n });\n };\n\n const safeResolve = (() => {\n let called = false;\n return () => {\n if (!called) {\n called = true;\n captureAfterPaint();\n }\n };\n })();\n\n if (['interactive', 'complete'].includes(win.document.readyState)) {\n safeResolve();\n } else {\n win.addEventListener('DOMContentLoaded', safeResolve, { once: true });\n win.addEventListener('load', safeResolve, { once: true });\n setTimeout(() => {\n console.warn('⏳ Timeout: forcing resolution');\n safeResolve();\n }, maxWaitMs);\n }\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/require-await\n void ctx.waitForPaint().then(async () => {\n ctx.paintComplete = true;\n recorder.inject(win);\n recorder.start();\n });\n // console.debug(`[${Date.now()}] [cypress] onWindowLoad after waitForPaint`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandEnqueued = (command: Cypress.EnqueuedCommandAttributes) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandEnqueued`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.id, command);\n\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandRetry = (command: Cypress.CommandQueue) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandRetry`, command);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandStart = (command: Cypress.CommandQueue) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandStart`, command);\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.attributes.id, command);\n\n // If need before state\n // recorder.addCustomEvent(`${command.attributes.name}`, {\n // id: command.attributes.id,\n // });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandEnd = (command: Cypress.CommandQueue) => {\n console.debug(`[${Date.now()}] [cypress] onCommandEnd`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n const waitWindowLoaded = async () => {\n if (!ctx.paintComplete && typeof ctx.waitForPaint === 'function') {\n await ctx.waitForPaint();\n ctx.paintComplete = true;\n }\n }\n void waitWindowLoaded();\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n // void waitWindowLoaded();\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandFailed = (command: Cypress.CommandQueue, err: unknown) => {\n console.debug(`[${Date.now()}] [cypress] onCommandFailed`, command);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onSkippedCommandEnd = (command: Cypress.CommandQueue) => {\n console.debug(`[${Date.now()}] [cypress] onSkippedCommandEnd`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.attributes.id, command);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandQueueEnd = () => {\n // console.debug(`[${Date.now()}] [cypress] onCommandQueueEnd`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onFail = (error: Cypress.CypressError, mocha: Mocha.Runnable) => {\n // console.debug(`[${Date.now()}] [cypress] onFail`, {error, mocha});\n throw error;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/require-await\nconst onTestAfterRun = async (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n console.debug(`[${Date.now()}] [cypress] onTestAfterRun`, attributes, test);\n recorder.stop();\n\n // const testKey = getTestKey(test);\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n //\n // console.debug(`[${Date.now()}] [cypress] onTestAfterRun`, ctx.recorderEvents);\n};\n\n\n","/// <reference types=\"cypress\" />\n\n\nexport const registerMochaEventListeners = () => {\n // ⚠️ Плохой стиль, отключает всю типизацию\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((Cypress as any).mocha.getRunner() as Mocha.Runner)\n .on('hook', onHook);\n};\n\nconst onHook = () => {\n // console.debug(`🟡 [${Date.now()}] [mocha] onHook:`);\n};\n\nexport const injectMochaHookFunctions = () => {\n\n beforeEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] beforeEach:`);\n });\n\n afterEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] afterEach:`);\n // const currentTest = Cypress.currentTest;\n // const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n //\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n // const serializedReport = serializeTestRunContextToJson(ctx);\n // console.log(`${Date.now()} [afterEach]`, currentTest, serializedReport);\n // cy.task('saveSnapshotReport', serializedReport)\n });\n\n};\n","import { registerCypressEventListeners } from \"./cypress\";\nimport { registerMochaEventListeners, injectMochaHookFunctions } from \"./mocha\";\n\nexport const enableTestmap = () => {\n registerCypressEventListeners();\n registerMochaEventListeners();\n injectMochaHookFunctions();\n};\n","import { enableTestmap } from './events';\n\nexport const initializeTestmap = () => {\n // if (isTestmap().Initialized) {\n // return;\n // }\n enableTestmap();\n}\n"],"mappings":"AAGO,IAAMA,EAAe,IAAI,IAEzB,SAASC,EAAsBC,EAAaC,EAA2B,CAC5EH,EAAa,IAAIE,EAAKC,CAAG,CAC3B,CAEO,SAASC,EAAsBF,EAAyC,CAC7E,OAAOF,EAAa,IAAIE,CAAG,CAC7B,CCDO,SAASG,EAAmBC,EAAsD,CACvF,OAAOA,EACJ,OAAQC,GAGH,OAAOA,GAAU,UAAYA,IAAU,MAAQ,QAASA,GAAUA,EAAc,MAAQ,GACnF,GAKP,OAAOA,GAAU,UACjB,OAAOA,GAAU,UACjB,OAAOA,GAAU,WACjBA,IAAU,IAEb,CACL,CAEO,SAASC,EAAcC,EAAyD,CACrF,IAAMC,EAAKD,IAAU,CAAC,EACtB,GAAI,CAACC,EAAI,OAAO,KAEhB,IAAMC,EAAMD,EAAG,QAAQ,YAAY,EAC7BE,EAAKF,EAAG,GAAK,IAAIA,EAAG,KAAO,GAC3BG,EAAgB,MAAM,KAAKH,EAAG,SAA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AM,CACxB,EAEMA,EAAS,IAAM,CAErB,EAEaC,EAA2B,IAAM,CAE5C,WAAW,GAAI,IAAK,CAEpB,CAAC,EAED,UAAU,GAAI,IAAK,CAUnB,CAAC,CAEH,EC7BO,IAAMC,EAAgB,IAAM,CACjCC,EAA8B,EAC9BC,EAA4B,EAC5BC,EAAyB,CAC3B,ECLO,IAAMC,GAAoB,IAAM,CAInCC,EAAc,CAClB","names":["testContexts","setCurrentTestContext","key","ctx","getCurrentTestContext","safeSerializeArray","arr","value","buildSelector","subject","el","tag","id","classSelector","cls","getTestKey","test","prepareTestSuite","suite","safeInvocationDetails","safeInvocationDetails","details","mapTestRunContextToResult","ctx","mapSpec","mapBrowser","mapTest","spec","browser","test","prepareTestSuite","libVersion","getRecordSequentialIdPlugin","defaultRecordOptions","deepMerge","target","source","result","key","sourceValue","targetValue","RRWebRecorder","libVersion","options","event","rrEvent","win","w","script","rrweb_record_umd_cjs_default","recheck","getRecordSequentialIdPlugin","stillPending","evt","tag","payload","error","ctx","value","recorder_default","RRWebRecorder","testmapEnv","recordingOpts","recorder_default","recorder","registerCypressEventListeners","onTestBeforeRun","onLogAdded","onLogChanged","onWindowBeforeLoad","onWindowBeforeUnload","onWindowUnload","onWindowLoad","onCommandEnqueued","onCommandStart","onCommandEnd","onCommandRetry","onSkippedCommandEnd","onTestAfterRun","onCommandFailed","onCommandQueueEnd","onFail","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","event","liveCommand","safeSerializeArray","testRunResult","mapTestRunContextToResult","e","attributes","test","testRunContext","setCurrentTestContext","subject","selector","buildSelector","element","log","win","value","resolve","captureAfterPaint","safeResolve","called","command","err","error","mocha","registerMochaEventListeners","onHook","injectMochaHookFunctions","enableTestmap","registerCypressEventListeners","registerMochaEventListeners","injectMochaHookFunctions","initializeTestmap","enableTestmap"]}
|
|
1
|
+
{"version":3,"sources":["../src/browser/runtime.ts","../src/browser/utils.ts","../src/recorder/RRWebRecorder.ts","../src/recorder/index.ts","../src/browser/events/cypress.ts","../src/browser/events/mocha.ts","../src/browser/events/index.ts","../src/browser/index.ts"],"sourcesContent":["import type { TestRunContext } from '../types';\n\n\nexport const testContexts = new Map<string, TestRunContext>();\n\nexport function setCurrentTestContext(key: string, ctx: TestRunContext): void {\n testContexts.set(key, ctx);\n}\n\nexport function getCurrentTestContext(key: string): TestRunContext | undefined {\n return testContexts.get(key);\n}\n\nexport function clearTestContext(key: string): void {\n testContexts.delete(key);\n}\n\n\n","/// <reference types=\"cypress\" />\nimport type {\n TestSuiteInfo,\n TestInfo,\n TestInfoInvocationDetails,\n TestRunResult,\n TestRunContext, SpecInfo, BrowserInfo,\n} from '../types';\n\n\nexport function safeSerializeArray(arr: unknown[]): (string | number | boolean | null)[] {\n return arr\n .filter((value): value is string | number | boolean | null => {\n // Удаляем { log: false }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof value === 'object' && value !== null && 'log' in value && (value as any).log === false) {\n return false;\n }\n\n // Пропускаем только примитивы\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n value === null\n );\n });\n}\n\nexport function buildSelector(subject: JQuery<HTMLElement> | undefined): string | null {\n const el = subject?.[0];\n if (!el) return null;\n\n const tag = el.tagName.toLowerCase();\n const id = el.id ? `#${el.id}` : '';\n const classSelector = Array.from(el.classList)\n .map(cls => `.${cls}`)\n .join('');\n\n return `${tag}${id}${classSelector}`;\n}\n\nexport function getTestKey(test: Mocha.Test | { titlePath: () => string[] }): string {\n return test.titlePath().join(' > ');\n}\n\nexport function getSizeInBytes(data: unknown): number {\n let str: string;\n\n if (typeof data === 'string') {\n str = data;\n } else {\n try {\n str = JSON.stringify(data);\n } catch {\n return 0;\n }\n }\n\n return new TextEncoder().encode(str).length;\n}\n\nexport function formatBytes(bytes: number): string {\n const kb = bytes / 1024;\n const mb = kb / 1024;\n\n if (mb >= 1) return `${mb.toFixed(2)} MB`;\n if (kb >= 1) return `${kb.toFixed(2)} KB`;\n return `${bytes} B`;\n}\n\nexport async function createHash(data: object): Promise<string> {\n const json = JSON.stringify(data);\n const buffer = new TextEncoder().encode(json);\n const hashBuffer = await crypto.subtle.digest('SHA-256', buffer);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n}\n\n\nexport function prepareTestSuite(suite: Mocha.Suite & {id: string, type: string} | undefined): TestSuiteInfo | undefined {\n if (!suite) return undefined;\n\n\n return {\n id: suite.id,\n file: suite.file,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(suite.invocationDetails),\n pending: suite.pending,\n root: suite.root,\n title: suite.title,\n type: suite.type,\n }\n}\n\nexport function prepareTest(test: Mocha.Test & {id: string, type: string, parent: Mocha.Suite | undefined}): TestInfo {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const suite = prepareTestSuite(test.parent);\n console.log(\"Suite\", suite);\n return {\n suite: suite,\n file: test.file,\n duration: test.duration,\n id: test.id,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending,\n state: test.state,\n sync: test.sync,\n timedOut: test.timedOut,\n title: test.title,\n titlePath: test.titlePath(),\n fullTitle: test.fullTitle(),\n type: test.type,\n }\n}\n\nexport function safeInvocationDetails(details?: Partial<TestInfoInvocationDetails>): TestInfoInvocationDetails {\n return {\n absoluteFile: details?.absoluteFile ?? '',\n column: details?.column ?? 0,\n fileUrl: details?.fileUrl ?? '',\n function: details?.function ?? '',\n line: details?.line ?? 0,\n originalFile: details?.originalFile ?? '',\n relativeFile: details?.relativeFile ?? '',\n };\n}\n\n\nexport function mapTestRunContextToResult(ctx: TestRunContext): TestRunResult {\n\n return {\n runner: ctx.runner,\n spec: mapSpec(ctx.spec),\n browser: mapBrowser(ctx.browser),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n test: mapTest(ctx.test),\n recorderEvents: Array.isArray(ctx.recorderEvents) ? ctx.recorderEvents : [],\n };\n}\n\nexport function mapSpec(spec: Cypress.Spec): SpecInfo {\n return {\n name: spec.name ?? '',\n absolute: spec.absolute ?? '',\n relative: spec.relative ?? '',\n specFilter: spec.specFilter ?? '',\n specType: spec.specType ?? 'integration',\n baseName: spec.baseName ?? '',\n fileExtension: spec.fileExtension ?? '',\n fileName: spec.fileName ?? '',\n id: spec.id ?? '',\n };\n}\n\nexport function mapBrowser(browser: Cypress.Browser): BrowserInfo {\n return {\n name: browser.name ?? '',\n version: browser.version ?? '',\n displayName: browser.displayName ?? '',\n family: browser.family ?? '',\n majorVersion: browser.majorVersion ?? '',\n channel: browser.channel ?? '',\n path: browser.path ?? '',\n };\n}\n\nexport function mapTest(test: Mocha.Test & {id: string}): TestInfo {\n\n\n return {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n suite: prepareTestSuite(test.parent),\n file: test.file ?? '',\n duration: test.duration ?? 0,\n id: test.id ?? '',\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending ?? false,\n state: test.state ?? 'unknown',\n sync: test.sync ?? false,\n timedOut: test.timedOut ?? false,\n title: test.title ?? '',\n titlePath: typeof test.titlePath === 'function' ? test.titlePath() : [],\n fullTitle: typeof test.fullTitle === 'function' ? test.fullTitle() : '',\n type: test.type ?? 'test',\n };\n}\n","import type { record, recordOptions } from '@appsurify-testmap/rrweb';\nimport { version as libVersion, utils } from '@appsurify-testmap/rrweb';\nimport type { Mirror } from '@appsurify-testmap/rrweb-snapshot';\nimport { getRecordSequentialIdPlugin } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport rrSrc from './releases/rrweb-record.umd.cjs.src';\n\nimport type { RecorderContext, RecorderEvent } from './types';\nimport { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\n\ninterface WindowWithRRWeb extends Window {\n rrweb?: {\n record: typeof record | null;\n };\n}\n\nexport const defaultRecordOptions: recordOptions<eventWithTime> = {\n slimDOMOptions: 'all',\n inlineStylesheet: true,\n recordDOM: true,\n recordCanvas: true,\n collectFonts: true,\n inlineImages: true,\n // checkoutEveryNvm: 10,\n // excludeAttribute: /data-(cy|test(id)?|cypress|highlight-el|cypress-el)/i,\n maskInputOptions: { password: true },\n sampling: {\n mousemove: false,\n mouseInteraction: {\n MouseUp: false,\n MouseDown: false,\n Click: true,\n ContextMenu: true,\n DblClick: true,\n Focus: true,\n Blur: true,\n TouchStart: false,\n TouchEnd: false,\n },\n scroll: 100,\n media: 100,\n input: 'last',\n canvas: 'all',\n visibility: {\n mode: 'none',\n debounce: 50,\n threshold: 0.5,\n sensitivity: 0.05,\n rafThrottle: 50\n }\n },\n flushCustomEvent: 'after',\n // recordAfter: 'DOMContentStabilized',\n recordAfter: 'DOMContentLoaded',\n userTriggeredOnInput: true,\n}\n\nfunction deepMerge<T>(target: T, source: Partial<T>): T {\n const result = { ...target };\n\n for (const key in source) {\n const sourceValue = source[key];\n const targetValue = target[key];\n\n if (\n sourceValue &&\n typeof sourceValue === 'object' &&\n !Array.isArray(sourceValue) &&\n targetValue &&\n typeof targetValue === 'object' &&\n !Array.isArray(targetValue)\n ) {\n result[key] = deepMerge(targetValue, sourceValue);\n } else if (sourceValue !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n result[key] = sourceValue as any;\n }\n }\n\n return result;\n}\n\nexport class RRWebRecorder {\n private recordFn: typeof record | null = null;\n private stopFn: (() => void) | undefined | null = null;\n private targetWindow: Window | null = null;\n private context: RecorderContext;\n private eventCounter = 0;\n private events: RecorderEvent[] = [];\n private recordOptions?: recordOptions<eventWithTime>;\n private pendingEvents: {\n tag: string;\n payload: Record<string, unknown>;\n }[] = [];\n private recorderScriptVersion = 'unknown';\n private recorderLibVersion = libVersion;\n\n constructor(options?: recordOptions<eventWithTime>) {\n this.recordOptions = deepMerge(defaultRecordOptions, options ?? {});\n this.context = {\n pushEvent: (event) => this.events.push(event),\n };\n }\n\n private handleEmit(event: RecorderEvent) {\n if (event.type === 0 || event.type === 1) {\n return;\n }\n const rrEvent: RecorderEvent = {\n ...event,\n };\n this.context.pushEvent(rrEvent);\n }\n\n public inject(win: Window) {\n const w = win as WindowWithRRWeb;\n\n this.targetWindow = win;\n\n if (w.rrweb) {\n this.recordFn = w.rrweb.record ?? null;\n return;\n }\n\n const script = win.document.createElement('script');\n script.type = 'text/javascript';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n script.innerHTML = rrSrc;\n win.document.head.appendChild(script);\n\n const recheck = (win as WindowWithRRWeb).rrweb;\n if (!recheck || !recheck.record) {\n console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);\n return;\n }\n\n this.recordFn = recheck.record;\n // console.debug(`[${Date.now()}] [recorder] Recorder loaded: `, this.recordFn.getVersion());\n this.recorderScriptVersion = this.recordFn.getVersion();\n }\n\n public start() {\n if (!this.targetWindow || !this.recordFn) {\n console.debug(`[${Date.now()}] [recorder] Not ready to start`);\n return;\n }\n\n if (this.stopFn) {\n console.debug(`[${Date.now()}] [recorder] Already recording`);\n return;\n }\n\n\n this.stopFn = this.recordFn({\n emit: (event: RecorderEvent) => this.handleEmit(event),\n plugins: [\n getRecordSequentialIdPlugin({\n key: 'id',\n getId: () => ++this.eventCounter,\n }),\n ],\n ...this.recordOptions\n });\n\n this.flush();\n }\n\n public stop() {\n this.flush();\n this.stopFn?.();\n this.stopFn = null;\n }\n\n public reset() {\n this.eventCounter = 0;\n this.events = [];\n this.stop();\n this.context = {\n pushEvent: (event) => this.events.push(event),\n };\n }\n\n public flush() {\n if (!this.recordFn) return;\n\n const stillPending: typeof this.pendingEvents = [];\n\n for (const evt of this.pendingEvents) {\n try {\n this.recordFn.addCustomEvent(evt.tag, evt.payload);\n } catch (err) {\n console.debug(`[${Date.now()}] [recorder] flush failed for custom event: ${evt.tag}`);\n stillPending.push(evt);\n }\n }\n\n this.pendingEvents = stillPending;\n }\n\n public addCustomEvent(tag: string, payload: Record<string, unknown>) {\n const event = { tag, payload };\n\n if (!this.recordFn || !this.stopFn) {\n console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${tag}`);\n this.pendingEvents.push(event);\n return;\n }\n\n try {\n this.recordFn.addCustomEvent(tag, payload);\n } catch (error) {\n console.debug(`[${Date.now()}] [recorder] error adding custom event: ${tag}`, error);\n this.pendingEvents.push(event);\n }\n }\n\n public isRecordingReady(): boolean {\n return !!this.recordFn && !!this.stopFn;\n }\n\n public isRecording(): boolean {\n return this.recordFn?.isRecording() || false;\n }\n\n public getScriptVersion(): string {\n return `@appsurify-testmap/rrweb-record:${this.recorderScriptVersion}`;\n }\n\n public getLibVersion(): string {\n return `@appsurify-testmap/rrweb:${this.recorderLibVersion}`;\n }\n\n public getEvents(): readonly RecorderEvent[] {\n return this.events;\n }\n\n public getMirror(): Mirror | undefined {\n return (this.recordFn as unknown as { mirror?: Mirror })?.mirror;\n }\n\n public bind(ctx: RecorderContext) {\n this.context = ctx;\n }\n\n public setEventCounter(value: number) {\n this.eventCounter = value;\n }\n\n}\n","import { RRWebRecorder } from './RRWebRecorder';\n\n\nexport default RRWebRecorder;\n","/// <reference types=\"cypress\" />\n\nimport {getCurrentTestContext, setCurrentTestContext} from '../runtime';\nimport {safeSerializeArray, buildSelector, getTestKey, mapTestRunContextToResult} from '../utils';\nimport RRWebRecorder from '../../recorder';\nimport defaultRecordOptions from '../../recorder';\nimport type {RecorderEvent} from '../../recorder/types';\nimport type {TestRunContext} from '../../types';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst testmapEnv = Cypress.env('testmap') ?? {};\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst recordingOpts = typeof testmapEnv === 'object' && 'recordingOpts' in testmapEnv\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ? testmapEnv.recordingOpts\n : defaultRecordOptions;\n// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\nconst recorder = new RRWebRecorder(recordingOpts);\n\nexport const registerCypressEventListeners = () => {\n\n Cypress\n .on('test:before:run', onTestBeforeRun)\n .on('log:added', onLogAdded)\n .on('log:changed', onLogChanged)\n .on('window:before:load', onWindowBeforeLoad)\n .on('window:before:unload', onWindowBeforeUnload)\n .on('window:unload', onWindowUnload)\n .on('window:load', onWindowLoad)\n .on('command:enqueued', onCommandEnqueued)\n .on('command:start', onCommandStart)\n .on('command:end', onCommandEnd)\n .on('command:retry', onCommandRetry)\n .on('skipped:command:end', onSkippedCommandEnd)\n .on('test:after:run', onTestAfterRun)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('command:failed', onCommandFailed)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('command:queue:end', onCommandQueueEnd)\n .on('fail', onFail);\n\n\n afterEach(() => {\n // console.debug(`[${Date.now()}] [cypress] afterEach:`);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // console.debug(`[${Date.now()}] [cypress] afterEach:`, ctx);\n ctx.recorderEvents.map((event) => {\n if (event.type !== 5 ) return event;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const liveCommand = ctx.commandLiveRefs.get(event.data.payload.id) as Cypress.CommandQueue;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // event.data.payload.element = element;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n event.data.payload.state = liveCommand?.state ?? 'unknown';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // event.data.payload.args = liveCommand?.get('args');\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-call\n event.data.payload.args = safeSerializeArray(liveCommand?.get('args'));\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.query = liveCommand?.get('query');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.timeout = liveCommand?.get('timeout');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.name = liveCommand?.get('name');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.type = liveCommand?.get('type');\n\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (liveCommand?.get('prev')) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.prev = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n state: liveCommand?.get('prev').state,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n name: liveCommand?.get('prev').get('name'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n args: safeSerializeArray(liveCommand?.get('prev').get('args')),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n type: liveCommand?.get('prev').get('type'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n query: liveCommand?.get('prev').get('query'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n id: liveCommand?.get('prev').get('id'),\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (liveCommand?.get('next')) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.next = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n state: liveCommand?.get('next').state,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n name: liveCommand?.get('next').get('name'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n args: safeSerializeArray(liveCommand?.get('next').get('args')),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n type: liveCommand?.get('next').get('type'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n query: liveCommand?.get('next').get('query'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n id: liveCommand?.get('next').get('id'),\n };\n }\n return event;\n })\n console.debug(`[${Date.now()}] [cypress] afterEach:`, ctx.recorderEvents);\n\n // const testRunResult: TestRunResult = {\n // spec: ctx.spec as unknown as SpecInfo,\n // test: prepareTest(ctx.test),\n // browser: ctx.browser as BrowserInfo,\n // recorderEvents: ctx.recorderEvents,\n // }\n\n const testRunResult = mapTestRunContextToResult(ctx);\n\n\n // const testRunResultSize = getSizeInBytes(testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:`, testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:size:`, formatBytes(testRunResultSize));\n // const debugReport = new UICoverageReport(testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:debugReport:`, debugReport.toJSON());\n\n try {\n cy.task('saveRRWebReport', {\n testRunResult\n }, { log: false });\n } catch (e) {\n console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`, e);\n }\n\n });\n\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // Cypress.Commands.overwrite('type', (originalFn, subject, text, options) => {\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // return originalFn(subject, text, options).then(() => {\n // if (Cypress.dom.isElement(subject[0])) {\n // const el = subject[0];\n // if (el) {\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // el.dispatchEvent(new Event('input', { bubbles: true }));\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // el.dispatchEvent(new Event('change', { bubbles: true }));\n // }\n // }\n // });\n // });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onTestBeforeRun = (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n // console.debug(`[${Date.now()}] [cypress] onTestBeforeRun`, attributes, test);\n const testKey = getTestKey(test);\n const testRunContext: TestRunContext = {\n runner: {\n source: 'cypress',\n type: Cypress.testingType,\n version: Cypress.version,\n platform: Cypress.platform,\n arch: Cypress.arch,\n recorder: {\n scriptVersion: recorder.getLibVersion() || 'unknown',\n libVersion: recorder.getLibVersion() || 'unknown'\n }\n\n },\n spec: Cypress.spec,\n test: test,\n browser: Cypress.browser,\n autWindow: null,\n waitForPaint: () => Promise.resolve(undefined),\n paintComplete: false,\n recorderEvents: [] as RecorderEvent[],\n commandLiveRefs: new Map<string, Cypress.CommandQueue>()\n };\n\n setCurrentTestContext(testKey, testRunContext);\n\n recorder.bind({\n pushEvent: (event) => {\n console.debug(`[${Date.now()}] [cypress] pushEvent`, event);\n testRunContext.recorderEvents.push(event)\n if (event.type === 5) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const liveCommand = testRunContext.commandLiveRefs.get(event.data.payload.id) as Cypress.CommandQueue;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n const subject = liveCommand?.get('subject')\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-argument\n const selector = subject?.selector ?? buildSelector(subject);\n\n const mirror = recorder.getMirror();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n const element = mirror?.getMeta(subject?.[0]);\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.element = {\n ...element,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n selector,\n childNodes: []\n };\n }\n },\n });\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogAdded = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`[${Date.now()}] [cypress] onLogAdded`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogChanged = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`[${Date.now()}] [cypress] onLogChanged`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowBeforeUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowBeforeUnload`, event);\n // try {\n // recorder.stop();\n // // eslint-disable-next-line @typescript-eslint/no-unused-vars\n // } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowUnload`, event);\n try {\n recorder.stop();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowBeforeLoad = (win: Cypress.AUTWindow) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowBeforeLoad`, win);\n recorder.inject(win);\n // recorder.start();\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n ctx.runner.recorder!.scriptVersion = recorder.getScriptVersion();\n ctx.autWindow = win;\n ctx.paintComplete = false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowLoad = (win: Cypress.AUTWindow) => {\n console.debug(`[${Date.now()}] [cypress] onWindowLoad`, win);\n // recorder.inject(win);\n // recorder.start();\n // console.debug(`[${Date.now()}] [cypress] onWindowLoad after start`, recorder.isRecording());\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n if (!ctx.autWindow) {\n ctx.autWindow = win;\n ctx.paintComplete = false;\n }\n\n ctx.waitForPaint = (value?: unknown): Promise<unknown> => {\n return new Promise<unknown>((resolve) => {\n const maxWaitMs = 5000;\n\n const captureAfterPaint = () => {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n resolve(value);\n });\n });\n };\n\n const safeResolve = (() => {\n let called = false;\n return () => {\n if (!called) {\n called = true;\n captureAfterPaint();\n }\n };\n })();\n\n if (['interactive', 'complete'].includes(win.document.readyState)) {\n safeResolve();\n } else {\n win.addEventListener('DOMContentLoaded', safeResolve, { once: true });\n win.addEventListener('load', safeResolve, { once: true });\n setTimeout(() => {\n console.warn('⏳ Timeout: forcing resolution');\n safeResolve();\n }, maxWaitMs);\n }\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/require-await\n void ctx.waitForPaint().then(async () => {\n ctx.paintComplete = true;\n recorder.inject(win);\n recorder.start();\n });\n // console.debug(`[${Date.now()}] [cypress] onWindowLoad after waitForPaint`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandEnqueued = (command: Cypress.EnqueuedCommandAttributes) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandEnqueued`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.id, command);\n\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandRetry = (command: Cypress.CommandQueue) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandRetry`, command);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandStart = (command: Cypress.CommandQueue) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandStart`, command);\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.attributes.id, command);\n\n // If need before state\n // recorder.addCustomEvent(`${command.attributes.name}`, {\n // id: command.attributes.id,\n // });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandEnd = (command: Cypress.CommandQueue) => {\n console.debug(`[${Date.now()}] [cypress] onCommandEnd`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n const waitWindowLoaded = async () => {\n if (!ctx.paintComplete && typeof ctx.waitForPaint === 'function') {\n await ctx.waitForPaint();\n ctx.paintComplete = true;\n }\n }\n void waitWindowLoaded();\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n // void waitWindowLoaded();\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandFailed = (command: Cypress.CommandQueue, err: unknown) => {\n console.debug(`[${Date.now()}] [cypress] onCommandFailed`, command);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onSkippedCommandEnd = (command: Cypress.CommandQueue) => {\n console.debug(`[${Date.now()}] [cypress] onSkippedCommandEnd`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.attributes.id, command);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandQueueEnd = () => {\n // console.debug(`[${Date.now()}] [cypress] onCommandQueueEnd`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onFail = (error: Cypress.CypressError, mocha: Mocha.Runnable) => {\n // console.debug(`[${Date.now()}] [cypress] onFail`, {error, mocha});\n throw error;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/require-await\nconst onTestAfterRun = async (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n console.debug(`[${Date.now()}] [cypress] onTestAfterRun`, attributes, test);\n recorder.stop();\n\n // const testKey = getTestKey(test);\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n //\n // console.debug(`[${Date.now()}] [cypress] onTestAfterRun`, ctx.recorderEvents);\n};\n\n\n","/// <reference types=\"cypress\" />\n\n\nexport const registerMochaEventListeners = () => {\n // ⚠️ Плохой стиль, отключает всю типизацию\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((Cypress as any).mocha.getRunner() as Mocha.Runner)\n .on('hook', onHook);\n};\n\nconst onHook = () => {\n // console.debug(`🟡 [${Date.now()}] [mocha] onHook:`);\n};\n\nexport const injectMochaHookFunctions = () => {\n\n beforeEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] beforeEach:`);\n });\n\n afterEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] afterEach:`);\n // const currentTest = Cypress.currentTest;\n // const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n //\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n // const serializedReport = serializeTestRunContextToJson(ctx);\n // console.log(`${Date.now()} [afterEach]`, currentTest, serializedReport);\n // cy.task('saveSnapshotReport', serializedReport)\n });\n\n};\n","import { registerCypressEventListeners } from \"./cypress\";\nimport { registerMochaEventListeners, injectMochaHookFunctions } from \"./mocha\";\n\nexport const enableTestmap = () => {\n registerCypressEventListeners();\n registerMochaEventListeners();\n injectMochaHookFunctions();\n};\n","import { enableTestmap } from './events';\n\nexport const initializeTestmap = () => {\n // if (isTestmap().Initialized) {\n // return;\n // }\n enableTestmap();\n}\n"],"mappings":"AAGO,IAAMA,EAAe,IAAI,IAEzB,SAASC,EAAsBC,EAAaC,EAA2B,CAC5EH,EAAa,IAAIE,EAAKC,CAAG,CAC3B,CAEO,SAASC,EAAsBF,EAAyC,CAC7E,OAAOF,EAAa,IAAIE,CAAG,CAC7B,CCDO,SAASG,EAAmBC,EAAsD,CACvF,OAAOA,EACJ,OAAQC,GAGH,OAAOA,GAAU,UAAYA,IAAU,MAAQ,QAASA,GAAUA,EAAc,MAAQ,GACnF,GAKP,OAAOA,GAAU,UACjB,OAAOA,GAAU,UACjB,OAAOA,GAAU,WACjBA,IAAU,IAEb,CACL,CAEO,SAASC,EAAcC,EAAyD,CACrF,IAAMC,EAAKD,IAAU,CAAC,EACtB,GAAI,CAACC,EAAI,OAAO,KAEhB,IAAMC,EAAMD,EAAG,QAAQ,YAAY,EAC7BE,EAAKF,EAAG,GAAK,IAAIA,EAAG,KAAO,GAC3BG,EAAgB,MAAM,KAAKH,EAAG,SAAS,EAC1C,IAAII,GAAO,IAAIA,GAAK,EACpB,KAAK,EAAE,EAEV,MAAO,GAAGH,IAAMC,IAAKC,GACvB,CAEO,SAASE,EAAWC,EAA0D,CACjF,OAAOA,EAAK,UAAU,EAAE,KAAK,KAAK,CACtC,CAoCO,SAASC,EAAiBC,EAAwF,CACrH,GAAKA,EAGP,MAAO,CACD,GAAIA,EAAM,GACV,KAAMA,EAAM,KAIZ,kBAAmBC,EAAsBD,EAAM,iBAAiB,EAChE,QAASA,EAAM,QACf,KAAMA,EAAM,KACZ,MAAOA,EAAM,MACb,KAAMA,EAAM,IAChB,CACJ,CA2BO,SAASE,EAAsBC,EAA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AC6B,EAA+BC,IAAiB,CACrE,QAAQ,MAAM,IAAI,KAAK,IAAI,+BAAgCD,CAAO,EAElE5C,EAAS,eAAe,GAAG4C,EAAQ,WAAW,OAAQ,CAElD,GAAIA,EAAQ,WAAW,EAC3B,CAAC,CACL,EAIM/B,EAAuB+B,GAAkC,CAC3D,QAAQ,MAAM,IAAI,KAAK,IAAI,mCAAoCA,CAAO,EAEtE,IAAM1B,EAAc,QAAQ,YAC5B,GAAI,CAACA,EAAa,OAElB,IAAMC,EAAUC,EAAW,CAAE,UAAW,IAAMF,EAAY,SAAU,CAAC,EAC/DG,EAAMC,EAAsBH,CAAO,EACpCE,IAILA,EAAI,gBAAgB,IAAIuB,EAAQ,WAAW,GAAIA,CAAO,EAGtD5C,EAAS,eAAe,GAAG4C,EAAQ,WAAW,OAAQ,CAElD,GAAIA,EAAQ,WAAW,EAC3B,CAAC,EACL,EAGM5B,EAAoB,IAAM,CAEhC,EAIMC,EAAS,CAAC6B,EAA6BC,IAA0B,CAEnE,MAAMD,CACV,EAKMhC,EAAiB,MAAOe,EAAgCC,IAAqB,CAC/E,QAAQ,MAAM,IAAI,KAAK,IAAI,8BAA+BD,EAAYC,CAAI,EAC1E9B,EAAS,KAAK,CAOlB,EC/fO,IAAMgD,EAA8B,IAAM,CAG7C,QAAgB,MAAM,UAAU,EAC7B,GAAG,OAAQC,CAAM,CACxB,EAEMA,EAAS,IAAM,CAErB,EAEaC,EAA2B,IAAM,CAE5C,WAAW,GAAI,IAAK,CAEpB,CAAC,EAED,UAAU,GAAI,IAAK,CAUnB,CAAC,CAEH,EC7BO,IAAMC,EAAgB,IAAM,CACjCC,EAA8B,EAC9BC,EAA4B,EAC5BC,EAAyB,CAC3B,ECLO,IAAMC,GAAoB,IAAM,CAInCC,EAAc,CAClB","names":["testContexts","setCurrentTestContext","key","ctx","getCurrentTestContext","safeSerializeArray","arr","value","buildSelector","subject","el","tag","id","classSelector","cls","getTestKey","test","prepareTestSuite","suite","safeInvocationDetails","safeInvocationDetails","details","mapTestRunContextToResult","ctx","mapSpec","mapBrowser","mapTest","spec","browser","test","prepareTestSuite","libVersion","getRecordSequentialIdPlugin","defaultRecordOptions","deepMerge","target","source","result","key","sourceValue","targetValue","RRWebRecorder","libVersion","options","event","rrEvent","win","w","script","rrweb_record_umd_cjs_default","recheck","getRecordSequentialIdPlugin","stillPending","evt","tag","payload","error","ctx","value","recorder_default","RRWebRecorder","testmapEnv","recordingOpts","recorder_default","recorder","registerCypressEventListeners","onTestBeforeRun","onLogAdded","onLogChanged","onWindowBeforeLoad","onWindowBeforeUnload","onWindowUnload","onWindowLoad","onCommandEnqueued","onCommandStart","onCommandEnd","onCommandRetry","onSkippedCommandEnd","onTestAfterRun","onCommandFailed","onCommandQueueEnd","onFail","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","event","liveCommand","safeSerializeArray","testRunResult","mapTestRunContextToResult","e","attributes","test","testRunContext","setCurrentTestContext","subject","selector","buildSelector","element","log","win","value","resolve","captureAfterPaint","safeResolve","called","command","err","error","mocha","registerMochaEventListeners","onHook","injectMochaHookFunctions","enableTestmap","registerCypressEventListeners","registerMochaEventListeners","injectMochaHookFunctions","initializeTestmap","enableTestmap"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsurify-testmap/rrweb-cypress-plugin",
|
|
3
|
-
"version": "2.1.2-alpha.
|
|
3
|
+
"version": "2.1.2-alpha.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"rrweb"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
|
-
"
|
|
11
|
+
"prebuild": "yarn workspace @appsurify-testmap/rrweb-record run build",
|
|
12
12
|
"dev": "tsup --watch",
|
|
13
|
-
"build": "yarn
|
|
13
|
+
"build": "yarn prebuild && tsup-node",
|
|
14
14
|
"prepublish": "yarn run build"
|
|
15
15
|
},
|
|
16
16
|
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/utils#readme",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"typescript": "^5.8.3"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@appsurify-testmap/rrweb": "^2.1.2-alpha.
|
|
53
|
-
"@appsurify-testmap/rrweb-plugin-sequential-id-record": "^2.1.2-alpha.
|
|
54
|
-
"@appsurify-testmap/rrweb-snapshot": "^2.1.2-alpha.
|
|
55
|
-
"@appsurify-testmap/rrweb-types": "^2.1.2-alpha.
|
|
52
|
+
"@appsurify-testmap/rrweb": "^2.1.2-alpha.5",
|
|
53
|
+
"@appsurify-testmap/rrweb-plugin-sequential-id-record": "^2.1.2-alpha.5",
|
|
54
|
+
"@appsurify-testmap/rrweb-snapshot": "^2.1.2-alpha.5",
|
|
55
|
+
"@appsurify-testmap/rrweb-types": "^2.1.2-alpha.5"
|
|
56
56
|
}
|
|
57
57
|
}
|