@appsurify-testmap/rrweb-cypress-plugin 3.3.0-alpha.1 → 3.5.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +1 -1
- package/dist/index.js +8 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -12
- package/dist/index.mjs.map +1 -1
- package/dist/reporter.js +1 -1
- package/dist/reporter.js.map +1 -1
- package/dist/reporter.mjs +1 -1
- package/dist/reporter.mjs.map +1 -1
- package/package.json +5 -5
package/Readme.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -16552,8 +16552,12 @@ class NavigationManager {
|
|
|
16552
16552
|
this.locked = false;
|
|
16553
16553
|
}
|
|
16554
16554
|
destroy() {
|
|
16555
|
+
const hadPending = this.pendingNavigation !== null;
|
|
16555
16556
|
this.reset();
|
|
16556
16557
|
this.disabled = true;
|
|
16558
|
+
if (hadPending) {
|
|
16559
|
+
this.onSnapshot(true);
|
|
16560
|
+
}
|
|
16557
16561
|
}
|
|
16558
16562
|
startDebounce() {
|
|
16559
16563
|
this.debounceTimer = setTimeout(() => {
|
|
@@ -16578,9 +16582,7 @@ class NavigationManager {
|
|
|
16578
16582
|
});
|
|
16579
16583
|
this.settlingObserver.observe(this.doc, {
|
|
16580
16584
|
childList: true,
|
|
16581
|
-
subtree: true
|
|
16582
|
-
attributes: true,
|
|
16583
|
-
characterData: true
|
|
16585
|
+
subtree: true
|
|
16584
16586
|
});
|
|
16585
16587
|
this.settleCheckTimer = setTimeout(
|
|
16586
16588
|
() => this.checkSettled(),
|
|
@@ -16611,13 +16613,7 @@ class NavigationManager {
|
|
|
16611
16613
|
this.cancelTimers();
|
|
16612
16614
|
this.disconnectSettlingObserver();
|
|
16613
16615
|
this.pendingNavigation = null;
|
|
16614
|
-
|
|
16615
|
-
requestAnimationFrame(() => {
|
|
16616
|
-
if (!this.frozen && !this.locked && !this.disabled) {
|
|
16617
|
-
this.onSnapshot(true);
|
|
16618
|
-
}
|
|
16619
|
-
});
|
|
16620
|
-
});
|
|
16616
|
+
this.onSnapshot(true);
|
|
16621
16617
|
}
|
|
16622
16618
|
cancelTimers() {
|
|
16623
16619
|
if (this.debounceTimer !== null) {
|
|
@@ -16727,7 +16723,7 @@ class ProcessedNodeManager {
|
|
|
16727
16723
|
destroy() {
|
|
16728
16724
|
}
|
|
16729
16725
|
}
|
|
16730
|
-
const version$1 = "3.
|
|
16726
|
+
const version$1 = "3.5.0-alpha.1";
|
|
16731
16727
|
let wrappedEmit;
|
|
16732
16728
|
let takeFullSnapshot$1;
|
|
16733
16729
|
let canvasManager;
|
|
@@ -17430,5 +17426,5 @@ exports.record = record;
|
|
|
17430
17426
|
return module.exports;
|
|
17431
17427
|
}))
|
|
17432
17428
|
//# sourceMappingURL=rrweb-record.umd.cjs.map
|
|
17433
|
-
`;var B={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:!
|
|
17429
|
+
`;var B={slimDOMOptions:"all",inlineStylesheet:!0,recordDOM:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,checkoutEveryNvm:60,maskInputOptions:{password:!0},sampling:{mousemove:!1,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!1,Blur:!1,TouchStart:!1,TouchEnd:!1},scroll:100,media:100,input:"last",canvas:"all",visibility:{mode:"none",debounce:50,throttle:100,threshold:.5,sensitivity:.05,rafThrottle:100}},flushCustomEvent:"after",recordAfter:"DOMContentLoaded",userTriggeredOnInput:!0};function C(e,t){let s={...e};for(let r in t){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?s[r]=C(o,n):n!==void 0&&(s[r]=n)}return s}var p=class{recordFn=null;stopFn=null;targetWindow=null;context;eventCounter=0;events=[];recordOptions;pendingEvents=[];recorderScriptVersion="unknown";recorderLibVersion=k.version;constructor(t){this.recordOptions=C(B,t??{}),this.context={pushEvent:s=>this.events.push(s)}}handleEmit(t){if(t.type===0||t.type===1)return;let s={...t};this.context.pushEvent(s)}inject(t){let s=t;if(this.targetWindow=t,s.rrweb){this.recordFn=s.rrweb.record??null;return}let r=t.document.createElement("script");r.type="text/javascript",r.innerHTML=x,t.document.head.appendChild(r);let n=t.rrweb;if(!n||!n.record){console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);return}this.recordFn=n.record,this.recorderScriptVersion=this.recordFn.getVersion()}start(){if(!this.targetWindow||!this.recordFn){console.debug(`[${Date.now()}] [recorder] Not ready to start`);return}if(this.stopFn){console.debug(`[${Date.now()}] [recorder] Already recording`);return}this.stopFn=this.recordFn({emit:t=>this.handleEmit(t),plugins:[(0,$.getRecordSequentialIdPlugin)({key:"id",getId:()=>++this.eventCounter})],...this.recordOptions}),this.flush()}stop(){this.flush(),this.stopFn?.(),this.stopFn=null}reset(){this.eventCounter=0,this.events=[],this.stop(),this.context={pushEvent:t=>this.events.push(t)}}flush(){if(!this.recordFn)return;let t=[];for(let s of this.pendingEvents)try{this.recordFn.addCustomEvent(s.tag,s.payload)}catch{console.debug(`[${Date.now()}] [recorder] flush failed for custom event: ${s.tag}`),t.push(s)}this.pendingEvents=t}addCustomEvent(t,s){let r={tag:t,payload:s};if(!this.recordFn||!this.stopFn){console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${t}`),this.pendingEvents.push(r);return}try{this.recordFn.addCustomEvent(t,s)}catch(n){console.debug(`[${Date.now()}] [recorder] error adding custom event: ${t}`,n),this.pendingEvents.push(r)}}isRecordingReady(){return!!this.recordFn&&!!this.stopFn}isRecording(){return this.recordFn?.isRecording()||!1}getScriptVersion(){return`@appsurify-testmap/rrweb-record:${this.recorderScriptVersion}`}getLibVersion(){return`@appsurify-testmap/rrweb:${this.recorderLibVersion}`}getEvents(){return this.events}getMirror(){return this.recordFn?.mirror}bind(t){this.context=t}setEventCounter(t){this.eventCounter=t}};var h=p;var y=Cypress.env("testmap")??{},H=typeof y=="object"&&"recordingOpts"in y?y.recordingOpts:h,i=new h(H),_=()=>{Cypress.on("test:before:run",j).on("window:before:load",K).on("window:before:unload",V).on("window:unload",G).on("window:load",Y).on("test:after:run",J).on("command:queue:end",q).on("fail",Z),afterEach(()=>{i.stop();let e=Cypress.currentTest;if(!e)return;let t=l({titlePath:()=>e.titlePath}),s=u(t);if(!s)return;s.recorderEvents.map(n=>{if(n.type!==5)return n;let o=s.commandLiveRefs.get(n.data.payload.id);return n.data.payload.state=o?.state??"unknown",n.data.payload.args=d(o?.get("args")),n.data.payload.query=o?.get("query"),n.data.payload.timeout=o?.get("timeout"),n.data.payload.name=o?.get("name"),n.data.payload.type=o?.get("type"),o?.get("prev")&&(n.data.payload.prev={state:o?.get("prev").state,name:o?.get("prev").get("name"),args:d(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")&&(n.data.payload.next={state:o?.get("next").state,name:o?.get("next").get("name"),args:d(o?.get("next").get("args")),type:o?.get("next").get("type"),query:o?.get("next").get("query"),id:o?.get("next").get("id")}),n}),console.debug(`[${Date.now()}] [cypress] afterEach:`,s.recorderEvents);let r=S(s);try{cy.task("saveRRWebReport",{testRunResult:r},{log:!1})}catch(n){console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`,n)}})},j=(e,t)=>{let s=l(t),r={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(s,r),i.bind({pushEvent:n=>{if(console.debug(`[${Date.now()}] [cypress] pushEvent`,n),r.recorderEvents.push(n),n.type===5){let f=r.commandLiveRefs.get(n.data.payload.id)?.get("subject"),m=f?.selector,c=i.getMirror()?.getMeta(f?.[0]);n.data.payload.element={...c,selector:m,childNodes:[]}}}})};var V=e=>{},G=e=>{try{i.stop()}catch{}},K=e=>{i.inject(e);let t=Cypress.currentTest;if(!t)return;let s=l({titlePath:()=>t.titlePath}),r=u(s);r&&(r.runner.recorder.scriptVersion=i.getScriptVersion(),r.autWindow=e,r.paintComplete=!1)},Y=e=>{console.debug(`[${Date.now()}] [cypress] onWindowLoad`,e);let t=Cypress.currentTest;if(!t)return;let s=l({titlePath:()=>t.titlePath}),r=u(s);r&&(r.autWindow||(r.autWindow=e,r.paintComplete=!1),r.waitForPaint=n=>new Promise(o=>{let m=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{o(n)})})},a=(()=>{let c=!1;return()=>{c||(c=!0,m())}})();["interactive","complete"].includes(e.document.readyState)?a():(e.addEventListener("DOMContentLoaded",a,{once:!0}),e.addEventListener("load",a,{once:!0}),setTimeout(()=>{console.warn("\u23F3 Timeout: forcing resolution"),a()},5e3))}),r.waitForPaint().then(async()=>{r.paintComplete=!0,i.inject(e),i.start()}))};var q=()=>{},Z=(e,t)=>{throw e},J=async(e,t)=>{console.debug(`[${Date.now()}] [cypress] onTestAfterRun`,e,t),i.stop()};var E=()=>{Cypress.mocha.getRunner().on("hook",Q)},Q=()=>{},I=()=>{beforeEach("",()=>{}),afterEach("",()=>{})};var R=()=>{_(),E(),I()};var T=()=>{R()};0&&(module.exports={initializeTestmap});
|
|
17434
17430
|
//# 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 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, 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\n const selector = subject?.selector;\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":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QU,EAAa,CAAE,KAAM,EAAK,CAAC,EACxD,WAAW,IAAM,CACb,QAAQ,KAAK,oCAA+B,EAC5CA,EAAY,CAChB,EAAG,GAAS,EAEhB,CAAC,EAIEN,EAAI,aAAa,EAAE,KAAK,SAAY,CACrCA,EAAI,cAAgB,GACpBN,EAAS,OAAOE,CAAG,EACnBF,EAAS,MAAM,CACnB,CAAC,EAEL,EA6GA,IAAMc,EAAoB,IAAM,CAEhC,EAIMC,EAAS,CAACC,EAA6BC,IAA0B,CAEnE,MAAMD,CACV,EAKME,EAAiB,MAAOC,EAAgCC,IAAqB,CAC/E,QAAQ,MAAM,IAAI,KAAK,IAAI,8BAA+BD,EAAYC,CAAI,EAC1EC,EAAS,KAAK,CAOlB,EC/fO,IAAMC,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,EAAoB,IAAM,CAInCC,EAAc,CAClB","names":["src_exports","__export","initializeTestmap","__toCommonJS","testContexts","setCurrentTestContext","key","ctx","getCurrentTestContext","safeSerializeArray","arr","value","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","onWindowBeforeLoad","onWindowBeforeUnload","onWindowUnload","onWindowLoad","onTestAfterRun","onCommandQueueEnd","onFail","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","event","liveCommand","safeSerializeArray","testRunResult","mapTestRunContextToResult","e","attributes","test","testRunContext","setCurrentTestContext","subject","selector","element","onWindowBeforeUnload","event","onWindowUnload","recorder","onWindowBeforeLoad","win","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","onWindowLoad","value","resolve","captureAfterPaint","safeResolve","called","onCommandQueueEnd","onFail","error","mocha","onTestAfterRun","attributes","test","recorder","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 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: 60,\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: false,\n Blur: false,\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 throttle: 100,\n threshold: 0.5,\n sensitivity: 0.05,\n rafThrottle: 100\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, 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 // Stop recording before collecting events so that any pending\n // navigation snapshots are flushed into the events array.\n recorder.stop();\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\n const selector = subject?.selector;\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,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,IAAA,eAAAC,EAAAH,GCGO,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,EAAWC,EAA0D,CACjF,OAAOA,EAAK,UAAU,EAAE,KAAK,KAAK,CACtC,CAoCO,SAASC,EAAiBC,EAAwF,CACrH,GAAKA,EAGP,MAAO,CACD,GAAIA,EAAM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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","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","onWindowBeforeLoad","onWindowBeforeUnload","onWindowUnload","onWindowLoad","onTestAfterRun","onCommandQueueEnd","onFail","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","event","liveCommand","safeSerializeArray","testRunResult","mapTestRunContextToResult","e","attributes","test","testRunContext","setCurrentTestContext","subject","selector","element","onWindowBeforeUnload","event","onWindowUnload","recorder","onWindowBeforeLoad","win","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","onWindowLoad","value","resolve","captureAfterPaint","safeResolve","called","onCommandQueueEnd","onFail","error","mocha","onTestAfterRun","attributes","test","recorder","registerMochaEventListeners","onHook","injectMochaHookFunctions","enableTestmap","registerCypressEventListeners","registerMochaEventListeners","injectMochaHookFunctions","initializeTestmap","enableTestmap"]}
|
package/dist/index.mjs
CHANGED
|
@@ -16552,8 +16552,12 @@ class NavigationManager {
|
|
|
16552
16552
|
this.locked = false;
|
|
16553
16553
|
}
|
|
16554
16554
|
destroy() {
|
|
16555
|
+
const hadPending = this.pendingNavigation !== null;
|
|
16555
16556
|
this.reset();
|
|
16556
16557
|
this.disabled = true;
|
|
16558
|
+
if (hadPending) {
|
|
16559
|
+
this.onSnapshot(true);
|
|
16560
|
+
}
|
|
16557
16561
|
}
|
|
16558
16562
|
startDebounce() {
|
|
16559
16563
|
this.debounceTimer = setTimeout(() => {
|
|
@@ -16578,9 +16582,7 @@ class NavigationManager {
|
|
|
16578
16582
|
});
|
|
16579
16583
|
this.settlingObserver.observe(this.doc, {
|
|
16580
16584
|
childList: true,
|
|
16581
|
-
subtree: true
|
|
16582
|
-
attributes: true,
|
|
16583
|
-
characterData: true
|
|
16585
|
+
subtree: true
|
|
16584
16586
|
});
|
|
16585
16587
|
this.settleCheckTimer = setTimeout(
|
|
16586
16588
|
() => this.checkSettled(),
|
|
@@ -16611,13 +16613,7 @@ class NavigationManager {
|
|
|
16611
16613
|
this.cancelTimers();
|
|
16612
16614
|
this.disconnectSettlingObserver();
|
|
16613
16615
|
this.pendingNavigation = null;
|
|
16614
|
-
|
|
16615
|
-
requestAnimationFrame(() => {
|
|
16616
|
-
if (!this.frozen && !this.locked && !this.disabled) {
|
|
16617
|
-
this.onSnapshot(true);
|
|
16618
|
-
}
|
|
16619
|
-
});
|
|
16620
|
-
});
|
|
16616
|
+
this.onSnapshot(true);
|
|
16621
16617
|
}
|
|
16622
16618
|
cancelTimers() {
|
|
16623
16619
|
if (this.debounceTimer !== null) {
|
|
@@ -16727,7 +16723,7 @@ class ProcessedNodeManager {
|
|
|
16727
16723
|
destroy() {
|
|
16728
16724
|
}
|
|
16729
16725
|
}
|
|
16730
|
-
const version$1 = "3.
|
|
16726
|
+
const version$1 = "3.5.0-alpha.1";
|
|
16731
16727
|
let wrappedEmit;
|
|
16732
16728
|
let takeFullSnapshot$1;
|
|
16733
16729
|
let canvasManager;
|
|
@@ -17430,5 +17426,5 @@ exports.record = record;
|
|
|
17430
17426
|
return module.exports;
|
|
17431
17427
|
}))
|
|
17432
17428
|
//# sourceMappingURL=rrweb-record.umd.cjs.map
|
|
17433
|
-
`;var O={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:!
|
|
17429
|
+
`;var O={slimDOMOptions:"all",inlineStylesheet:!0,recordDOM:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,checkoutEveryNvm:60,maskInputOptions:{password:!0},sampling:{mousemove:!1,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!1,Blur:!1,TouchStart:!1,TouchEnd:!1},scroll:100,media:100,input:"last",canvas:"all",visibility:{mode:"none",debounce:50,throttle:100,threshold:.5,sensitivity:.05,rafThrottle:100}},flushCustomEvent:"after",recordAfter:"DOMContentLoaded",userTriggeredOnInput:!0};function x(e,t){let r={...e};for(let s in t){let n=t[s],o=e[s];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?r[s]=x(o,n):n!==void 0&&(r[s]=n)}return r}var p=class{recordFn=null;stopFn=null;targetWindow=null;context;eventCounter=0;events=[];recordOptions;pendingEvents=[];recorderScriptVersion="unknown";recorderLibVersion=M;constructor(t){this.recordOptions=x(O,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 s=t.document.createElement("script");s.type="text/javascript",s.innerHTML=S,t.document.head.appendChild(s);let n=t.rrweb;if(!n||!n.record){console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);return}this.recordFn=n.record,this.recorderScriptVersion=this.recordFn.getVersion()}start(){if(!this.targetWindow||!this.recordFn){console.debug(`[${Date.now()}] [recorder] Not ready to start`);return}if(this.stopFn){console.debug(`[${Date.now()}] [recorder] Already recording`);return}this.stopFn=this.recordFn({emit:t=>this.handleEmit(t),plugins:[N({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 s={tag:t,payload:r};if(!this.recordFn||!this.stopFn){console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${t}`),this.pendingEvents.push(s);return}try{this.recordFn.addCustomEvent(t,r)}catch(n){console.debug(`[${Date.now()}] [recorder] error adding custom event: ${t}`,n),this.pendingEvents.push(s)}}isRecordingReady(){return!!this.recordFn&&!!this.stopFn}isRecording(){return this.recordFn?.isRecording()||!1}getScriptVersion(){return`@appsurify-testmap/rrweb-record:${this.recorderScriptVersion}`}getLibVersion(){return`@appsurify-testmap/rrweb:${this.recorderLibVersion}`}getEvents(){return this.events}getMirror(){return this.recordFn?.mirror}bind(t){this.context=t}setEventCounter(t){this.eventCounter=t}};var h=p;var g=Cypress.env("testmap")??{},P=typeof g=="object"&&"recordingOpts"in g?g.recordingOpts:h,i=new h(P),k=()=>{Cypress.on("test:before:run",L).on("window:before:load",U).on("window:before:unload",D).on("window:unload",F).on("window:load",z).on("test:after:run",H).on("command:queue:end",W).on("fail",B),afterEach(()=>{i.stop();let e=Cypress.currentTest;if(!e)return;let t=l({titlePath:()=>e.titlePath}),r=u(t);if(!r)return;r.recorderEvents.map(n=>{if(n.type!==5)return n;let o=r.commandLiveRefs.get(n.data.payload.id);return n.data.payload.state=o?.state??"unknown",n.data.payload.args=d(o?.get("args")),n.data.payload.query=o?.get("query"),n.data.payload.timeout=o?.get("timeout"),n.data.payload.name=o?.get("name"),n.data.payload.type=o?.get("type"),o?.get("prev")&&(n.data.payload.prev={state:o?.get("prev").state,name:o?.get("prev").get("name"),args:d(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")&&(n.data.payload.next={state:o?.get("next").state,name:o?.get("next").get("name"),args:d(o?.get("next").get("args")),type:o?.get("next").get("type"),query:o?.get("next").get("query"),id:o?.get("next").get("id")}),n}),console.debug(`[${Date.now()}] [cypress] afterEach:`,r.recorderEvents);let s=w(r);try{cy.task("saveRRWebReport",{testRunResult:s},{log:!1})}catch(n){console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`,n)}})},L=(e,t)=>{let r=l(t),s={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,s),i.bind({pushEvent:n=>{if(console.debug(`[${Date.now()}] [cypress] pushEvent`,n),s.recorderEvents.push(n),n.type===5){let f=s.commandLiveRefs.get(n.data.payload.id)?.get("subject"),m=f?.selector,c=i.getMirror()?.getMeta(f?.[0]);n.data.payload.element={...c,selector:m,childNodes:[]}}}})};var D=e=>{},F=e=>{try{i.stop()}catch{}},U=e=>{i.inject(e);let t=Cypress.currentTest;if(!t)return;let r=l({titlePath:()=>t.titlePath}),s=u(r);s&&(s.runner.recorder.scriptVersion=i.getScriptVersion(),s.autWindow=e,s.paintComplete=!1)},z=e=>{console.debug(`[${Date.now()}] [cypress] onWindowLoad`,e);let t=Cypress.currentTest;if(!t)return;let r=l({titlePath:()=>t.titlePath}),s=u(r);s&&(s.autWindow||(s.autWindow=e,s.paintComplete=!1),s.waitForPaint=n=>new Promise(o=>{let m=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{o(n)})})},a=(()=>{let c=!1;return()=>{c||(c=!0,m())}})();["interactive","complete"].includes(e.document.readyState)?a():(e.addEventListener("DOMContentLoaded",a,{once:!0}),e.addEventListener("load",a,{once:!0}),setTimeout(()=>{console.warn("\u23F3 Timeout: forcing resolution"),a()},5e3))}),s.waitForPaint().then(async()=>{s.paintComplete=!0,i.inject(e),i.start()}))};var W=()=>{},B=(e,t)=>{throw e},H=async(e,t)=>{console.debug(`[${Date.now()}] [cypress] onTestAfterRun`,e,t),i.stop()};var $=()=>{Cypress.mocha.getRunner().on("hook",j)},j=()=>{},C=()=>{beforeEach("",()=>{}),afterEach("",()=>{})};var _=()=>{k(),$(),C()};var V=()=>{_()};export{V as initializeTestmap};
|
|
17434
17430
|
//# 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 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, 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\n const selector = subject?.selector;\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,EAAWC,EAA0D,CACjF,OAAOA,EAAK,UAAU,EAAE,KAAK,KAAK,CACtC,CAoCO,SAASC,EAAiBC,EAAwF,CACrH,GAAKA,EAGP,MAAO,CACD,GAAIA,EAAM,GACV,KAAM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AE5C,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":["testContexts","setCurrentTestContext","key","ctx","getCurrentTestContext","safeSerializeArray","arr","value","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","onWindowBeforeLoad","onWindowBeforeUnload","onWindowUnload","onWindowLoad","onTestAfterRun","onCommandQueueEnd","onFail","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","event","liveCommand","safeSerializeArray","testRunResult","mapTestRunContextToResult","e","attributes","test","testRunContext","setCurrentTestContext","subject","selector","element","onWindowBeforeUnload","event","onWindowUnload","recorder","onWindowBeforeLoad","win","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","onWindowLoad","value","resolve","captureAfterPaint","safeResolve","called","onCommandQueueEnd","onFail","error","mocha","onTestAfterRun","attributes","test","recorder","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 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: 60,\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: false,\n Blur: false,\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 throttle: 100,\n threshold: 0.5,\n sensitivity: 0.05,\n rafThrottle: 100\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, 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 // Stop recording before collecting events so that any pending\n // navigation snapshots are flushed into the events array.\n recorder.stop();\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\n const selector = subject?.selector;\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,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W,IAAM,CACb,QAAQ,KAAK,oCAA+B,EAC5CA,EAAY,CAChB,EAAG,GAAS,EAEhB,CAAC,EAIEN,EAAI,aAAa,EAAE,KAAK,SAAY,CACrCA,EAAI,cAAgB,GACpBN,EAAS,OAAOE,CAAG,EACnBF,EAAS,MAAM,CACnB,CAAC,EAEL,EA6GA,IAAMc,EAAoB,IAAM,CAEhC,EAIMC,EAAS,CAACC,EAA6BC,IAA0B,CAEnE,MAAMD,CACV,EAKME,EAAiB,MAAOC,EAAgCC,IAAqB,CAC/E,QAAQ,MAAM,IAAI,KAAK,IAAI,8BAA+BD,EAAYC,CAAI,EAC1EC,EAAS,KAAK,CAOlB,ECjgBO,IAAMC,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,EAAoB,IAAM,CAInCC,EAAc,CAClB","names":["testContexts","setCurrentTestContext","key","ctx","getCurrentTestContext","safeSerializeArray","arr","value","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","onWindowBeforeLoad","onWindowBeforeUnload","onWindowUnload","onWindowLoad","onTestAfterRun","onCommandQueueEnd","onFail","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","event","liveCommand","safeSerializeArray","testRunResult","mapTestRunContextToResult","e","attributes","test","testRunContext","setCurrentTestContext","subject","selector","element","onWindowBeforeUnload","event","onWindowUnload","recorder","onWindowBeforeLoad","win","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","onWindowLoad","value","resolve","captureAfterPaint","safeResolve","called","onCommandQueueEnd","onFail","error","mocha","onTestAfterRun","attributes","test","recorder","registerMochaEventListeners","onHook","injectMochaHookFunctions","enableTestmap","registerCypressEventListeners","registerMochaEventListeners","injectMochaHookFunctions","initializeTestmap","enableTestmap"]}
|
package/dist/reporter.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var j=Object.create;var c=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var D=(t,e)=>{for(var r in e)c(t,r,{get:e[r],enumerable:!0})},R=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of $(e))!k.call(t,s)&&s!==r&&c(t,s,{get:()=>e[s],enumerable:!(i=F(e,s))||i.enumerable});return t};var d=(t,e,r)=>(r=t!=null?j(b(t)):{},R(e||!t||!t.__esModule?c(r,"default",{value:t,enumerable:!0}):r,t)),N=t=>R(c({},"__esModule",{value:!0}),t);var A={};D(A,{default:()=>y});module.exports=N(A);var o=d(require("path")),n=d(require("fs")),a={outputReportDir:"test-results/cypress/ui"};function g(t){return(t??"").trim().replace(/[\s:/\\<>|"'?*]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function T(t,e){let r=o.dirname(t),i=o.join(r,`.${o.basename(t)}.tmp-${process.pid}-${Date.now()}`);n.mkdirSync(r,{recursive:!0}),n.writeFileSync(i,e,"utf-8"),n.renameSync(i,t)}function x(t){try{if(!n.existsSync(t))return[];let e=n.readFileSync(t,"utf-8").trim();if(!e)return[];let r=JSON.parse(e);return Array.isArray(r)?r:[]}catch{return[]}}function y(t,e){a={...a,...e};let r=o.join(a.outputReportDir,"ui-coverage-aggregated.json");n.existsSync(r)&&n.unlinkSync(r),t("task",{saveRRWebReport(i){let{testRunResult:s}=i,S=g(s.spec.name),l=g(s.test.suite?.title),v=g(s.test.title),w=s.browser.name,h=`${l?l+"-":""}${v}.json`,p=o.join(a.outputReportDir,S,w,h),f={events:s.recorderEvents,metadata:{runner:s.runner,spec:s.spec,suite:s.test.suite,test:s.test,browser:s.browser}};n.mkdirSync(a.outputReportDir,{recursive:!0}),n.mkdirSync(o.dirname(p),{recursive:!0}),n.writeFileSync(p,JSON.stringify(f,null,2),"utf-8"),console.log(`[ui-coverage] Saved report to ${p}`);try{let u=o.join(a.outputReportDir,"ui-coverage-aggregated.json"),m=x(u);m.push(f),T(u,JSON.stringify(m,null,2)),console.log(`[ui-coverage] Updated aggregate: ${u}`)}catch(u){console.warn("[ui-coverage] Failed to update aggregate report:",u)}return null}})}
|
|
2
2
|
//# sourceMappingURL=reporter.js.map
|
package/dist/reporter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/reporter.ts"],"sourcesContent":["import * as path from 'path';\nimport * as fs from 'fs';\nimport type { TestRunResult } from './types';\n\nlet pluginConfig: {\n outputReportDir: string;\n} = {\n outputReportDir: 'test-results/cypress/ui'\n};\n\nfunction sanitizeFileNamePart(name: string | undefined): string {\n return (name ?? '')\n .trim()\n .replace(/[\\s:/\\\\<>|\"'?*]+/g, '-')\n .replace(/-+/g, '-')\n .replace(/^-|-$/g, '');\n}\n\n\nfunction writeFileAtomic(filePath: string, data: string) {\n const dir = path.dirname(filePath);\n const tmp = path.join(dir, `.${path.basename(filePath)}.tmp-${process.pid}-${Date.now()}`);\n fs.mkdirSync(dir, { recursive: true });\n fs.writeFileSync(tmp, data, 'utf-8');\n fs.renameSync(tmp, filePath);\n}\n\nfunction readJsonArraySafe(filePath: string): unknown[] {\n try {\n if (!fs.existsSync(filePath)) return [];\n const text = fs.readFileSync(filePath, 'utf-8').trim();\n if (!text) return [];\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const parsed = JSON.parse(text);\n return Array.isArray(parsed) ? parsed : [];\n } catch {\n return [];\n }\n}\n\nexport default function registerRRWebReportTasks(on: Cypress.PluginEvents, config?: Partial<typeof pluginConfig>) {\n pluginConfig = { ...pluginConfig, ...config };\n\n on('task', {\n saveRRWebReport(reportData: {testRunResult: TestRunResult}) {\n const { testRunResult } = reportData;\n\n const specName = sanitizeFileNamePart(testRunResult.spec.name);\n const suiteTitle = sanitizeFileNamePart(testRunResult.test.suite?.title);\n const testTitle = sanitizeFileNamePart(testRunResult.test.title);\n const browserName = testRunResult.browser.name;\n\n const jsonFileNameRaw = `${suiteTitle ? suiteTitle + '-' : ''}${testTitle}.json`;\n const jsonFilePathRaw = path.join(pluginConfig.outputReportDir, specName, browserName, jsonFileNameRaw);\n const reportRaw = {\n events: testRunResult.recorderEvents,\n metadata: {\n runner: testRunResult.runner,\n spec: testRunResult.spec,\n suite: testRunResult.test.suite,\n test: testRunResult.test,\n browser: testRunResult.browser,\n }\n };\n fs.mkdirSync(pluginConfig.outputReportDir, { recursive: true });\n fs.mkdirSync(path.dirname(jsonFilePathRaw), { recursive: true });\n fs.writeFileSync(jsonFilePathRaw, JSON.stringify(reportRaw, null, 2), 'utf-8');\n console.log(`[ui-coverage] Saved report to ${jsonFilePathRaw}`);\n\n // Агрегация: дописываем в один общий файл массивом\n try {\n const aggregatePath = path.join(pluginConfig.outputReportDir, \"ui-coverage-aggregated.json\");\n const current = readJsonArraySafe(aggregatePath);\n current.push(reportRaw);\n writeFileAtomic(aggregatePath, JSON.stringify(current, null, 2));\n console.log(`[ui-coverage] Updated aggregate: ${aggregatePath}`);\n } catch (e) {\n console.warn('[ui-coverage] Failed to update aggregate report:', e);\n }\n\n return null;\n }\n });\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsB,mBACtBC,EAAoB,iBAGhBC,EAEA,CACF,gBAAiB,yBACnB,EAEA,SAASC,EAAqBC,EAAkC,CAC9D,OAAQA,GAAQ,IACb,KAAK,EACL,QAAQ,oBAAqB,GAAG,EAChC,QAAQ,MAAO,GAAG,EAClB,QAAQ,SAAU,EAAE,CACzB,CAGA,SAASC,EAAgBC,EAAkBC,EAAc,CACvD,IAAMC,EAAW,UAAQF,CAAQ,EAC3BG,EAAW,OAAKD,EAAK,IAAS,WAASF,CAAQ,SAAS,QAAQ,OAAO,KAAK,IAAI,GAAG,EACtF,YAAUE,EAAK,CAAE,UAAW,EAAK,CAAC,EAClC,gBAAcC,EAAKF,EAAM,OAAO,EAChC,aAAWE,EAAKH,CAAQ,CAC7B,CAEA,SAASI,EAAkBJ,EAA6B,CACtD,GAAI,CACF,GAAI,CAAI,aAAWA,CAAQ,EAAG,MAAO,CAAC,EACtC,IAAMK,EAAU,eAAaL,EAAU,OAAO,EAAE,KAAK,EACrD,GAAI,CAACK,EAAM,MAAO,CAAC,EAEnB,IAAMC,EAAS,KAAK,MAAMD,CAAI,EAC9B,OAAO,MAAM,QAAQC,CAAM,EAAIA,EAAS,CAAC,CAC3C,MAAE,CACA,MAAO,CAAC,CACV,CACF,CAEe,SAARd,EAA0Ce,EAA0BC,EAAuC,CAChHZ,EAAe,CAAE,GAAGA,EAAc,GAAGY,CAAO,
|
|
1
|
+
{"version":3,"sources":["../src/reporter.ts"],"sourcesContent":["import * as path from 'path';\nimport * as fs from 'fs';\nimport type { TestRunResult } from './types';\n\nlet pluginConfig: {\n outputReportDir: string;\n} = {\n outputReportDir: 'test-results/cypress/ui'\n};\n\nfunction sanitizeFileNamePart(name: string | undefined): string {\n return (name ?? '')\n .trim()\n .replace(/[\\s:/\\\\<>|\"'?*]+/g, '-')\n .replace(/-+/g, '-')\n .replace(/^-|-$/g, '');\n}\n\n\nfunction writeFileAtomic(filePath: string, data: string) {\n const dir = path.dirname(filePath);\n const tmp = path.join(dir, `.${path.basename(filePath)}.tmp-${process.pid}-${Date.now()}`);\n fs.mkdirSync(dir, { recursive: true });\n fs.writeFileSync(tmp, data, 'utf-8');\n fs.renameSync(tmp, filePath);\n}\n\nfunction readJsonArraySafe(filePath: string): unknown[] {\n try {\n if (!fs.existsSync(filePath)) return [];\n const text = fs.readFileSync(filePath, 'utf-8').trim();\n if (!text) return [];\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const parsed = JSON.parse(text);\n return Array.isArray(parsed) ? parsed : [];\n } catch {\n return [];\n }\n}\n\nexport default function registerRRWebReportTasks(on: Cypress.PluginEvents, config?: Partial<typeof pluginConfig>) {\n pluginConfig = { ...pluginConfig, ...config };\n\n // Clear aggregate report from previous run so it only contains\n // results from the current run.\n const aggregatePath = path.join(pluginConfig.outputReportDir, \"ui-coverage-aggregated.json\");\n if (fs.existsSync(aggregatePath)) {\n fs.unlinkSync(aggregatePath);\n }\n\n on('task', {\n saveRRWebReport(reportData: {testRunResult: TestRunResult}) {\n const { testRunResult } = reportData;\n\n const specName = sanitizeFileNamePart(testRunResult.spec.name);\n const suiteTitle = sanitizeFileNamePart(testRunResult.test.suite?.title);\n const testTitle = sanitizeFileNamePart(testRunResult.test.title);\n const browserName = testRunResult.browser.name;\n\n const jsonFileNameRaw = `${suiteTitle ? suiteTitle + '-' : ''}${testTitle}.json`;\n const jsonFilePathRaw = path.join(pluginConfig.outputReportDir, specName, browserName, jsonFileNameRaw);\n const reportRaw = {\n events: testRunResult.recorderEvents,\n metadata: {\n runner: testRunResult.runner,\n spec: testRunResult.spec,\n suite: testRunResult.test.suite,\n test: testRunResult.test,\n browser: testRunResult.browser,\n }\n };\n fs.mkdirSync(pluginConfig.outputReportDir, { recursive: true });\n fs.mkdirSync(path.dirname(jsonFilePathRaw), { recursive: true });\n fs.writeFileSync(jsonFilePathRaw, JSON.stringify(reportRaw, null, 2), 'utf-8');\n console.log(`[ui-coverage] Saved report to ${jsonFilePathRaw}`);\n\n // Агрегация: дописываем в один общий файл массивом\n try {\n const aggregatePath = path.join(pluginConfig.outputReportDir, \"ui-coverage-aggregated.json\");\n const current = readJsonArraySafe(aggregatePath);\n current.push(reportRaw);\n writeFileAtomic(aggregatePath, JSON.stringify(current, null, 2));\n console.log(`[ui-coverage] Updated aggregate: ${aggregatePath}`);\n } catch (e) {\n console.warn('[ui-coverage] Failed to update aggregate report:', e);\n }\n\n return null;\n }\n });\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsB,mBACtBC,EAAoB,iBAGhBC,EAEA,CACF,gBAAiB,yBACnB,EAEA,SAASC,EAAqBC,EAAkC,CAC9D,OAAQA,GAAQ,IACb,KAAK,EACL,QAAQ,oBAAqB,GAAG,EAChC,QAAQ,MAAO,GAAG,EAClB,QAAQ,SAAU,EAAE,CACzB,CAGA,SAASC,EAAgBC,EAAkBC,EAAc,CACvD,IAAMC,EAAW,UAAQF,CAAQ,EAC3BG,EAAW,OAAKD,EAAK,IAAS,WAASF,CAAQ,SAAS,QAAQ,OAAO,KAAK,IAAI,GAAG,EACtF,YAAUE,EAAK,CAAE,UAAW,EAAK,CAAC,EAClC,gBAAcC,EAAKF,EAAM,OAAO,EAChC,aAAWE,EAAKH,CAAQ,CAC7B,CAEA,SAASI,EAAkBJ,EAA6B,CACtD,GAAI,CACF,GAAI,CAAI,aAAWA,CAAQ,EAAG,MAAO,CAAC,EACtC,IAAMK,EAAU,eAAaL,EAAU,OAAO,EAAE,KAAK,EACrD,GAAI,CAACK,EAAM,MAAO,CAAC,EAEnB,IAAMC,EAAS,KAAK,MAAMD,CAAI,EAC9B,OAAO,MAAM,QAAQC,CAAM,EAAIA,EAAS,CAAC,CAC3C,MAAE,CACA,MAAO,CAAC,CACV,CACF,CAEe,SAARd,EAA0Ce,EAA0BC,EAAuC,CAChHZ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writeFileAtomic","filePath","data","dir","tmp","readJsonArraySafe","text","parsed","on","config","aggregatePath","reportData","testRunResult","specName","suiteTitle","testTitle","browserName","jsonFileNameRaw","jsonFilePathRaw","reportRaw","current","e"]}
|
package/dist/reporter.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as s from"path";import*as
|
|
1
|
+
import*as s from"path";import*as t from"fs";var i={outputReportDir:"test-results/cypress/ui"};function p(e){return(e??"").trim().replace(/[\s:/\\<>|"'?*]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function S(e,o){let n=s.dirname(e),u=s.join(n,`.${s.basename(e)}.tmp-${process.pid}-${Date.now()}`);t.mkdirSync(n,{recursive:!0}),t.writeFileSync(u,o,"utf-8"),t.renameSync(u,e)}function v(e){try{if(!t.existsSync(e))return[];let o=t.readFileSync(e,"utf-8").trim();if(!o)return[];let n=JSON.parse(o);return Array.isArray(n)?n:[]}catch{return[]}}function w(e,o){i={...i,...o};let n=s.join(i.outputReportDir,"ui-coverage-aggregated.json");t.existsSync(n)&&t.unlinkSync(n),e("task",{saveRRWebReport(u){let{testRunResult:r}=u,m=p(r.spec.name),g=p(r.test.suite?.title),R=p(r.test.title),d=r.browser.name,y=`${g?g+"-":""}${R}.json`,c=s.join(i.outputReportDir,m,d,y),l={events:r.recorderEvents,metadata:{runner:r.runner,spec:r.spec,suite:r.test.suite,test:r.test,browser:r.browser}};t.mkdirSync(i.outputReportDir,{recursive:!0}),t.mkdirSync(s.dirname(c),{recursive:!0}),t.writeFileSync(c,JSON.stringify(l,null,2),"utf-8"),console.log(`[ui-coverage] Saved report to ${c}`);try{let a=s.join(i.outputReportDir,"ui-coverage-aggregated.json"),f=v(a);f.push(l),S(a,JSON.stringify(f,null,2)),console.log(`[ui-coverage] Updated aggregate: ${a}`)}catch(a){console.warn("[ui-coverage] Failed to update aggregate report:",a)}return null}})}export{w as default};
|
|
2
2
|
//# sourceMappingURL=reporter.mjs.map
|
package/dist/reporter.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/reporter.ts"],"sourcesContent":["import * as path from 'path';\nimport * as fs from 'fs';\nimport type { TestRunResult } from './types';\n\nlet pluginConfig: {\n outputReportDir: string;\n} = {\n outputReportDir: 'test-results/cypress/ui'\n};\n\nfunction sanitizeFileNamePart(name: string | undefined): string {\n return (name ?? '')\n .trim()\n .replace(/[\\s:/\\\\<>|\"'?*]+/g, '-')\n .replace(/-+/g, '-')\n .replace(/^-|-$/g, '');\n}\n\n\nfunction writeFileAtomic(filePath: string, data: string) {\n const dir = path.dirname(filePath);\n const tmp = path.join(dir, `.${path.basename(filePath)}.tmp-${process.pid}-${Date.now()}`);\n fs.mkdirSync(dir, { recursive: true });\n fs.writeFileSync(tmp, data, 'utf-8');\n fs.renameSync(tmp, filePath);\n}\n\nfunction readJsonArraySafe(filePath: string): unknown[] {\n try {\n if (!fs.existsSync(filePath)) return [];\n const text = fs.readFileSync(filePath, 'utf-8').trim();\n if (!text) return [];\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const parsed = JSON.parse(text);\n return Array.isArray(parsed) ? parsed : [];\n } catch {\n return [];\n }\n}\n\nexport default function registerRRWebReportTasks(on: Cypress.PluginEvents, config?: Partial<typeof pluginConfig>) {\n pluginConfig = { ...pluginConfig, ...config };\n\n on('task', {\n saveRRWebReport(reportData: {testRunResult: TestRunResult}) {\n const { testRunResult } = reportData;\n\n const specName = sanitizeFileNamePart(testRunResult.spec.name);\n const suiteTitle = sanitizeFileNamePart(testRunResult.test.suite?.title);\n const testTitle = sanitizeFileNamePart(testRunResult.test.title);\n const browserName = testRunResult.browser.name;\n\n const jsonFileNameRaw = `${suiteTitle ? suiteTitle + '-' : ''}${testTitle}.json`;\n const jsonFilePathRaw = path.join(pluginConfig.outputReportDir, specName, browserName, jsonFileNameRaw);\n const reportRaw = {\n events: testRunResult.recorderEvents,\n metadata: {\n runner: testRunResult.runner,\n spec: testRunResult.spec,\n suite: testRunResult.test.suite,\n test: testRunResult.test,\n browser: testRunResult.browser,\n }\n };\n fs.mkdirSync(pluginConfig.outputReportDir, { recursive: true });\n fs.mkdirSync(path.dirname(jsonFilePathRaw), { recursive: true });\n fs.writeFileSync(jsonFilePathRaw, JSON.stringify(reportRaw, null, 2), 'utf-8');\n console.log(`[ui-coverage] Saved report to ${jsonFilePathRaw}`);\n\n // Агрегация: дописываем в один общий файл массивом\n try {\n const aggregatePath = path.join(pluginConfig.outputReportDir, \"ui-coverage-aggregated.json\");\n const current = readJsonArraySafe(aggregatePath);\n current.push(reportRaw);\n writeFileAtomic(aggregatePath, JSON.stringify(current, null, 2));\n console.log(`[ui-coverage] Updated aggregate: ${aggregatePath}`);\n } catch (e) {\n console.warn('[ui-coverage] Failed to update aggregate report:', e);\n }\n\n return null;\n }\n });\n}\n"],"mappings":"AAAA,UAAYA,MAAU,OACtB,UAAYC,MAAQ,KAGpB,IAAIC,EAEA,CACF,gBAAiB,yBACnB,EAEA,SAASC,EAAqBC,EAAkC,CAC9D,OAAQA,GAAQ,IACb,KAAK,EACL,QAAQ,oBAAqB,GAAG,EAChC,QAAQ,MAAO,GAAG,EAClB,QAAQ,SAAU,EAAE,CACzB,CAGA,SAASC,EAAgBC,EAAkBC,EAAc,CACvD,IAAMC,EAAW,UAAQF,CAAQ,EAC3BG,EAAW,OAAKD,EAAK,IAAS,WAASF,CAAQ,SAAS,QAAQ,OAAO,KAAK,IAAI,GAAG,EACtF,YAAUE,EAAK,CAAE,UAAW,EAAK,CAAC,EAClC,gBAAcC,EAAKF,EAAM,OAAO,EAChC,aAAWE,EAAKH,CAAQ,CAC7B,CAEA,SAASI,EAAkBJ,EAA6B,CACtD,GAAI,CACF,GAAI,CAAI,aAAWA,CAAQ,EAAG,MAAO,CAAC,EACtC,IAAMK,EAAU,eAAaL,EAAU,OAAO,EAAE,KAAK,EACrD,GAAI,CAACK,EAAM,MAAO,CAAC,EAEnB,IAAMC,EAAS,KAAK,MAAMD,CAAI,EAC9B,OAAO,MAAM,QAAQC,CAAM,EAAIA,EAAS,CAAC,CAC3C,MAAE,CACA,MAAO,CAAC,CACV,CACF,CAEe,SAARC,EAA0CC,EAA0BC,EAAuC,CAChHb,EAAe,CAAE,GAAGA,EAAc,GAAGa,CAAO,
|
|
1
|
+
{"version":3,"sources":["../src/reporter.ts"],"sourcesContent":["import * as path from 'path';\nimport * as fs from 'fs';\nimport type { TestRunResult } from './types';\n\nlet pluginConfig: {\n outputReportDir: string;\n} = {\n outputReportDir: 'test-results/cypress/ui'\n};\n\nfunction sanitizeFileNamePart(name: string | undefined): string {\n return (name ?? '')\n .trim()\n .replace(/[\\s:/\\\\<>|\"'?*]+/g, '-')\n .replace(/-+/g, '-')\n .replace(/^-|-$/g, '');\n}\n\n\nfunction writeFileAtomic(filePath: string, data: string) {\n const dir = path.dirname(filePath);\n const tmp = path.join(dir, `.${path.basename(filePath)}.tmp-${process.pid}-${Date.now()}`);\n fs.mkdirSync(dir, { recursive: true });\n fs.writeFileSync(tmp, data, 'utf-8');\n fs.renameSync(tmp, filePath);\n}\n\nfunction readJsonArraySafe(filePath: string): unknown[] {\n try {\n if (!fs.existsSync(filePath)) return [];\n const text = fs.readFileSync(filePath, 'utf-8').trim();\n if (!text) return [];\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const parsed = JSON.parse(text);\n return Array.isArray(parsed) ? parsed : [];\n } catch {\n return [];\n }\n}\n\nexport default function registerRRWebReportTasks(on: Cypress.PluginEvents, config?: Partial<typeof pluginConfig>) {\n pluginConfig = { ...pluginConfig, ...config };\n\n // Clear aggregate report from previous run so it only contains\n // results from the current run.\n const aggregatePath = path.join(pluginConfig.outputReportDir, \"ui-coverage-aggregated.json\");\n if (fs.existsSync(aggregatePath)) {\n fs.unlinkSync(aggregatePath);\n }\n\n on('task', {\n saveRRWebReport(reportData: {testRunResult: TestRunResult}) {\n const { testRunResult } = reportData;\n\n const specName = sanitizeFileNamePart(testRunResult.spec.name);\n const suiteTitle = sanitizeFileNamePart(testRunResult.test.suite?.title);\n const testTitle = sanitizeFileNamePart(testRunResult.test.title);\n const browserName = testRunResult.browser.name;\n\n const jsonFileNameRaw = `${suiteTitle ? suiteTitle + '-' : ''}${testTitle}.json`;\n const jsonFilePathRaw = path.join(pluginConfig.outputReportDir, specName, browserName, jsonFileNameRaw);\n const reportRaw = {\n events: testRunResult.recorderEvents,\n metadata: {\n runner: testRunResult.runner,\n spec: testRunResult.spec,\n suite: testRunResult.test.suite,\n test: testRunResult.test,\n browser: testRunResult.browser,\n }\n };\n fs.mkdirSync(pluginConfig.outputReportDir, { recursive: true });\n fs.mkdirSync(path.dirname(jsonFilePathRaw), { recursive: true });\n fs.writeFileSync(jsonFilePathRaw, JSON.stringify(reportRaw, null, 2), 'utf-8');\n console.log(`[ui-coverage] Saved report to ${jsonFilePathRaw}`);\n\n // Агрегация: дописываем в один общий файл массивом\n try {\n const aggregatePath = path.join(pluginConfig.outputReportDir, \"ui-coverage-aggregated.json\");\n const current = readJsonArraySafe(aggregatePath);\n current.push(reportRaw);\n writeFileAtomic(aggregatePath, JSON.stringify(current, null, 2));\n console.log(`[ui-coverage] Updated aggregate: ${aggregatePath}`);\n } catch (e) {\n console.warn('[ui-coverage] Failed to update aggregate report:', e);\n }\n\n return null;\n }\n });\n}\n"],"mappings":"AAAA,UAAYA,MAAU,OACtB,UAAYC,MAAQ,KAGpB,IAAIC,EAEA,CACF,gBAAiB,yBACnB,EAEA,SAASC,EAAqBC,EAAkC,CAC9D,OAAQA,GAAQ,IACb,KAAK,EACL,QAAQ,oBAAqB,GAAG,EAChC,QAAQ,MAAO,GAAG,EAClB,QAAQ,SAAU,EAAE,CACzB,CAGA,SAASC,EAAgBC,EAAkBC,EAAc,CACvD,IAAMC,EAAW,UAAQF,CAAQ,EAC3BG,EAAW,OAAKD,EAAK,IAAS,WAASF,CAAQ,SAAS,QAAQ,OAAO,KAAK,IAAI,GAAG,EACtF,YAAUE,EAAK,CAAE,UAAW,EAAK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AAG,OAAO,EAC7E,QAAQ,IAAI,iCAAiCD,GAAiB,EAG9D,GAAI,CACF,IAAMR,EAAqB,OAAKd,EAAa,gBAAiB,6BAA6B,EACrFwB,EAAUhB,EAAkBM,CAAa,EAC/CU,EAAQ,KAAKD,CAAS,EACtBpB,EAAgBW,EAAe,KAAK,UAAUU,EAAS,KAAM,CAAC,CAAC,EAC/D,QAAQ,IAAI,oCAAoCV,GAAe,CACjE,OAASW,EAAP,CACA,QAAQ,KAAK,mDAAoDA,CAAC,CACpE,CAEA,OAAO,IACT,CACF,CAAC,CACH","names":["path","fs","pluginConfig","sanitizeFileNamePart","name","writeFileAtomic","filePath","data","dir","tmp","readJsonArraySafe","text","parsed","registerRRWebReportTasks","on","config","aggregatePath","reportData","testRunResult","specName","suiteTitle","testTitle","browserName","jsonFileNameRaw","jsonFilePathRaw","reportRaw","current","e"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsurify-testmap/rrweb-cypress-plugin",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0-alpha.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"typescript": "^5.8.3"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@appsurify-testmap/rrweb": "^3.
|
|
52
|
-
"@appsurify-testmap/rrweb-plugin-sequential-id-record": "^3.
|
|
53
|
-
"@appsurify-testmap/rrweb-snapshot": "^3.
|
|
54
|
-
"@appsurify-testmap/rrweb-types": "^3.
|
|
51
|
+
"@appsurify-testmap/rrweb": "^3.5.0-alpha.1",
|
|
52
|
+
"@appsurify-testmap/rrweb-plugin-sequential-id-record": "^3.5.0-alpha.1",
|
|
53
|
+
"@appsurify-testmap/rrweb-snapshot": "^3.5.0-alpha.1",
|
|
54
|
+
"@appsurify-testmap/rrweb-types": "^3.5.0-alpha.1"
|
|
55
55
|
}
|
|
56
56
|
}
|