@appsurify-testmap/rrweb-cypress-plugin 2.1.1-alpha.7 → 2.1.2-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/browser/runtime.ts","../src/browser/utils.ts","../src/recorder/RRWebRecorder.ts","../src/recorder/index.ts","../src/browser/events/cypress.ts","../src/browser/events/mocha.ts","../src/browser/events/index.ts","../src/browser/index.ts"],"sourcesContent":["import { initializeTestmap } from './browser'\n\nexport { initializeTestmap };\n","import type { TestRunContext } from '../types';\n\n\nexport const testContexts = new Map<string, TestRunContext>();\n\nexport function setCurrentTestContext(key: string, ctx: TestRunContext): void {\n testContexts.set(key, ctx);\n}\n\nexport function getCurrentTestContext(key: string): TestRunContext | undefined {\n return testContexts.get(key);\n}\n\nexport function clearTestContext(key: string): void {\n testContexts.delete(key);\n}\n\n\n","/// <reference types=\"cypress\" />\nimport type {\n TestSuiteInfo,\n TestInfo,\n TestInfoInvocationDetails,\n TestRunResult,\n TestRunContext, SpecInfo, BrowserInfo,\n} from '../types';\n\n\nexport function safeSerializeArray(arr: unknown[]): (string | number | boolean | null)[] {\n return arr\n .filter((value): value is string | number | boolean | null => {\n // Удаляем { log: false }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof value === 'object' && value !== null && 'log' in value && (value as any).log === false) {\n return false;\n }\n\n // Пропускаем только примитивы\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n value === null\n );\n });\n}\n\nexport function buildSelector(subject: JQuery<HTMLElement> | undefined): string | null {\n const el = subject?.[0];\n if (!el) return null;\n\n const tag = el.tagName.toLowerCase();\n const id = el.id ? `#${el.id}` : '';\n const classSelector = Array.from(el.classList)\n .map(cls => `.${cls}`)\n .join('');\n\n return `${tag}${id}${classSelector}`;\n}\n\nexport function getTestKey(test: Mocha.Test | { titlePath: () => string[] }): string {\n return test.titlePath().join(' > ');\n}\n\nexport function getSizeInBytes(data: unknown): number {\n let str: string;\n\n if (typeof data === 'string') {\n str = data;\n } else {\n try {\n str = JSON.stringify(data);\n } catch {\n return 0;\n }\n }\n\n return new TextEncoder().encode(str).length;\n}\n\nexport function formatBytes(bytes: number): string {\n const kb = bytes / 1024;\n const mb = kb / 1024;\n\n if (mb >= 1) return `${mb.toFixed(2)} MB`;\n if (kb >= 1) return `${kb.toFixed(2)} KB`;\n return `${bytes} B`;\n}\n\nexport async function createHash(data: object): Promise<string> {\n const json = JSON.stringify(data);\n const buffer = new TextEncoder().encode(json);\n const hashBuffer = await crypto.subtle.digest('SHA-256', buffer);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n}\n\n\nexport function prepareTestSuite(suite: Mocha.Suite & {id: string, type: string} | undefined): TestSuiteInfo | undefined {\n if (!suite) return undefined;\n\n\n return {\n id: suite.id,\n file: suite.file,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(suite.invocationDetails),\n pending: suite.pending,\n root: suite.root,\n title: suite.title,\n type: suite.type,\n }\n}\n\nexport function prepareTest(test: Mocha.Test & {id: string, type: string, parent: Mocha.Suite | undefined}): TestInfo {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const suite = prepareTestSuite(test.parent);\n console.log(\"Suite\", suite);\n return {\n suite: suite,\n file: test.file,\n duration: test.duration,\n id: test.id,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending,\n state: test.state,\n sync: test.sync,\n timedOut: test.timedOut,\n title: test.title,\n titlePath: test.titlePath(),\n fullTitle: test.fullTitle(),\n type: test.type,\n }\n}\n\nexport function safeInvocationDetails(details?: Partial<TestInfoInvocationDetails>): TestInfoInvocationDetails {\n return {\n absoluteFile: details?.absoluteFile ?? '',\n column: details?.column ?? 0,\n fileUrl: details?.fileUrl ?? '',\n function: details?.function ?? '',\n line: details?.line ?? 0,\n originalFile: details?.originalFile ?? '',\n relativeFile: details?.relativeFile ?? '',\n };\n}\n\n\nexport function mapTestRunContextToResult(ctx: TestRunContext): TestRunResult {\n\n return {\n 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 } from '@appsurify-testmap/rrweb';\nimport type { Mirror } from '@appsurify-testmap/rrweb-snapshot';\nimport { getRecordSequentialIdPlugin } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport rrSrc from './releases/rrweb-record.umd.cjs.src';\n\nimport type { RecorderContext, Recorder, RecorderEvent } from './types';\n\ninterface WindowWithRRWeb extends Window {\n rrweb?: {\n record: typeof record | null;\n };\n}\n\nexport class RRWebRecorder implements Recorder {\n private recordFn: typeof record | null = null;\n private stopFn: (() => void) | undefined | null = null;\n private targetWindow: Window | null = null;\n private context: RecorderContext;\n private eventCounter = 0;\n private events: RecorderEvent[] = [];\n\n private pendingEvents: {\n tag: string;\n payload: Record<string, unknown>;\n }[] = [];\n\n constructor() {\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(`🟡 [rrweb] Failed to load rrweb.record`);\n return;\n }\n\n this.recordFn = recheck.record;\n }\n\n public start() {\n if (!this.targetWindow || !this.recordFn) {\n console.warn(`🟡 [rrweb] Not ready to start`);\n return;\n }\n\n if (this.stopFn) {\n console.warn(`🟡 [rrweb] Already recording`);\n return;\n }\n\n this.stopFn = this.recordFn({\n emit: (event: RecorderEvent) => this.handleEmit(event),\n checkoutEveryNvm: 10,\n plugins: [\n getRecordSequentialIdPlugin({\n key: 'id',\n getId: () => ++this.eventCounter,\n }),\n ],\n // includeAttribute: /data-(cy|test(id)?|cypress|highlight-el|cypress-el)/i,\n maskInputOptions: { password: true },\n slimDOMOptions: 'all',\n inlineStylesheet: true,\n sampling: {\n mousemove: false,\n mouseInteraction: {\n MouseUp: false,\n MouseDown: false,\n Click: true,\n ContextMenu: true,\n DblClick: true,\n Focus: true,\n Blur: true,\n TouchStart: false,\n TouchEnd: false,\n },\n scroll: 100,\n media: 100,\n input: 'last',\n canvas: 'all',\n visibility: {\n mode: 'debounce',\n debounce: 50,\n threshold: 0.5,\n sensitivity: 0.05,\n rafThrottle: 50\n }\n },\n recordDOM: true,\n recordCanvas: true,\n collectFonts: true,\n inlineImages: true,\n flushCustomEvent: 'after',\n // recordAfter: 'DOMContentStabilized',\n recordAfter: 'DOMContentLoaded',\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.warn(`[rrweb] 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.warn(`[rrweb] 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.warn(`[rrweb] 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 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","import { RRWebRecorder } from './RRWebRecorder';\n\n\nexport default RRWebRecorder;\n","/// <reference types=\"cypress\" />\n\nimport {getCurrentTestContext, setCurrentTestContext} from '../runtime';\nimport {safeSerializeArray, buildSelector, getTestKey, mapTestRunContextToResult} from '../utils';\nimport RRWebRecorder from '../../recorder';\nimport type {RecorderEvent} from '../../recorder/types';\nimport type {TestRunContext} from '../../types';\n\nconst recorder = new RRWebRecorder();\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 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.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);\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\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\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\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\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\n event.data.payload.type = liveCommand?.get('type');\n\n\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\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 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', testRunResult, { log: false });\n } catch (e) {\n console.error(`🟡 [${Date.now()}] [cypress] afterEach:saveRRWebReport`, e);\n }\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 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);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const subject = liveCommand?.get('subject')\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-argument\n const selector = subject?.selector ?? buildSelector(subject);\n\n const mirror = recorder.getMirror();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n const element = mirror?.getMeta(subject?.[0]);\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.element = {\n ...element,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n selector,\n childNodes: []\n };\n }\n },\n });\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogAdded = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`🟡 [${Date.now()}] [cypress] onLogAdded`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogChanged = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`🟡 [${Date.now()}] [cypress] onLogChanged`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowBeforeUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`🟡 [${Date.now()}] [cypress] onWindowBeforeUnload`, event);\n // try {\n // recorder.stop();\n // // eslint-disable-next-line @typescript-eslint/no-unused-vars\n // } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`🟡 [${Date.now()}] [cypress] onWindowUnload`, event);\n try {\n recorder.stop();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowBeforeLoad = (win: Cypress.AUTWindow) => {\n // console.debug(`🟡 [${Date.now()}] [cypress] onWindowBeforeLoad`, win);\n recorder.inject(win);\n // recorder.start();\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n ctx.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\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};\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\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 // 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 // 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 waitAndSnapshot = async () => {\n // if (typeof ctx.waitForPaint === 'function' && !ctx.paintComplete) {\n // console.log(`${Date.now()} [cypress] command:end:waiting for paint...`);\n // await ctx.waitForPaint();\n // ctx.paintComplete = true;\n // // recorder.addCustomEvent(`${command.attributes.name}`, {\n // // id: command.attributes.id,\n // // });\n // console.log(`${Date.now()} [cypress] command:end:paint complete`);\n // }\n // }\n // void waitAndSnapshot();\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\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandQueueEnd = () => {\n // console.debug(`🟡 [${Date.now()}] [cypress] onCommandQueueEnd`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onFail = (error: Cypress.CypressError, mocha: Mocha.Runnable) => {\n // console.debug(`🟡 [${Date.now()}] [cypress] onFail`, {error, mocha});\n throw error;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/require-await\nconst onTestAfterRun = async (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n // console.debug(`🟡 [${Date.now()}] [cypress] onTestAfterRun`, attributes, test);\n recorder.stop();\n\n // const testKey = getTestKey(test);\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n //\n // console.debug(`🟡 [${Date.now()}] [cypress] onTestAfterRun`, ctx.recorderEvents);\n};\n\n\n","/// <reference types=\"cypress\" />\n\n\nexport const registerMochaEventListeners = () => {\n // ⚠️ Плохой стиль, отключает всю типизацию\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((Cypress as any).mocha.getRunner() as Mocha.Runner)\n .on('hook', onHook);\n};\n\nconst onHook = () => {\n // console.debug(`🟡 [${Date.now()}] [mocha] onHook:`);\n};\n\nexport const injectMochaHookFunctions = () => {\n\n beforeEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] beforeEach:`);\n });\n\n afterEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] afterEach:`);\n // const currentTest = Cypress.currentTest;\n // const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n //\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n // const serializedReport = serializeTestRunContextToJson(ctx);\n // console.log(`${Date.now()} [afterEach]`, currentTest, serializedReport);\n // cy.task('saveSnapshotReport', serializedReport)\n });\n\n};\n","import { registerCypressEventListeners } from \"./cypress\";\nimport { registerMochaEventListeners, injectMochaHookFunctions } from \"./mocha\";\n\nexport const enableTestmap = () => {\n registerCypressEventListeners();\n registerMochaEventListeners();\n injectMochaHookFunctions();\n};\n","import { enableTestmap } from './events';\n\nexport const initializeTestmap = () => {\n // if (isTestmap().Initialized) {\n // return;\n // }\n enableTestmap();\n}\n"],"mappings":"yaAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,uBAAAE,IAAA,eAAAC,EAAAH,ICGO,IAAMI,EAAe,IAAI,IAEzB,SAASC,EAAsBC,EAAaC,EAA2B,CAC5EH,EAAa,IAAIE,EAAKC,CAAG,CAC3B,CAEO,SAASC,EAAsBF,EAAyC,CAC7E,OAAOF,EAAa,IAAIE,CAAG,CAC7B,CCDO,SAASG,EAAmBC,EAAsD,CACvF,OAAOA,EACJ,OAAQC,GAGH,OAAOA,GAAU,UAAYA,IAAU,MAAQ,QAASA,GAAUA,EAAc,MAAQ,GACnF,GAKP,OAAOA,GAAU,UACjB,OAAOA,GAA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EAAS,eAAe,GAAG6C,EAAQ,WAAW,OAAQ,CAElD,GAAIA,EAAQ,WAAW,EAC3B,CAAC,CACL,EAIM/B,EAAuB+B,GAAkC,CAE/D,EAGM5B,EAAoB,IAAM,CAEhC,EAIMC,GAAS,CAAC6B,EAA6BC,IAA0B,CAEnE,MAAMD,CACV,EAKMhC,GAAiB,MAAOe,EAAgCC,IAAqB,CAE/E/B,EAAS,KAAK,CAOlB,ECxcO,IAAMiD,EAA8B,IAAM,CAG7C,QAAgB,MAAM,UAAU,EAC7B,GAAG,OAAQC,EAAM,CACxB,EAEMA,GAAS,IAAM,CAErB,EAEaC,EAA2B,IAAM,CAE5C,WAAW,GAAI,IAAK,CAEpB,CAAC,EAED,UAAU,GAAI,IAAK,CAUnB,CAAC,CAEH,EC7BO,IAAMC,EAAgB,IAAM,CACjCC,EAA8B,EAC9BC,EAA4B,EAC5BC,EAAyB,CAC3B,ECLO,IAAMC,EAAoB,IAAM,CAInCC,EAAc,CAClB","names":["src_exports","__export","initializeTestmap","__toCommonJS","testContexts","setCurrentTestContext","key","ctx","getCurrentTestContext","safeSerializeArray","arr","value","buildSelector","subject","el","tag","id","classSelector","cls","getTestKey","test","prepareTestSuite","suite","safeInvocationDetails","safeInvocationDetails","details","mapTestRunContextToResult","ctx","mapSpec","mapBrowser","mapTest","spec","browser","test","prepareTestSuite","import_rrweb_plugin_sequential_id_record","RRWebRecorder","event","rrEvent","win","w","script","rrweb_record_umd_cjs_default","recheck","stillPending","evt","tag","payload","error","ctx","value","recorder_default","RRWebRecorder","recorder","recorder_default","registerCypressEventListeners","onTestBeforeRun","onLogAdded","onLogChanged","onWindowBeforeLoad","onWindowBeforeUnload","onWindowUnload","onWindowLoad","onCommandEnqueued","onCommandStart","onCommandEnd","onCommandRetry","onSkippedCommandEnd","onTestAfterRun","onCommandFailed","onCommandQueueEnd","onFail","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","event","liveCommand","safeSerializeArray","testRunResult","mapTestRunContextToResult","e","attributes","test","testRunContext","setCurrentTestContext","subject","selector","buildSelector","element","log","win","value","resolve","captureAfterPaint","safeResolve","called","command","err","error","mocha","registerMochaEventListeners","onHook","injectMochaHookFunctions","enableTestmap","registerCypressEventListeners","registerMochaEventListeners","injectMochaHookFunctions","initializeTestmap","enableTestmap"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/browser/runtime.ts","../src/browser/utils.ts","../src/recorder/RRWebRecorder.ts","../src/recorder/index.ts","../src/browser/events/cypress.ts","../src/browser/events/mocha.ts","../src/browser/events/index.ts","../src/browser/index.ts"],"sourcesContent":["import { initializeTestmap } from './browser'\n\nexport { initializeTestmap };\n","import type { TestRunContext } from '../types';\n\n\nexport const testContexts = new Map<string, TestRunContext>();\n\nexport function setCurrentTestContext(key: string, ctx: TestRunContext): void {\n testContexts.set(key, ctx);\n}\n\nexport function getCurrentTestContext(key: string): TestRunContext | undefined {\n return testContexts.get(key);\n}\n\nexport function clearTestContext(key: string): void {\n testContexts.delete(key);\n}\n\n\n","/// <reference types=\"cypress\" />\nimport type {\n TestSuiteInfo,\n TestInfo,\n TestInfoInvocationDetails,\n TestRunResult,\n TestRunContext, SpecInfo, BrowserInfo,\n} from '../types';\n\n\nexport function safeSerializeArray(arr: unknown[]): (string | number | boolean | null)[] {\n return arr\n .filter((value): value is string | number | boolean | null => {\n // Удаляем { log: false }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof value === 'object' && value !== null && 'log' in value && (value as any).log === false) {\n return false;\n }\n\n // Пропускаем только примитивы\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n value === null\n );\n });\n}\n\nexport function buildSelector(subject: JQuery<HTMLElement> | undefined): string | null {\n const el = subject?.[0];\n if (!el) return null;\n\n const tag = el.tagName.toLowerCase();\n const id = el.id ? `#${el.id}` : '';\n const classSelector = Array.from(el.classList)\n .map(cls => `.${cls}`)\n .join('');\n\n return `${tag}${id}${classSelector}`;\n}\n\nexport function getTestKey(test: Mocha.Test | { titlePath: () => string[] }): string {\n return test.titlePath().join(' > ');\n}\n\nexport function getSizeInBytes(data: unknown): number {\n let str: string;\n\n if (typeof data === 'string') {\n str = data;\n } else {\n try {\n str = JSON.stringify(data);\n } catch {\n return 0;\n }\n }\n\n return new TextEncoder().encode(str).length;\n}\n\nexport function formatBytes(bytes: number): string {\n const kb = bytes / 1024;\n const mb = kb / 1024;\n\n if (mb >= 1) return `${mb.toFixed(2)} MB`;\n if (kb >= 1) return `${kb.toFixed(2)} KB`;\n return `${bytes} B`;\n}\n\nexport async function createHash(data: object): Promise<string> {\n const json = JSON.stringify(data);\n const buffer = new TextEncoder().encode(json);\n const hashBuffer = await crypto.subtle.digest('SHA-256', buffer);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n}\n\n\nexport function prepareTestSuite(suite: Mocha.Suite & {id: string, type: string} | undefined): TestSuiteInfo | undefined {\n if (!suite) return undefined;\n\n\n return {\n id: suite.id,\n file: suite.file,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(suite.invocationDetails),\n pending: suite.pending,\n root: suite.root,\n title: suite.title,\n type: suite.type,\n }\n}\n\nexport function prepareTest(test: Mocha.Test & {id: string, type: string, parent: Mocha.Suite | undefined}): TestInfo {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const suite = prepareTestSuite(test.parent);\n console.log(\"Suite\", suite);\n return {\n suite: suite,\n file: test.file,\n duration: test.duration,\n id: test.id,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending,\n state: test.state,\n sync: test.sync,\n timedOut: test.timedOut,\n title: test.title,\n titlePath: test.titlePath(),\n fullTitle: test.fullTitle(),\n type: test.type,\n }\n}\n\nexport function safeInvocationDetails(details?: Partial<TestInfoInvocationDetails>): TestInfoInvocationDetails {\n return {\n absoluteFile: details?.absoluteFile ?? '',\n column: details?.column ?? 0,\n fileUrl: details?.fileUrl ?? '',\n function: details?.function ?? '',\n line: details?.line ?? 0,\n originalFile: details?.originalFile ?? '',\n relativeFile: details?.relativeFile ?? '',\n };\n}\n\n\nexport function mapTestRunContextToResult(ctx: TestRunContext): TestRunResult {\n\n return {\n runner: ctx.runner,\n spec: mapSpec(ctx.spec),\n browser: mapBrowser(ctx.browser),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n test: mapTest(ctx.test),\n recorderEvents: Array.isArray(ctx.recorderEvents) ? ctx.recorderEvents : [],\n };\n}\n\nexport function mapSpec(spec: Cypress.Spec): SpecInfo {\n return {\n name: spec.name ?? '',\n absolute: spec.absolute ?? '',\n relative: spec.relative ?? '',\n specFilter: spec.specFilter ?? '',\n specType: spec.specType ?? 'integration',\n baseName: spec.baseName ?? '',\n fileExtension: spec.fileExtension ?? '',\n fileName: spec.fileName ?? '',\n id: spec.id ?? '',\n };\n}\n\nexport function mapBrowser(browser: Cypress.Browser): BrowserInfo {\n return {\n name: browser.name ?? '',\n version: browser.version ?? '',\n displayName: browser.displayName ?? '',\n family: browser.family ?? '',\n majorVersion: browser.majorVersion ?? '',\n channel: browser.channel ?? '',\n path: browser.path ?? '',\n };\n}\n\nexport function mapTest(test: Mocha.Test & {id: string}): TestInfo {\n\n\n return {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n suite: prepareTestSuite(test.parent),\n file: test.file ?? '',\n duration: test.duration ?? 0,\n id: test.id ?? '',\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n invocationDetails: safeInvocationDetails(test.invocationDetails),\n pending: test.pending ?? false,\n state: test.state ?? 'unknown',\n sync: test.sync ?? false,\n timedOut: test.timedOut ?? false,\n title: test.title ?? '',\n titlePath: typeof test.titlePath === 'function' ? test.titlePath() : [],\n fullTitle: typeof test.fullTitle === 'function' ? test.fullTitle() : '',\n type: test.type ?? 'test',\n };\n}\n","import type { record, recordOptions } from '@appsurify-testmap/rrweb';\nimport { version as libVersion, utils } from '@appsurify-testmap/rrweb';\nimport type { Mirror } from '@appsurify-testmap/rrweb-snapshot';\nimport { getRecordSequentialIdPlugin } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport rrSrc from './releases/rrweb-record.umd.cjs.src';\n\nimport type { RecorderContext, Recorder, RecorderEvent } from './types';\nimport { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\n\ninterface WindowWithRRWeb extends Window {\n rrweb?: {\n record: typeof record | null;\n };\n}\n\nexport const defaultRecordOptions: recordOptions<eventWithTime> = {\n slimDOMOptions: 'all',\n inlineStylesheet: true,\n recordDOM: true,\n recordCanvas: true,\n collectFonts: true,\n inlineImages: true,\n // checkoutEveryNvm: 10,\n // excludeAttribute: /data-(cy|test(id)?|cypress|highlight-el|cypress-el)/i,\n maskInputOptions: { password: true },\n sampling: {\n mousemove: false,\n mouseInteraction: {\n MouseUp: false,\n MouseDown: false,\n Click: true,\n ContextMenu: true,\n DblClick: true,\n Focus: true,\n Blur: true,\n TouchStart: false,\n TouchEnd: false,\n },\n scroll: 100,\n media: 100,\n input: 'last',\n canvas: 'all',\n visibility: {\n mode: 'debounce',\n debounce: 50,\n threshold: 0.5,\n sensitivity: 0.05,\n rafThrottle: 50\n }\n },\n flushCustomEvent: 'after',\n // recordAfter: 'DOMContentStabilized',\n recordAfter: 'DOMContentLoaded',\n userTriggeredOnInput: true,\n}\n\nfunction deepMerge<T>(target: T, source: Partial<T>): T {\n const result = { ...target };\n\n for (const key in source) {\n const sourceValue = source[key];\n const targetValue = target[key];\n\n if (\n sourceValue &&\n typeof sourceValue === 'object' &&\n !Array.isArray(sourceValue) &&\n targetValue &&\n typeof targetValue === 'object' &&\n !Array.isArray(targetValue)\n ) {\n result[key] = deepMerge(targetValue, sourceValue);\n } else if (sourceValue !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n result[key] = sourceValue as any;\n }\n }\n\n return result;\n}\n\nexport class RRWebRecorder implements Recorder {\n private recordFn: typeof record | null = null;\n private stopFn: (() => void) | undefined | null = null;\n private targetWindow: Window | null = null;\n private context: RecorderContext;\n private eventCounter = 0;\n private events: RecorderEvent[] = [];\n private recordOptions?: recordOptions<eventWithTime>;\n private pendingEvents: {\n tag: string;\n payload: Record<string, unknown>;\n }[] = [];\n private recorderScriptVersion = 'unknown';\n private recorderLibVersion = libVersion;\n\n constructor(options?: recordOptions<eventWithTime>) {\n this.recordOptions = deepMerge(defaultRecordOptions, options ?? {});\n this.context = {\n pushEvent: (event) => this.events.push(event),\n };\n }\n\n private handleEmit(event: RecorderEvent) {\n if (event.type === 0 || event.type === 1) {\n return;\n }\n const rrEvent: RecorderEvent = {\n ...event,\n };\n this.context.pushEvent(rrEvent);\n }\n\n public inject(win: Window) {\n const w = win as WindowWithRRWeb;\n\n this.targetWindow = win;\n\n // const setterHooks = [\n // ['value', HTMLInputElement.prototype, 'input'],\n // ['checked', HTMLInputElement.prototype, 'change'],\n // ['value', HTMLTextAreaElement.prototype, 'input'],\n // ['value', HTMLSelectElement.prototype, 'change'],\n // ['selectedIndex', HTMLSelectElement.prototype, 'change'],\n // ['selected', HTMLOptionElement.prototype, 'change'],\n // ];\n //\n // for (const [prop, proto, eventName] of setterHooks) {\n // utils.hookSetter(proto, prop, {\n // set(this: HTMLElement, val) {\n // setTimeout(() => {\n // if (document.contains(this)) {\n // this.dispatchEvent(new Event(eventName, { bubbles: true }));\n // }\n // }, 0);\n // },\n // });\n //\n // // 🔧 Патч существующих элементов — сразу применим значение, чтобы вызвать setter\n // const tagName =\n // proto === HTMLInputElement.prototype ? 'input' :\n // proto === HTMLTextAreaElement.prototype ? 'textarea' :\n // proto === HTMLSelectElement.prototype ? 'select' :\n // proto === HTMLOptionElement.prototype ? 'option' : '';\n //\n // if (tagName) {\n // const elements = win.document.querySelectorAll(tagName);\n // elements.forEach((el) => {\n // const currentValue = (el as any)[prop];\n // (el as any)[prop] = currentValue; // 🌀 триггер setter\n // });\n // }\n // }\n\n if (w.rrweb) {\n this.recordFn = w.rrweb.record ?? null;\n return;\n }\n\n const script = win.document.createElement('script');\n script.type = 'text/javascript';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n script.innerHTML = rrSrc;\n win.document.head.appendChild(script);\n\n const recheck = (win as WindowWithRRWeb).rrweb;\n if (!recheck || !recheck.record) {\n console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);\n return;\n }\n\n this.recordFn = recheck.record;\n // console.debug(`[${Date.now()}] [recorder] Recorder loaded: `, this.recordFn.getVersion());\n this.recorderScriptVersion = this.recordFn.getVersion();\n }\n\n public start() {\n if (!this.targetWindow || !this.recordFn) {\n console.debug(`[${Date.now()}] [recorder] Not ready to start`);\n return;\n }\n\n if (this.stopFn) {\n console.debug(`[${Date.now()}] [recorder] Already recording`);\n return;\n }\n\n\n this.stopFn = this.recordFn({\n emit: (event: RecorderEvent) => this.handleEmit(event),\n plugins: [\n getRecordSequentialIdPlugin({\n key: 'id',\n getId: () => ++this.eventCounter,\n }),\n ],\n ...this.recordOptions\n });\n\n this.flush();\n }\n\n public stop() {\n this.flush();\n this.stopFn?.();\n this.stopFn = null;\n }\n\n public reset() {\n this.eventCounter = 0;\n this.events = [];\n this.stop();\n this.context = {\n pushEvent: (event) => this.events.push(event),\n };\n }\n\n public flush() {\n if (!this.recordFn) return;\n\n const stillPending: typeof this.pendingEvents = [];\n\n for (const evt of this.pendingEvents) {\n try {\n this.recordFn.addCustomEvent(evt.tag, evt.payload);\n } catch (err) {\n console.debug(`[${Date.now()}] [recorder] flush failed for custom event: ${evt.tag}`);\n stillPending.push(evt);\n }\n }\n\n this.pendingEvents = stillPending;\n }\n\n public addCustomEvent(tag: string, payload: Record<string, unknown>) {\n const event = { tag, payload };\n\n if (!this.recordFn || !this.stopFn) {\n console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${tag}`);\n this.pendingEvents.push(event);\n return;\n }\n\n try {\n this.recordFn.addCustomEvent(tag, payload);\n } catch (error) {\n console.debug(`[${Date.now()}] [recorder] error adding custom event: ${tag}`, error);\n this.pendingEvents.push(event);\n }\n }\n\n public isRecordingReady(): boolean {\n return !!this.recordFn && !!this.stopFn;\n }\n\n public isRecording(): boolean {\n return this.recordFn?.isRecording() || false;\n }\n\n public getScriptVersion(): string {\n return `@appsurify-testmap/rrweb-record:${this.recorderScriptVersion}`;\n }\n\n public getLibVersion(): string {\n return `@appsurify-testmap/rrweb:${this.recorderLibVersion}`;\n }\n\n public getEvents(): readonly RecorderEvent[] {\n return this.events;\n }\n\n public getMirror(): Mirror | undefined {\n return (this.recordFn as unknown as { mirror?: Mirror })?.mirror;\n }\n\n public bind(ctx: RecorderContext) {\n this.context = ctx;\n }\n\n public setEventCounter(value: number) {\n this.eventCounter = value;\n }\n\n}\n","import { RRWebRecorder } from './RRWebRecorder';\n\n\nexport default RRWebRecorder;\n","/// <reference types=\"cypress\" />\n\nimport {getCurrentTestContext, setCurrentTestContext} from '../runtime';\nimport {safeSerializeArray, buildSelector, getTestKey, mapTestRunContextToResult} from '../utils';\nimport RRWebRecorder from '../../recorder';\nimport defaultRecordOptions from '../../recorder';\nimport type {RecorderEvent} from '../../recorder/types';\nimport type {TestRunContext} from '../../types';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst testmapEnv = Cypress.env('testmap') ?? {};\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst recordingOpts = typeof testmapEnv === 'object' && 'recordingOpts' in testmapEnv\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ? testmapEnv.recordingOpts\n : defaultRecordOptions;\n// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\nconst recorder = new RRWebRecorder(recordingOpts);\n\nexport const registerCypressEventListeners = () => {\n\n Cypress\n .on('test:before:run', onTestBeforeRun)\n .on('log:added', onLogAdded)\n .on('log:changed', onLogChanged)\n .on('window:before:load', onWindowBeforeLoad)\n .on('window:before:unload', onWindowBeforeUnload)\n .on('window:unload', onWindowUnload)\n .on('window:load', onWindowLoad)\n .on('command:enqueued', onCommandEnqueued)\n .on('command:start', onCommandStart)\n .on('command:end', onCommandEnd)\n .on('command:retry', onCommandRetry)\n .on('skipped:command:end', onSkippedCommandEnd)\n .on('test:after:run', onTestAfterRun)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('command:failed', onCommandFailed)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('command:queue:end', onCommandQueueEnd)\n .on('fail', onFail);\n\n\n afterEach(() => {\n // console.debug(`[${Date.now()}] [cypress] afterEach:`);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // console.debug(`[${Date.now()}] [cypress] afterEach:`, ctx);\n ctx.recorderEvents.map((event) => {\n if (event.type !== 5 ) return event;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const liveCommand = ctx.commandLiveRefs.get(event.data.payload.id) as Cypress.CommandQueue;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // event.data.payload.element = element;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n event.data.payload.state = liveCommand?.state ?? 'unknown';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // event.data.payload.args = liveCommand?.get('args');\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-call\n event.data.payload.args = safeSerializeArray(liveCommand?.get('args'));\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.query = liveCommand?.get('query');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.timeout = liveCommand?.get('timeout');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.name = liveCommand?.get('name');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n event.data.payload.type = liveCommand?.get('type');\n\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (liveCommand?.get('prev')) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.prev = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n state: liveCommand?.get('prev').state,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n name: liveCommand?.get('prev').get('name'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n args: safeSerializeArray(liveCommand?.get('prev').get('args')),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n type: liveCommand?.get('prev').get('type'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n query: liveCommand?.get('prev').get('query'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n id: liveCommand?.get('prev').get('id'),\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (liveCommand?.get('next')) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.next = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n state: liveCommand?.get('next').state,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n name: liveCommand?.get('next').get('name'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n args: safeSerializeArray(liveCommand?.get('next').get('args')),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n type: liveCommand?.get('next').get('type'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n query: liveCommand?.get('next').get('query'),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument\n id: liveCommand?.get('next').get('id'),\n };\n }\n return event;\n })\n console.debug(`[${Date.now()}] [cypress] afterEach:`, ctx.recorderEvents);\n\n // const testRunResult: TestRunResult = {\n // spec: ctx.spec as unknown as SpecInfo,\n // test: prepareTest(ctx.test),\n // browser: ctx.browser as BrowserInfo,\n // recorderEvents: ctx.recorderEvents,\n // }\n\n const testRunResult = mapTestRunContextToResult(ctx);\n\n\n // const testRunResultSize = getSizeInBytes(testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:`, testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:size:`, formatBytes(testRunResultSize));\n // const debugReport = new UICoverageReport(testRunResult);\n // console.debug(`[${Date.now()}] [cypress] afterEach:testResult:debugReport:`, debugReport.toJSON());\n\n try {\n cy.task('saveRRWebReport', {\n testRunResult\n }, { log: false });\n } catch (e) {\n console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`, e);\n }\n\n });\n\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // Cypress.Commands.overwrite('type', (originalFn, subject, text, options) => {\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // return originalFn(subject, text, options).then(() => {\n // if (Cypress.dom.isElement(subject[0])) {\n // const el = subject[0];\n // if (el) {\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // el.dispatchEvent(new Event('input', { bubbles: true }));\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // // @ts-expect-error\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // el.dispatchEvent(new Event('change', { bubbles: true }));\n // }\n // }\n // });\n // });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onTestBeforeRun = (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n // console.debug(`[${Date.now()}] [cypress] onTestBeforeRun`, attributes, test);\n const testKey = getTestKey(test);\n const testRunContext: TestRunContext = {\n runner: {\n source: 'cypress',\n type: Cypress.testingType,\n version: Cypress.version,\n platform: Cypress.platform,\n arch: Cypress.arch,\n recorder: {\n scriptVersion: recorder.getLibVersion() || 'unknown',\n libVersion: recorder.getLibVersion() || 'unknown'\n }\n\n },\n spec: Cypress.spec,\n test: test,\n browser: Cypress.browser,\n autWindow: null,\n waitForPaint: () => Promise.resolve(undefined),\n paintComplete: false,\n recorderEvents: [] as RecorderEvent[],\n commandLiveRefs: new Map<string, Cypress.CommandQueue>()\n };\n\n setCurrentTestContext(testKey, testRunContext);\n\n recorder.bind({\n pushEvent: (event) => {\n console.debug(`[${Date.now()}] [cypress] pushEvent`, event);\n testRunContext.recorderEvents.push(event)\n if (event.type === 5) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const liveCommand = testRunContext.commandLiveRefs.get(event.data.payload.id) as Cypress.CommandQueue;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call\n const subject = liveCommand?.get('subject')\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-argument\n const selector = subject?.selector ?? buildSelector(subject);\n\n const mirror = recorder.getMirror();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n const element = mirror?.getMeta(subject?.[0]);\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n event.data.payload.element = {\n ...element,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n selector,\n childNodes: []\n };\n }\n },\n });\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogAdded = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`[${Date.now()}] [cypress] onLogAdded`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onLogChanged = (attributes: Cypress.ObjectLike, log: Cypress.Log) => {\n // console.debug(`[${Date.now()}] [cypress] onLogChanged`, attributes, log);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowBeforeUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowBeforeUnload`, event);\n // try {\n // recorder.stop();\n // // eslint-disable-next-line @typescript-eslint/no-unused-vars\n // } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onWindowUnload = (event: BeforeUnloadEvent) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowUnload`, event);\n try {\n recorder.stop();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) { /* empty */ }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowBeforeLoad = (win: Cypress.AUTWindow) => {\n // console.debug(`[${Date.now()}] [cypress] onWindowBeforeLoad`, win);\n recorder.inject(win);\n // recorder.start();\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n ctx.runner.recorder!.scriptVersion = recorder.getScriptVersion();\n ctx.autWindow = win;\n ctx.paintComplete = false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onWindowLoad = (win: Cypress.AUTWindow) => {\n console.debug(`[${Date.now()}] [cypress] onWindowLoad`, win);\n // recorder.inject(win);\n // recorder.start();\n // console.debug(`[${Date.now()}] [cypress] onWindowLoad after start`, recorder.isRecording());\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n if (!ctx.autWindow) {\n ctx.autWindow = win;\n ctx.paintComplete = false;\n }\n\n ctx.waitForPaint = (value?: unknown): Promise<unknown> => {\n return new Promise<unknown>((resolve) => {\n const maxWaitMs = 5000;\n\n const captureAfterPaint = () => {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n resolve(value);\n });\n });\n };\n\n const safeResolve = (() => {\n let called = false;\n return () => {\n if (!called) {\n called = true;\n captureAfterPaint();\n }\n };\n })();\n\n if (['interactive', 'complete'].includes(win.document.readyState)) {\n safeResolve();\n } else {\n win.addEventListener('DOMContentLoaded', safeResolve, { once: true });\n win.addEventListener('load', safeResolve, { once: true });\n setTimeout(() => {\n console.warn('⏳ Timeout: forcing resolution');\n safeResolve();\n }, maxWaitMs);\n }\n });\n };\n\n // eslint-disable-next-line @typescript-eslint/require-await\n void ctx.waitForPaint().then(async () => {\n ctx.paintComplete = true;\n recorder.inject(win);\n recorder.start();\n });\n // console.debug(`[${Date.now()}] [cypress] onWindowLoad after waitForPaint`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandEnqueued = (command: Cypress.EnqueuedCommandAttributes) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandEnqueued`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.id, command);\n\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandRetry = (command: Cypress.CommandQueue) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandRetry`, command);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandStart = (command: Cypress.CommandQueue) => {\n // console.debug(`[${Date.now()}] [cypress] onCommandStart`, command);\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.attributes.id, command);\n\n // If need before state\n // recorder.addCustomEvent(`${command.attributes.name}`, {\n // id: command.attributes.id,\n // });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandEnd = (command: Cypress.CommandQueue) => {\n console.debug(`[${Date.now()}] [cypress] onCommandEnd`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n const waitWindowLoaded = async () => {\n if (!ctx.paintComplete && typeof ctx.waitForPaint === 'function') {\n await ctx.waitForPaint();\n ctx.paintComplete = true;\n }\n }\n void waitWindowLoaded();\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n // void waitWindowLoaded();\n\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onCommandFailed = (command: Cypress.CommandQueue, err: unknown) => {\n console.debug(`[${Date.now()}] [cypress] onCommandFailed`, command);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onSkippedCommandEnd = (command: Cypress.CommandQueue) => {\n console.debug(`[${Date.now()}] [cypress] onSkippedCommandEnd`, command);\n\n const currentTest = Cypress.currentTest;\n if (!currentTest) return;\n\n const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n const ctx = getCurrentTestContext(testKey);\n if (!ctx) return;\n\n // Control and store live object\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access\n ctx.commandLiveRefs.set(command.attributes.id, command);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions\n recorder.addCustomEvent(`${command.attributes.name}`, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n id: command.attributes.id,\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst onCommandQueueEnd = () => {\n // console.debug(`[${Date.now()}] [cypress] onCommandQueueEnd`);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst onFail = (error: Cypress.CypressError, mocha: Mocha.Runnable) => {\n // console.debug(`[${Date.now()}] [cypress] onFail`, {error, mocha});\n throw error;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/require-await\nconst onTestAfterRun = async (attributes: Cypress.ObjectLike, test: Mocha.Test) => {\n console.debug(`[${Date.now()}] [cypress] onTestAfterRun`, attributes, test);\n recorder.stop();\n\n // const testKey = getTestKey(test);\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n //\n // console.debug(`[${Date.now()}] [cypress] onTestAfterRun`, ctx.recorderEvents);\n};\n\n\n","/// <reference types=\"cypress\" />\n\n\nexport const registerMochaEventListeners = () => {\n // ⚠️ Плохой стиль, отключает всю типизацию\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((Cypress as any).mocha.getRunner() as Mocha.Runner)\n .on('hook', onHook);\n};\n\nconst onHook = () => {\n // console.debug(`🟡 [${Date.now()}] [mocha] onHook:`);\n};\n\nexport const injectMochaHookFunctions = () => {\n\n beforeEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] beforeEach:`);\n });\n\n afterEach('', ()=> {\n // console.debug(`🟡 [${Date.now()}] [mocha] afterEach:`);\n // const currentTest = Cypress.currentTest;\n // const testKey = getTestKey({ titlePath: () => currentTest.titlePath });\n //\n // const ctx = getCurrentTestContext(testKey);\n // if (!ctx) return;\n // const serializedReport = serializeTestRunContextToJson(ctx);\n // console.log(`${Date.now()} [afterEach]`, currentTest, serializedReport);\n // cy.task('saveSnapshotReport', serializedReport)\n });\n\n};\n","import { registerCypressEventListeners } from \"./cypress\";\nimport { registerMochaEventListeners, injectMochaHookFunctions } from \"./mocha\";\n\nexport const enableTestmap = () => {\n registerCypressEventListeners();\n registerMochaEventListeners();\n injectMochaHookFunctions();\n};\n","import { enableTestmap } from './events';\n\nexport const initializeTestmap = () => {\n // if (is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EAC3B,CAAC,CACL,EAIM/B,GAAuB+B,GAAkC,CAC3D,QAAQ,MAAM,IAAI,KAAK,IAAI,mCAAoCA,CAAO,EAEtE,IAAM1B,EAAc,QAAQ,YAC5B,GAAI,CAACA,EAAa,OAElB,IAAMC,EAAUC,EAAW,CAAE,UAAW,IAAMF,EAAY,SAAU,CAAC,EAC/DG,EAAMC,EAAsBH,CAAO,EACpCE,IAILA,EAAI,gBAAgB,IAAIuB,EAAQ,WAAW,GAAIA,CAAO,EAGtD5C,EAAS,eAAe,GAAG4C,EAAQ,WAAW,OAAQ,CAElD,GAAIA,EAAQ,WAAW,EAC3B,CAAC,EACL,EAGM5B,GAAoB,IAAM,CAEhC,EAIMC,GAAS,CAAC6B,EAA6BC,IAA0B,CAEnE,MAAMD,CACV,EAKMhC,GAAiB,MAAOe,EAAgCC,IAAqB,CAC/E,QAAQ,MAAM,IAAI,KAAK,IAAI,8BAA+BD,EAAYC,CAAI,EAC1E9B,EAAS,KAAK,CAOlB,EC/fO,IAAMgD,EAA8B,IAAM,CAG7C,QAAgB,MAAM,UAAU,EAC7B,GAAG,OAAQC,EAAM,CACxB,EAEMA,GAAS,IAAM,CAErB,EAEaC,EAA2B,IAAM,CAE5C,WAAW,GAAI,IAAK,CAEpB,CAAC,EAED,UAAU,GAAI,IAAK,CAUnB,CAAC,CAEH,EC7BO,IAAMC,EAAgB,IAAM,CACjCC,EAA8B,EAC9BC,EAA4B,EAC5BC,EAAyB,CAC3B,ECLO,IAAMC,EAAoB,IAAM,CAInCC,EAAc,CAClB","names":["src_exports","__export","initializeTestmap","__toCommonJS","testContexts","setCurrentTestContext","key","ctx","getCurrentTestContext","safeSerializeArray","arr","value","buildSelector","subject","el","tag","id","classSelector","cls","getTestKey","test","prepareTestSuite","suite","safeInvocationDetails","safeInvocationDetails","details","mapTestRunContextToResult","ctx","mapSpec","mapBrowser","mapTest","spec","browser","test","prepareTestSuite","import_rrweb","import_rrweb_plugin_sequential_id_record","defaultRecordOptions","deepMerge","target","source","result","key","sourceValue","targetValue","RRWebRecorder","libVersion","options","event","rrEvent","win","w","script","rrweb_record_umd_cjs_default","recheck","stillPending","evt","tag","payload","error","ctx","value","recorder_default","RRWebRecorder","testmapEnv","recordingOpts","recorder_default","recorder","registerCypressEventListeners","onTestBeforeRun","onLogAdded","onLogChanged","onWindowBeforeLoad","onWindowBeforeUnload","onWindowUnload","onWindowLoad","onCommandEnqueued","onCommandStart","onCommandEnd","onCommandRetry","onSkippedCommandEnd","onTestAfterRun","onCommandFailed","onCommandQueueEnd","onFail","currentTest","testKey","getTestKey","ctx","getCurrentTestContext","event","liveCommand","safeSerializeArray","testRunResult","mapTestRunContextToResult","e","attributes","test","testRunContext","setCurrentTestContext","subject","selector","buildSelector","element","log","win","value","resolve","captureAfterPaint","safeResolve","called","command","err","error","mocha","registerMochaEventListeners","onHook","injectMochaHookFunctions","enableTestmap","registerCypressEventListeners","registerMochaEventListeners","injectMochaHookFunctions","initializeTestmap","enableTestmap"]}
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var m=new Map;function g(e,t){m.set(e,t)}function c(e){return m.get(e)}function p(e){return e.filter(t=>typeof t=="object"&&t!==null&&"log"in t&&t.log===!1?!1:typeof t=="string"||typeof t=="number"||typeof t=="boolean"||t===null)}function y(e){let t=e?.[0];if(!t)return null;let s=t.tagName.toLowerCase(),n=t.id?`#${t.id}`:"",r=Array.from(t.classList).map(o=>`.${o}`).join("");return`${s}${n}${r}`}function a(e){return e.titlePath().join(" > ")}function I(e){if(e)return{id:e.id,file:e.file,invocationDetails:b(e.invocationDetails),pending:e.pending,root:e.root,title:e.title,type:e.type}}function b(e){return{absoluteFile:e?.absoluteFile??"",column:e?.column??0,fileUrl:e?.fileUrl??"",function:e?.function??"",line:e?.line??0,originalFile:e?.originalFile??"",relativeFile:e?.relativeFile??""}}function v(e){return{spec:E(e.spec),browser:_(e.browser),test:R(e.test),recorderEvents:Array.isArray(e.recorderEvents)?e.recorderEvents:[]}}function E(e){return{name:e.name??"",absolute:e.absolute??"",relative:e.relative??"",specFilter:e.specFilter??"",specType:e.specType??"integration",baseName:e.baseName??"",fileExtension:e.fileExtension??"",fileName:e.fileName??"",id:e.id??""}}function _(e){return{name:e.name??"",version:e.version??"",displayName:e.displayName??"",family:e.family??"",majorVersion:e.majorVersion??"",channel:e.channel??"",path:e.path??""}}function R(e){return{suite:I(e.parent),file:e.file??"",duration:e.duration??0,id:e.id??"",invocationDetails:b(e.invocationDetails),pending:e.pending??!1,state:e.state??"unknown",sync:e.sync??!1,timedOut:e.timedOut??!1,title:e.title??"",titlePath:typeof e.titlePath=="function"?e.titlePath():[],fullTitle:typeof e.fullTitle=="function"?e.fullTitle():"",type:e.type??"test"}}import{getRecordSequentialIdPlugin as T}from"@appsurify-testmap/rrweb-plugin-sequential-id-record";var w=`(function (g, f) {
1
+ var y=new Map;function b(e,t){y.set(e,t)}function l(e){return y.get(e)}function p(e){return e.filter(t=>typeof t=="object"&&t!==null&&"log"in t&&t.log===!1?!1:typeof t=="string"||typeof t=="number"||typeof t=="boolean"||t===null)}function v(e){let t=e?.[0];if(!t)return null;let r=t.tagName.toLowerCase(),n=t.id?`#${t.id}`:"",s=Array.from(t.classList).map(o=>`.${o}`).join("");return`${r}${n}${s}`}function a(e){return e.titlePath().join(" > ")}function _(e){if(e)return{id:e.id,file:e.file,invocationDetails:w(e.invocationDetails),pending:e.pending,root:e.root,title:e.title,type:e.type}}function w(e){return{absoluteFile:e?.absoluteFile??"",column:e?.column??0,fileUrl:e?.fileUrl??"",function:e?.function??"",line:e?.line??0,originalFile:e?.originalFile??"",relativeFile:e?.relativeFile??""}}function k(e){return{runner:e.runner,spec:R(e.spec),browser:T(e.browser),test:M(e.test),recorderEvents:Array.isArray(e.recorderEvents)?e.recorderEvents:[]}}function R(e){return{name:e.name??"",absolute:e.absolute??"",relative:e.relative??"",specFilter:e.specFilter??"",specType:e.specType??"integration",baseName:e.baseName??"",fileExtension:e.fileExtension??"",fileName:e.fileName??"",id:e.id??""}}function T(e){return{name:e.name??"",version:e.version??"",displayName:e.displayName??"",family:e.family??"",majorVersion:e.majorVersion??"",channel:e.channel??"",path:e.path??""}}function M(e){return{suite:_(e.parent),file:e.file??"",duration:e.duration??0,id:e.id??"",invocationDetails:w(e.invocationDetails),pending:e.pending??!1,state:e.state??"unknown",sync:e.sync??!1,timedOut:e.timedOut??!1,title:e.title??"",titlePath:typeof e.titlePath=="function"?e.titlePath():[],fullTitle:typeof e.fullTitle=="function"?e.fullTitle():"",type:e.type??"test"}}import{version as A}from"@appsurify-testmap/rrweb";import{getRecordSequentialIdPlugin as O}from"@appsurify-testmap/rrweb-plugin-sequential-id-record";var S=`(function (g, f) {
2
2
  if ("object" == typeof exports && "object" == typeof module) {
3
3
  module.exports = f();
4
4
  } else if ("function" == typeof define && define.amd) {
@@ -10859,6 +10859,8 @@ function initViewportResizeObserver({ viewportResizeCb }, { win }) {
10859
10859
  }
10860
10860
  const INPUT_TAGS = ["INPUT", "TEXTAREA", "SELECT"];
10861
10861
  const lastInputValueMap = /* @__PURE__ */ new WeakMap();
10862
+ const FINALIZING_KEYS = ["Enter", "Tab", "Escape", "ArrowDown", "ArrowUp", "Delete"];
10863
+ const lastKeyInputValueMap = /* @__PURE__ */ new WeakMap();
10862
10864
  function initInputObserver({
10863
10865
  inputCb,
10864
10866
  doc,
@@ -10931,6 +10933,22 @@ function initInputObserver({
10931
10933
  const isPhantomCheckbox = el.type === "checkbox" && !v2.userTriggered && !v2.isChecked && !lastInputValue;
10932
10934
  const isPhantomRadio = el.type === "radio" && !v2.userTriggered && !v2.isChecked && !lastInputValue;
10933
10935
  if (isLikelyPhantom || isRenderDrivenTextInput || isValueFromDefault || isPhantomCheckbox || isPhantomRadio) {
10936
+ console.debug(
10937
+ \`[\${nowTimestamp()}] [rrweb:record/observer] \\u26D4 phantom input ignored\`,
10938
+ {
10939
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
10940
+ node: index.describeNode(el),
10941
+ tag: el.tagName,
10942
+ nodeType: el.nodeType,
10943
+ attribute: el.attributes,
10944
+ value: el.value,
10945
+ isLikelyPhantom,
10946
+ isRenderDrivenTextInput,
10947
+ isValueFromDefault,
10948
+ isPhantomCheckbox,
10949
+ isPhantomRadio
10950
+ }
10951
+ );
10934
10952
  return;
10935
10953
  }
10936
10954
  if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) {
@@ -10945,6 +10963,62 @@ function initInputObserver({
10945
10963
  const handlers = events.map(
10946
10964
  (eventName) => on(eventName, callbackWrapper(eventHandler), doc)
10947
10965
  );
10966
+ const keyboardHandler = (event) => {
10967
+ const target = getEventTarget(event);
10968
+ if (!target || !target.tagName)
10969
+ return;
10970
+ if (sampling.input === "all") {
10971
+ eventHandler(event);
10972
+ return;
10973
+ }
10974
+ const tag = target.tagName;
10975
+ const key = event.key;
10976
+ const isFinalizingKey = FINALIZING_KEYS.includes(key);
10977
+ const isTextarea = tag === "TEXTAREA";
10978
+ const isFocused = doc.activeElement === target;
10979
+ const valueNow = target.value;
10980
+ const valueBefore = lastKeyInputValueMap.get(target);
10981
+ lastKeyInputValueMap.set(target, valueNow);
10982
+ if (!isFocused) {
10983
+ eventHandler(event);
10984
+ return;
10985
+ }
10986
+ if (isFinalizingKey) {
10987
+ if (!isTextarea) {
10988
+ eventHandler(event);
10989
+ return;
10990
+ }
10991
+ let lastValue = valueBefore != null ? valueBefore : "";
10992
+ let unchangedCount = 0;
10993
+ const REQUIRED_STABLE_FRAMES = 2;
10994
+ const checkFinal = () => {
10995
+ const currentValue = target.value;
10996
+ const stillFocused = doc.activeElement === target;
10997
+ const changed = currentValue !== lastValue;
10998
+ if (!stillFocused) {
10999
+ eventHandler(event);
11000
+ return;
11001
+ }
11002
+ if (!changed) {
11003
+ unchangedCount++;
11004
+ if (unchangedCount >= REQUIRED_STABLE_FRAMES) {
11005
+ eventHandler(event);
11006
+ return;
11007
+ }
11008
+ } else {
11009
+ unchangedCount = 0;
11010
+ lastValue = currentValue;
11011
+ }
11012
+ requestAnimationFrame(checkFinal);
11013
+ };
11014
+ requestAnimationFrame(checkFinal);
11015
+ return;
11016
+ }
11017
+ };
11018
+ handlers.push(
11019
+ on("keydown", callbackWrapper(keyboardHandler), doc)
11020
+ // on('keypress', callbackWrapper(keyboardHandler), doc),
11021
+ );
10948
11022
  const currentWindow = doc.defaultView;
10949
11023
  if (!currentWindow) {
10950
11024
  return () => {
@@ -12932,13 +13006,14 @@ class VisibilityManager {
12932
13006
  cancelAnimationFrame(this.rafId);
12933
13007
  }
12934
13008
  }
13009
+ const version$1 = "2.1.2-alpha.1";
12935
13010
  let wrappedEmit;
12936
13011
  let takeFullSnapshot$1;
12937
13012
  let canvasManager;
12938
13013
  let visibilityManager;
12939
13014
  let recording = false;
12940
13015
  const customEventQueue = [];
12941
- let flushCustomEventQueue;
13016
+ let flushCustomEventQueue$1;
12942
13017
  function waitForDOMStabilization(win) {
12943
13018
  const maxWaitMs = 5e3;
12944
13019
  return new Promise((resolve2) => {
@@ -13303,7 +13378,7 @@ function record(options = {}) {
13303
13378
  mirror.getId(document)
13304
13379
  );
13305
13380
  };
13306
- flushCustomEventQueue = () => {
13381
+ flushCustomEventQueue$1 = () => {
13307
13382
  for (const e2 of customEventQueue) {
13308
13383
  wrappedEmit(e2);
13309
13384
  }
@@ -13437,37 +13512,34 @@ function record(options = {}) {
13437
13512
  });
13438
13513
  const init = () => {
13439
13514
  if (flushCustomEvent === "before") {
13440
- flushCustomEventQueue();
13515
+ flushCustomEventQueue$1();
13441
13516
  }
13442
13517
  takeFullSnapshot$1();
13443
13518
  handlers.push(observe(document));
13444
13519
  recording = true;
13445
13520
  if (flushCustomEvent === "after") {
13446
- flushCustomEventQueue();
13521
+ flushCustomEventQueue$1();
13447
13522
  }
13448
13523
  };
13449
13524
  const runInit = async () => {
13450
13525
  if (flushCustomEvent === "before") {
13451
- flushCustomEventQueue();
13526
+ flushCustomEventQueue$1();
13452
13527
  }
13453
13528
  if (recordAfter === "DOMContentStabilized") {
13454
- console.log(\`[rrweb] \\u{1F7E2} Waiting for DOM stabilization...\`);
13529
+ console.debug(\`[\${nowTimestamp()}] [rrweb:record] \\u{1F7E2} Waiting for DOM stabilization...\`);
13455
13530
  await waitForDOMStabilization(window);
13456
- console.log(\`[rrweb] \\u2705 DOM stabilized, starting recording\`);
13531
+ console.debug(\`[\${nowTimestamp()}] [rrweb:record] \\u2705 DOM stabilized, starting recording\`);
13457
13532
  }
13533
+ console.debug(\`[\${nowTimestamp()}] [rrweb:record] \\u2705 Init dom and takeFullSnapshot \`);
13458
13534
  takeFullSnapshot$1();
13459
13535
  handlers.push(observe(document));
13460
13536
  recording = true;
13461
13537
  if (flushCustomEvent === "after") {
13462
- flushCustomEventQueue();
13538
+ flushCustomEventQueue$1();
13463
13539
  }
13464
13540
  };
13465
13541
  if (document.readyState === "interactive" || document.readyState === "complete") {
13466
- if (recordAfter === "DOMContentStabilized") {
13467
- void runInit();
13468
- } else {
13469
- init();
13470
- }
13542
+ init();
13471
13543
  } else {
13472
13544
  handlers.push(
13473
13545
  on("DOMContentLoaded", () => {
@@ -13475,9 +13547,8 @@ function record(options = {}) {
13475
13547
  type: EventType.DomContentLoaded,
13476
13548
  data: {}
13477
13549
  });
13478
- if (recordAfter === "DOMContentLoaded" || recordAfter === "DOMContentStabilized") {
13479
- void runInit();
13480
- }
13550
+ if (recordAfter === "DOMContentLoaded")
13551
+ init();
13481
13552
  })
13482
13553
  );
13483
13554
  handlers.push(
@@ -13489,14 +13560,14 @@ function record(options = {}) {
13489
13560
  data: {}
13490
13561
  });
13491
13562
  if (recordAfter === "load")
13492
- void runInit();
13563
+ init();
13493
13564
  },
13494
13565
  window
13495
13566
  )
13496
13567
  );
13497
13568
  }
13498
13569
  return () => {
13499
- flushCustomEventQueue();
13570
+ flushCustomEventQueue$1();
13500
13571
  handlers.forEach((h) => h());
13501
13572
  processedNodeManager.destroy();
13502
13573
  recording = false;
@@ -13506,10 +13577,11 @@ function record(options = {}) {
13506
13577
  console.warn(error);
13507
13578
  }
13508
13579
  }
13580
+ record.getVersion = () => version$1;
13509
13581
  record.isRecording = () => recording;
13510
13582
  record.flushCustomEventQueue = () => {
13511
13583
  console.warn(\`[rrweb] CustomEvent flushing: \${customEventQueue.length} events\`);
13512
- flushCustomEventQueue();
13584
+ flushCustomEventQueue$1();
13513
13585
  };
13514
13586
  record.addCustomEvent = (tag, payload) => {
13515
13587
  const customEvent = {
@@ -13559,5 +13631,5 @@ if (typeof module.exports == "object" && typeof exports == "object") {
13559
13631
  return module.exports;
13560
13632
  }))
13561
13633
  //# sourceMappingURL=rrweb-record.umd.cjs.map
13562
- `;var h=class{recordFn=null;stopFn=null;targetWindow=null;context;eventCounter=0;events=[];pendingEvents=[];constructor(){this.context={pushEvent:t=>this.events.push(t)}}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 n=t.document.createElement("script");n.type="text/javascript",n.innerHTML=w,t.document.head.appendChild(n);let r=t.rrweb;if(!r||!r.record){console.error("\u{1F7E1} [rrweb] Failed to load rrweb.record");return}this.recordFn=r.record}start(){if(!this.targetWindow||!this.recordFn){console.warn("\u{1F7E1} [rrweb] Not ready to start");return}if(this.stopFn){console.warn("\u{1F7E1} [rrweb] Already recording");return}this.stopFn=this.recordFn({emit:t=>this.handleEmit(t),checkoutEveryNvm:10,plugins:[T({key:"id",getId:()=>++this.eventCounter})],maskInputOptions:{password:!0},slimDOMOptions:"all",inlineStylesheet:!0,sampling:{mousemove:!1,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!1,TouchEnd:!1},scroll:100,media:100,input:"last",canvas:"all",visibility:{mode:"debounce",debounce:50,threshold:.5,sensitivity:.05,rafThrottle:50}},recordDOM:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,flushCustomEvent:"after",recordAfter:"DOMContentLoaded"}),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.warn(`[rrweb] flush failed for custom event: ${s.tag}`),t.push(s)}this.pendingEvents=t}addCustomEvent(t,s){let n={tag:t,payload:s};if(!this.recordFn||!this.stopFn){console.warn(`[rrweb] queued custom event (recorder not ready): ${t}`),this.pendingEvents.push(n);return}try{this.recordFn.addCustomEvent(t,s)}catch(r){console.warn(`[rrweb] error adding custom event: ${t}`,r),this.pendingEvents.push(n)}}isRecordingReady(){return!!this.recordFn&&!!this.stopFn}getEvents(){return this.events}getMirror(){return this.recordFn?.mirror}bind(t){this.context=t}setEventCounter(t){this.eventCounter=t}};var k=h;var i=new k,S=()=>{Cypress.on("test:before:run",N).on("log:added",A).on("log:changed",O).on("window:before:load",D).on("window:before:unload",P).on("window:unload",L).on("window:load",F).on("command:enqueued",U).on("command:start",z).on("command:end",B).on("command:retry",W).on("skipped:command:end",V).on("test:after:run",K).on("command:failed",j).on("command:queue:end",H).on("fail",G),afterEach(()=>{let e=Cypress.currentTest;if(!e)return;let t=a({titlePath:()=>e.titlePath}),s=c(t);if(!s)return;s.recorderEvents.map(r=>{if(r.type!==5)return r;let o=s.commandLiveRefs.get(r.data.payload.id);return r.data.payload.state=o?.state??"unknown",r.data.payload.args=p(o?.get("args")),r.data.payload.query=o?.get("query"),r.data.payload.timeout=o?.get("timeout"),r.data.payload.name=o?.get("name"),r.data.payload.type=o?.get("type"),o?.get("prev")&&(r.data.payload.prev={state:o?.get("prev").state,name:o?.get("prev").get("name"),args:p(o?.get("prev").get("args")),type:o?.get("prev").get("type"),query:o?.get("prev").get("query"),id:o?.get("prev").get("id")}),o?.get("next")&&(r.data.payload.next={state:o?.get("next").state,name:o?.get("next").get("name"),args:p(o?.get("next").get("args")),type:o?.get("next").get("type"),query:o?.get("next").get("query"),id:o?.get("next").get("id")}),r}),console.debug(`\u{1F7E1} [${Date.now()}] [cypress] afterEach:`,s.recorderEvents);let n=v(s);try{cy.task("saveRRWebReport",n,{log:!1})}catch(r){console.error(`\u{1F7E1} [${Date.now()}] [cypress] afterEach:saveRRWebReport`,r)}})},N=(e,t)=>{let s=a(t),n={spec:Cypress.spec,test:t,browser:Cypress.browser,autWindow:null,waitForPaint:()=>Promise.resolve(void 0),paintComplete:!1,recorderEvents:[],commandLiveRefs:new Map};g(s,n),i.bind({pushEvent:r=>{if(console.debug(`\u{1F7E1} [${Date.now()}] [cypress] pushEvent`,r),n.recorderEvents.push(r),r.type===5){let u=n.commandLiveRefs.get(r.data.payload.id)?.get("subject"),f=u?.selector??y(u),d=i.getMirror()?.getMeta(u?.[0]);r.data.payload.element={...d,selector:f,childNodes:[]}}}})},A=(e,t)=>{},O=(e,t)=>{},P=e=>{},L=e=>{try{i.stop()}catch{}},D=e=>{i.inject(e);let t=Cypress.currentTest;if(!t)return;let s=a({titlePath:()=>t.titlePath}),n=c(s);n&&(n.autWindow=e,n.paintComplete=!1)},F=e=>{i.inject(e),i.start();let t=Cypress.currentTest;if(!t)return;let s=a({titlePath:()=>t.titlePath}),n=c(s);n&&(n.autWindow||(n.autWindow=e,n.paintComplete=!1),n.waitForPaint=r=>new Promise(o=>{let f=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{o(r)})})},l=(()=>{let d=!1;return()=>{d||(d=!0,f())}})();["interactive","complete"].includes(e.document.readyState)?l():(e.addEventListener("DOMContentLoaded",l,{once:!0}),e.addEventListener("load",l,{once:!0}),setTimeout(()=>{console.warn("\u23F3 Timeout: forcing resolution"),l()},5e3))}),n.waitForPaint().then(async()=>{n.paintComplete=!0}))},U=e=>{},W=e=>{},z=e=>{let t=Cypress.currentTest;if(!t)return;let s=a({titlePath:()=>t.titlePath}),n=c(s);n&&n.commandLiveRefs.set(e.attributes.id,e)},B=e=>{console.debug(`\u{1F7E1} [${Date.now()}] [cypress] onCommandEnd`,e),i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id})},j=(e,t)=>{i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id})},V=e=>{},H=()=>{},G=(e,t)=>{throw e},K=async(e,t)=>{i.stop()};var x=()=>{Cypress.mocha.getRunner().on("hook",Y)},Y=()=>{},$=()=>{beforeEach("",()=>{}),afterEach("",()=>{})};var C=()=>{S(),x(),$()};var Z=()=>{C()};export{Z as initializeTestmap};
13634
+ `;var P={slimDOMOptions:"all",inlineStylesheet:!0,recordDOM:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,maskInputOptions:{password:!0},sampling:{mousemove:!1,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!1,TouchEnd:!1},scroll:100,media:100,input:"last",canvas:"all",visibility:{mode:"debounce",debounce:50,threshold:.5,sensitivity:.05,rafThrottle:50}},flushCustomEvent:"after",recordAfter:"DOMContentLoaded",userTriggeredOnInput:!0};function x(e,t){let r={...e};for(let n in t){let s=t[n],o=e[n];s&&typeof s=="object"&&!Array.isArray(s)&&o&&typeof o=="object"&&!Array.isArray(o)?r[n]=x(o,s):s!==void 0&&(r[n]=s)}return r}var h=class{recordFn=null;stopFn=null;targetWindow=null;context;eventCounter=0;events=[];recordOptions;pendingEvents=[];recorderScriptVersion="unknown";recorderLibVersion=A;constructor(t){this.recordOptions=x(P,t??{}),this.context={pushEvent:r=>this.events.push(r)}}handleEmit(t){if(t.type===0||t.type===1)return;let r={...t};this.context.pushEvent(r)}inject(t){let r=t;if(this.targetWindow=t,r.rrweb){this.recordFn=r.rrweb.record??null;return}let n=t.document.createElement("script");n.type="text/javascript",n.innerHTML=S,t.document.head.appendChild(n);let s=t.rrweb;if(!s||!s.record){console.error(`[${Date.now()}] [recorder] Failed to load rrweb.record`);return}this.recordFn=s.record,this.recorderScriptVersion=this.recordFn.getVersion()}start(){if(!this.targetWindow||!this.recordFn){console.debug(`[${Date.now()}] [recorder] Not ready to start`);return}if(this.stopFn){console.debug(`[${Date.now()}] [recorder] Already recording`);return}this.stopFn=this.recordFn({emit:t=>this.handleEmit(t),plugins:[O({key:"id",getId:()=>++this.eventCounter})],...this.recordOptions}),this.flush()}stop(){this.flush(),this.stopFn?.(),this.stopFn=null}reset(){this.eventCounter=0,this.events=[],this.stop(),this.context={pushEvent:t=>this.events.push(t)}}flush(){if(!this.recordFn)return;let t=[];for(let r of this.pendingEvents)try{this.recordFn.addCustomEvent(r.tag,r.payload)}catch{console.debug(`[${Date.now()}] [recorder] flush failed for custom event: ${r.tag}`),t.push(r)}this.pendingEvents=t}addCustomEvent(t,r){let n={tag:t,payload:r};if(!this.recordFn||!this.stopFn){console.debug(`[${Date.now()}] [recorder] queued custom event (recorder not ready): ${t}`),this.pendingEvents.push(n);return}try{this.recordFn.addCustomEvent(t,r)}catch(s){console.debug(`[${Date.now()}] [recorder] error adding custom event: ${t}`,s),this.pendingEvents.push(n)}}isRecordingReady(){return!!this.recordFn&&!!this.stopFn}isRecording(){return this.recordFn?.isRecording()||!1}getScriptVersion(){return`@appsurify-testmap/rrweb-record:${this.recorderScriptVersion}`}getLibVersion(){return`@appsurify-testmap/rrweb:${this.recorderLibVersion}`}getEvents(){return this.events}getMirror(){return this.recordFn?.mirror}bind(t){this.context=t}setEventCounter(t){this.eventCounter=t}};var f=h;var g=Cypress.env("testmap")??{},L=typeof g=="object"&&"recordingOpts"in g?g.recordingOpts:f,i=new f(L),$=()=>{Cypress.on("test:before:run",D).on("log:added",F).on("log:changed",U).on("window:before:load",B).on("window:before:unload",W).on("window:unload",z).on("window:load",j).on("command:enqueued",V).on("command:start",G).on("command:end",K).on("command:retry",H).on("skipped:command:end",Z).on("test:after:run",Q).on("command:failed",Y).on("command:queue:end",J).on("fail",q),afterEach(()=>{let e=Cypress.currentTest;if(!e)return;let t=a({titlePath:()=>e.titlePath}),r=l(t);if(!r)return;r.recorderEvents.map(s=>{if(s.type!==5)return s;let o=r.commandLiveRefs.get(s.data.payload.id);return s.data.payload.state=o?.state??"unknown",s.data.payload.args=p(o?.get("args")),s.data.payload.query=o?.get("query"),s.data.payload.timeout=o?.get("timeout"),s.data.payload.name=o?.get("name"),s.data.payload.type=o?.get("type"),o?.get("prev")&&(s.data.payload.prev={state:o?.get("prev").state,name:o?.get("prev").get("name"),args:p(o?.get("prev").get("args")),type:o?.get("prev").get("type"),query:o?.get("prev").get("query"),id:o?.get("prev").get("id")}),o?.get("next")&&(s.data.payload.next={state:o?.get("next").state,name:o?.get("next").get("name"),args:p(o?.get("next").get("args")),type:o?.get("next").get("type"),query:o?.get("next").get("query"),id:o?.get("next").get("id")}),s}),console.debug(`[${Date.now()}] [cypress] afterEach:`,r.recorderEvents);let n=k(r);try{cy.task("saveRRWebReport",{testRunResult:n},{log:!1})}catch(s){console.error(`[${Date.now()}] [cypress] afterEach:saveRRWebReport`,s)}})},D=(e,t)=>{let r=a(t),n={runner:{source:"cypress",type:Cypress.testingType,version:Cypress.version,platform:Cypress.platform,arch:Cypress.arch,recorder:{scriptVersion:i.getLibVersion()||"unknown",libVersion:i.getLibVersion()||"unknown"}},spec:Cypress.spec,test:t,browser:Cypress.browser,autWindow:null,waitForPaint:()=>Promise.resolve(void 0),paintComplete:!1,recorderEvents:[],commandLiveRefs:new Map};b(r,n),i.bind({pushEvent:s=>{if(console.debug(`[${Date.now()}] [cypress] pushEvent`,s),n.recorderEvents.push(s),s.type===5){let u=n.commandLiveRefs.get(s.data.payload.id)?.get("subject"),m=u?.selector??v(u),d=i.getMirror()?.getMeta(u?.[0]);s.data.payload.element={...d,selector:m,childNodes:[]}}}})},F=(e,t)=>{},U=(e,t)=>{},W=e=>{},z=e=>{try{i.stop()}catch{}},B=e=>{i.inject(e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&(n.runner.recorder.scriptVersion=i.getScriptVersion(),n.autWindow=e,n.paintComplete=!1)},j=e=>{console.debug(`[${Date.now()}] [cypress] onWindowLoad`,e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&(n.autWindow||(n.autWindow=e,n.paintComplete=!1),n.waitForPaint=s=>new Promise(o=>{let m=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{o(s)})})},c=(()=>{let d=!1;return()=>{d||(d=!0,m())}})();["interactive","complete"].includes(e.document.readyState)?c():(e.addEventListener("DOMContentLoaded",c,{once:!0}),e.addEventListener("load",c,{once:!0}),setTimeout(()=>{console.warn("\u23F3 Timeout: forcing resolution"),c()},5e3))}),n.waitForPaint().then(async()=>{n.paintComplete=!0,i.inject(e),i.start()}))},V=e=>{let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&n.commandLiveRefs.set(e.id,e)},H=e=>{},G=e=>{let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&n.commandLiveRefs.set(e.attributes.id,e)},K=e=>{console.debug(`[${Date.now()}] [cypress] onCommandEnd`,e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);if(!n)return;(async()=>{!n.paintComplete&&typeof n.waitForPaint=="function"&&(await n.waitForPaint(),n.paintComplete=!0)})(),i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id})},Y=(e,t)=>{console.debug(`[${Date.now()}] [cypress] onCommandFailed`,e),i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id})},Z=e=>{console.debug(`[${Date.now()}] [cypress] onSkippedCommandEnd`,e);let t=Cypress.currentTest;if(!t)return;let r=a({titlePath:()=>t.titlePath}),n=l(r);n&&(n.commandLiveRefs.set(e.attributes.id,e),i.addCustomEvent(`${e.attributes.name}`,{id:e.attributes.id}))},J=()=>{},q=(e,t)=>{throw e},Q=async(e,t)=>{console.debug(`[${Date.now()}] [cypress] onTestAfterRun`,e,t),i.stop()};var C=()=>{Cypress.mocha.getRunner().on("hook",X)},X=()=>{},I=()=>{beforeEach("",()=>{}),afterEach("",()=>{})};var E=()=>{$(),C(),I()};var ee=()=>{E()};export{ee as initializeTestmap};
13563
13635
  //# sourceMappingURL=index.mjs.map