allure-cypress 3.4.4 → 3.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/model.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/utils.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/runtime/NoopTestRuntime.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/runtime/runtime.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/facade.ts", "../../src/utils.ts", "../../src/browser/state.ts", "../../src/browser/testplan.ts", "../../src/browser/events/mocha.ts", "../../src/browser/utils.ts", "../../src/browser/steps.ts", "../../src/browser/runtime.ts", "../../src/browser/lifecycle.ts", "../../src/browser/patching.ts", "../../src/browser/serialize.ts", "../../src/browser/commandLog.ts", "../../src/browser/events/cypress.ts", "../../src/browser/events/index.ts", "../../src/browser/index.ts", "../../src/index.ts"],
4
- "sourcesContent": ["export interface Attachment {\n name: string;\n type?: string;\n source: string;\n size?: number;\n}\n\nexport interface AttachmentOptions {\n contentType: ContentType | string;\n encoding?: BufferEncoding;\n fileExtension?: string;\n path?: string;\n body?: Buffer;\n}\n\nexport interface Label {\n name: LabelName | string;\n value: string;\n}\n\nexport interface Link {\n name?: string;\n url: string;\n type?: LinkType | string;\n}\n\nexport type ParameterMode = \"hidden\" | \"masked\" | \"default\";\n\nexport interface Parameter {\n name: string;\n value: string;\n excluded?: boolean;\n mode?: ParameterMode;\n}\n\nexport type ParameterOptions = Pick<Parameter, \"mode\" | \"excluded\">;\n\nexport interface StatusDetails {\n message?: string;\n trace?: string;\n actual?: string;\n expected?: string;\n}\n\n// don't use the interface as is, use Results types instead\ninterface Executable {\n name?: string;\n status?: Status;\n statusDetails: StatusDetails;\n stage: Stage;\n description?: string;\n descriptionHtml?: string;\n steps: StepResult[];\n attachments: Attachment[];\n parameters: Parameter[];\n start?: number;\n stop?: number;\n}\n\nexport interface FixtureResult extends Executable {}\n\nexport interface StepResult extends Executable {\n uuid?: string;\n}\n\nexport interface TestResult extends Executable {\n uuid: string;\n historyId?: string;\n fullName?: string;\n testCaseId?: string;\n titlePath?: string[];\n labels: Label[];\n links: Link[];\n}\n\nexport interface TestResultContainer {\n uuid: string;\n name?: string;\n children: string[];\n befores: FixtureResult[];\n afters: FixtureResult[];\n}\n\nexport type TestOrStepResult = StepResult | TestResult;\n\n/* eslint-disable no-shadow */\nexport enum Status {\n FAILED = \"failed\",\n BROKEN = \"broken\",\n PASSED = \"passed\",\n SKIPPED = \"skipped\",\n}\n\nexport const StatusByPriority = [Status.FAILED, Status.BROKEN, Status.PASSED, Status.SKIPPED];\n\n/* eslint-disable no-shadow */\nexport enum Stage {\n SCHEDULED = \"scheduled\",\n RUNNING = \"running\",\n FINISHED = \"finished\",\n PENDING = \"pending\",\n INTERRUPTED = \"interrupted\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LabelName {\n ALLURE_ID = \"ALLURE_ID\",\n /**\n * @deprecated please use ALLURE_ID instead\n */\n AS_ID = ALLURE_ID,\n SUITE = \"suite\",\n PARENT_SUITE = \"parentSuite\",\n SUB_SUITE = \"subSuite\",\n EPIC = \"epic\",\n FEATURE = \"feature\",\n STORY = \"story\",\n SEVERITY = \"severity\",\n TAG = \"tag\",\n OWNER = \"owner\",\n LEAD = \"lead\",\n HOST = \"host\",\n THREAD = \"thread\",\n TEST_METHOD = \"testMethod\",\n TEST_CLASS = \"testClass\",\n PACKAGE = \"package\",\n FRAMEWORK = \"framework\",\n LANGUAGE = \"language\",\n LAYER = \"layer\",\n}\n\n/* eslint-disable no-shadow */\nexport enum Severity {\n BLOCKER = \"blocker\",\n CRITICAL = \"critical\",\n NORMAL = \"normal\",\n MINOR = \"minor\",\n TRIVIAL = \"trivial\",\n}\n\n/* eslint-disable no-shadow */\nexport enum ContentType {\n TEXT = \"text/plain\",\n XML = \"application/xml\",\n HTML = \"text/html\",\n CSV = \"text/csv\",\n TSV = \"text/tab-separated-values\",\n CSS = \"text/css\",\n URI = \"text/uri-list\",\n SVG = \"image/svg+xml\",\n PNG = \"image/png\",\n JSON = \"application/json\",\n ZIP = \"application/zip\",\n WEBM = \"video/webm\",\n JPEG = \"image/jpeg\",\n MP4 = \"video/mp4\",\n IMAGEDIFF = \"application/vnd.allure.image.diff\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LinkType {\n DEFAULT = \"link\",\n ISSUE = \"issue\",\n TMS = \"tms\",\n}\n\nexport interface ImageDiffAttachment {\n expected: string | undefined; // data:image;base64,\n actual: string | undefined; // data:image;base64,\n diff: string | undefined; // data:image;base64,\n name: string;\n}\n", "import type { FixtureResult, Label, Link, StatusDetails, StepResult, TestResult } from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type { RuntimeMessage, SerializeOptions, SerializerReplacerFunc } from \"./types.js\";\n\nexport const getStatusFromError = (error: Partial<Error>): Status => {\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n * `vitest` throws `Error` for extended assertions, so we look into stack\n */\n case /assert/gi.test(error.constructor.name):\n case /expectation/gi.test(error.constructor.name):\n case error.name && /assert/gi.test(error.name):\n case error.message && /assert/gi.test(error.message):\n case error.stack && /@vitest\\/expect/gi.test(error.stack):\n case error.stack && /playwright\\/lib\\/matchers\\/expect\\.js/gi.test(error.stack):\n case \"matcherResult\" in error:\n case \"inspect\" in error && typeof error.inspect === \"function\":\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nconst actualAndExpected = (value: unknown): { actual?: string; expected?: string } => {\n if (!value || typeof value !== \"object\") {\n return {};\n }\n\n // support for jest asserts\n if (\"matcherResult\" in value && value.matcherResult !== undefined && typeof value.matcherResult === \"object\") {\n return {\n actual: serialize((value.matcherResult as any).actual),\n expected: serialize((value.matcherResult as any).expected),\n };\n }\n\n const actual = \"actual\" in value && value.actual !== undefined ? { actual: serialize(value.actual) } : {};\n const expected = \"expected\" in value && value.expected !== undefined ? { expected: serialize(value.expected) } : {};\n return {\n ...actual,\n ...expected,\n };\n};\n\nexport const getMessageAndTraceFromError = (\n error:\n | Error\n | {\n message?: string;\n stack?: string;\n },\n): StatusDetails => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n ...actualAndExpected(error),\n };\n};\n\ntype AllureTitleMetadataMatch = RegExpMatchArray & {\n groups: {\n type?: string;\n v1?: string;\n v2?: string;\n v3?: string;\n v4?: string;\n };\n};\n\nexport const allureMetadataRegexp = /(?:^|\\s)@?allure\\.(?<type>\\S+)$/;\nexport const allureTitleMetadataRegexp = /(?:^|\\s)@?allure\\.(?<type>[^:=\\s]+)[:=](\"[^\"]+\"|'[^']+'|`[^`]+`|\\S+)/;\nexport const allureTitleMetadataRegexpGlobal = new RegExp(allureTitleMetadataRegexp, \"g\");\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>\\S+)/;\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\n\nexport const getTypeFromAllureTitleMetadataMatch = (match: AllureTitleMetadataMatch) => {\n return match?.[1];\n};\n\nexport const getValueFromAllureTitleMetadataMatch = (match: AllureTitleMetadataMatch) => {\n const quotesRegexp = /['\"`]/;\n const quoteOpenRegexp = new RegExp(`^${quotesRegexp.source}`);\n const quoteCloseRegexp = new RegExp(`${quotesRegexp.source}$`);\n const matchedValue = match?.[2] ?? \"\";\n\n if (quoteOpenRegexp.test(matchedValue) && quoteCloseRegexp.test(matchedValue)) {\n return matchedValue.slice(1, -1);\n }\n\n return matchedValue;\n};\n\nexport const isMetadataTag = (tag: string) => {\n return allureMetadataRegexp.test(tag);\n};\n\nexport const getMetadataLabel = (tag: string, value?: string): Label | undefined => {\n const match = tag.match(allureMetadataRegexp);\n const type = match?.groups?.type;\n\n if (!type) {\n return undefined;\n }\n\n const [subtype, name] = type.split(\".\");\n\n return {\n name: subtype === \"id\" ? LabelName.ALLURE_ID : name,\n value: value ?? \"\",\n };\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n links: Link[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n const links = [] as Link[];\n const metadata = title.matchAll(allureTitleMetadataRegexpGlobal);\n const cleanTitle = title\n .replaceAll(allureTitleMetadataRegexpGlobal, \"\")\n .split(\" \")\n .filter(Boolean)\n .reduce((acc, word) => {\n if (/^[\\n\\r]/.test(word)) {\n return acc + word;\n }\n\n return `${acc} ${word}`;\n }, \"\")\n .trim();\n\n for (const m of metadata) {\n const match = m as AllureTitleMetadataMatch;\n const type = getTypeFromAllureTitleMetadataMatch(match);\n const value = getValueFromAllureTitleMetadataMatch(match);\n\n if (!type || !value) {\n continue;\n }\n\n const [subtype, name] = type.split(\".\");\n\n switch (subtype) {\n case \"id\":\n labels.push({ name: LabelName.ALLURE_ID, value });\n break;\n case \"label\":\n labels.push({ name, value });\n break;\n case \"link\":\n links.push({ type: name, url: value });\n break;\n }\n }\n\n return {\n labels,\n links,\n cleanTitle,\n };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n\nexport const serialize = (value: any, { maxDepth = 0, maxLength = 0, replacer }: SerializeOptions = {}): string =>\n limitString(\n typeof value === \"object\" ? JSON.stringify(value, createSerializeReplacer(maxDepth, replacer)) : String(value),\n maxLength,\n );\n\nconst createSerializeReplacer = (maxDepth: number, userDefinedReplacer: SerializeOptions[\"replacer\"]) => {\n const parents: unknown[] = [];\n const limitingReplacer = function (this: unknown, _: string, value: unknown) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n while (parents.length > 0 && !Object.is(parents.at(-1), this)) {\n parents.pop();\n }\n\n if ((maxDepth && parents.length >= maxDepth) || parents.includes(value)) {\n return undefined;\n }\n\n parents.push(value);\n\n return value instanceof Map\n ? excludeCircularRefsFromMap(parents, value)\n : value instanceof Set\n ? excludeCircularRefsFromSet(parents, value)\n : value;\n };\n return userDefinedReplacer ? composeReplacers(userDefinedReplacer, limitingReplacer) : limitingReplacer;\n};\n\nconst composeReplacers = (first: SerializerReplacerFunc, second: SerializerReplacerFunc): SerializerReplacerFunc =>\n function (k, v) {\n return second.call(this, k, first.call(this, k, v));\n };\n\nconst excludeCircularRefsFromMap = (parents: any[], map: Map<any, any>) => {\n return Array.from(map)\n .filter(([k]) => !parents.includes(k))\n .map(([k, v]) => [k, parents.includes(v) ? undefined : v]);\n};\n\nconst excludeCircularRefsFromSet = (parents: any[], set: Set<any>) => {\n return Array.from(set).map((v) => (parents.includes(v) ? undefined : v));\n};\n\nconst limitString = (value: string, maxLength: number) =>\n maxLength && value.length > maxLength ? `${value.substring(0, maxLength)}...` : value;\n", "import type { TestRuntime } from \"./types.js\";\n\nexport class NoopTestRuntime implements TestRuntime {\n async attachment() {\n await this.warning();\n }\n\n async attachmentFromPath() {\n await this.warning();\n }\n\n async description() {\n await this.warning();\n }\n\n async descriptionHtml() {\n await this.warning();\n }\n\n async displayName() {\n await this.warning();\n }\n\n async historyId() {\n await this.warning();\n }\n\n async labels() {\n await this.warning();\n }\n\n async links() {\n await this.warning();\n }\n\n async parameter() {\n await this.warning();\n }\n\n async logStep() {\n await this.warning();\n }\n\n async step<T>(name: string, body: () => T | PromiseLike<T>): Promise<T> {\n await this.warning();\n return body();\n }\n\n async stepDisplayName() {\n await this.warning();\n }\n\n async stepParameter() {\n await this.warning();\n }\n\n async testCaseId() {\n await this.warning();\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async warning() {\n // eslint-disable-next-line no-console\n console.log(\"no test runtime is found. Please check test framework configuration\");\n }\n}\n\nexport const noopRuntime: TestRuntime = new NoopTestRuntime();\n", "import { noopRuntime } from \"./NoopTestRuntime.js\";\nimport type { TestRuntime } from \"./types.js\";\n\nconst ALLURE_TEST_RUNTIME_KEY = \"allureTestRuntime\";\n\nexport const setGlobalTestRuntime = (runtime: TestRuntime) => {\n (globalThis as any)[ALLURE_TEST_RUNTIME_KEY] = () => runtime;\n};\n\nconst getGlobalTestRuntimeFunction = () => {\n return (globalThis as any)?.[ALLURE_TEST_RUNTIME_KEY] as (() => TestRuntime | undefined) | undefined;\n};\n\nexport const getGlobalTestRuntime = (): TestRuntime => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n return noopRuntime;\n};\n\nexport const getGlobalTestRuntimeWithAutoconfig = (): TestRuntime | Promise<TestRuntime> => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n // protection from bundlers tree-shaking visiting (webpack, rollup)\n const pwAutoconfigModuleName = \"allure-playwright/autoconfig\";\n\n return import(pwAutoconfigModuleName)\n .then(() => getGlobalTestRuntimeFunction()?.() ?? noopRuntime)\n .catch(() => noopRuntime);\n};\n", "import type { Status } from \"./model.js\";\nimport { type ContentType } from \"./model.js\";\nimport { type AttachmentOptions, type Label, type Link, type ParameterMode, type ParameterOptions } from \"./model.js\";\nimport { LabelName, LinkType } from \"./model.js\";\nimport { getGlobalTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { TestRuntime } from \"./sdk/runtime/types.js\";\nimport { isPromise } from \"./sdk/utils.js\";\n\nconst callRuntimeMethod = <\n T extends keyof TestRuntime,\n S extends Parameters<TestRuntime[T]>,\n R extends ReturnType<TestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalTestRuntimeWithAutoconfig();\n\n if (!isPromise(runtime)) {\n // @ts-ignore\n return runtime[method](...args);\n }\n\n return runtime.then((testRuntime) => {\n // @ts-ignore\n return testRuntime[method](...args);\n }) as R;\n};\n\nexport const label = (name: LabelName | string, value: string) => {\n return callRuntimeMethod(\"labels\", { name, value });\n};\n\nexport const labels = (...labelsList: Label[]) => {\n return callRuntimeMethod(\"labels\", ...labelsList);\n};\n\nexport const link = (url: string, name?: string, type?: LinkType | string) => {\n return callRuntimeMethod(\"links\", { url, type, name });\n};\n\nexport const links = (...linksList: Link[]) => {\n return callRuntimeMethod(\"links\", ...linksList);\n};\n\nexport const parameter = (name: string, value: string, options?: ParameterOptions) => {\n return callRuntimeMethod(\"parameter\", name, value, options);\n};\n\nexport const description = (markdown: string) => {\n return callRuntimeMethod(\"description\", markdown);\n};\n\nexport const descriptionHtml = (html: string) => {\n return callRuntimeMethod(\"descriptionHtml\", html);\n};\n\nexport const displayName = (name: string) => {\n return callRuntimeMethod(\"displayName\", name);\n};\n\nexport const historyId = (value: string) => {\n return callRuntimeMethod(\"historyId\", value);\n};\n\nexport const testCaseId = (value: string) => {\n return callRuntimeMethod(\"testCaseId\", value);\n};\n\nexport const attachment = (\n name: string,\n content: Buffer | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachment\", name, content, opts);\n};\n\nexport const attachTrace = (name: string, path: string) => {\n return callRuntimeMethod(\"attachmentFromPath\", name, path, {\n contentType: \"application/vnd.allure.playwright-trace\",\n });\n};\n\nexport const attachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachmentFromPath\", name, path, opts);\n};\n\nexport type StepContext = {\n displayName: (name: string) => void | PromiseLike<void>;\n parameter: (name: string, value: string, mode?: ParameterMode) => void | PromiseLike<void>;\n};\n\nconst stepContext: () => StepContext = () => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const logStep = (name: string, status?: Status, error?: Error): PromiseLike<void> => {\n return callRuntimeMethod(\"logStep\", name, status, error);\n};\n\nexport const step = <T = void>(name: string, body: (context: StepContext) => T | PromiseLike<T>): PromiseLike<T> => {\n return callRuntimeMethod(\"step\", name, () => body(stepContext()));\n};\n\nexport const issue = (url: string, name?: string) => link(url, name, LinkType.ISSUE);\n\nexport const tms = (url: string, name?: string) => link(url, name, LinkType.TMS);\n\nexport const allureId = (value: string) => label(LabelName.ALLURE_ID, value);\n\nexport const epic = (name: string) => label(LabelName.EPIC, name);\n\nexport const feature = (name: string) => label(LabelName.FEATURE, name);\n\nexport const story = (name: string) => label(LabelName.STORY, name);\n\nexport const suite = (name: string) => label(LabelName.SUITE, name);\n\nexport const parentSuite = (name: string) => label(LabelName.PARENT_SUITE, name);\n\nexport const subSuite = (name: string) => label(LabelName.SUB_SUITE, name);\n\nexport const owner = (name: string) => label(LabelName.OWNER, name);\n\nexport const severity = (name: string) => label(LabelName.SEVERITY, name);\n\nexport const layer = (name: string) => label(LabelName.LAYER, name);\n\nexport const tag = (name: string) => label(LabelName.TAG, name);\n\nexport const tags = (...tagsList: string[]) => {\n return callRuntimeMethod(\"labels\", ...tagsList.map((value) => ({ name: LabelName.TAG, value })));\n};\n", "export const DEFAULT_RUNTIME_CONFIG = {\n stepsFromCommands: {\n maxArgumentLength: 128,\n maxArgumentDepth: 3,\n },\n};\n\n/**\n * Pops items from an array into a new one. The item that matches the predicate is the last item to pop.\n * If there is no such item in the array, the array is left unmodified.\n * @param items An array to pop the items from.\n * @param pred A predicate that defines the last item to pop.\n * @returns An array of popped items. The first popped item becomes the first element of this array.\n */\nexport const popUntilFindIncluded = <T>(items: T[], pred: (value: T) => boolean) => {\n const index = items.findIndex(pred);\n return index !== -1 ? toReversed(items.splice(index)) : [];\n};\n\nexport const toReversed = <T = unknown>(arr: T[]): T[] => {\n const len = arr.length;\n const result: T[] = new Array(len);\n\n for (let i = 0; i < len; i++) {\n result[len - i - 1] = arr[i];\n }\n\n return result;\n};\n\nexport const last = <T = unknown>(arr: T[]): T | undefined => {\n return arr[arr.length - 1];\n};\n\nexport const isDefined = <T>(value: T | undefined): value is T => typeof value !== \"undefined\";\n", "import type { AllureSpecState, CypressMessage, CypressTest, StepDescriptor, StepFinalizer } from \"../types.js\";\nimport { DEFAULT_RUNTIME_CONFIG, last, toReversed } from \"../utils.js\";\n\nexport const getAllureState = () => {\n let state = Cypress.env(\"allure\") as AllureSpecState;\n\n if (!state) {\n state = {\n config: DEFAULT_RUNTIME_CONFIG,\n initialized: false,\n messages: [],\n testPlan: undefined,\n currentTest: undefined,\n projectDir: undefined,\n stepStack: [],\n stepsToFinalize: [],\n nextApiStepId: 0,\n };\n\n Cypress.env(\"allure\", state);\n }\n\n return state;\n};\n\nexport const isAllureInitialized = () => getAllureState().initialized;\n\nexport const setAllureInitialized = () => {\n getAllureState().initialized = true;\n};\n\nexport const getRuntimeMessages = () => getAllureState().messages;\n\nexport const setRuntimeMessages = (value: CypressMessage[]) => {\n getAllureState().messages = value;\n};\n\nexport const enqueueRuntimeMessage = (message: CypressMessage) => {\n getRuntimeMessages().push(message);\n};\n\nexport const getAllureTestPlan = () => getAllureState().testPlan;\n\nexport const getProjectDir = () => getAllureState().projectDir;\n\nexport const getCurrentTest = () => getAllureState().currentTest;\n\nexport const setCurrentTest = (test: CypressTest) => {\n getAllureState().currentTest = test;\n};\n\nexport const dropCurrentTest = () => {\n getAllureState().currentTest = undefined;\n};\n\nexport const getConfig = () => getAllureState().config;\n\nexport const getStepStack = () => getAllureState().stepStack;\n\nexport const getCurrentStep = () => last(getStepStack());\n\nexport const pushStep = (step: StepDescriptor) => getStepStack().push(step);\n\nexport const popStep = () => getStepStack().pop();\n\nexport const popSteps = (index: number) => toReversed(getStepStack().splice(index));\n\nexport const popAllSteps = () => popSteps(0);\n\nexport const clearStepStack = () => {\n getAllureState().stepStack = [];\n};\n\nexport const setupStepFinalization = <T extends StepDescriptor>(step: T, finalizer?: StepFinalizer) =>\n getAllureState().stepsToFinalize.push([step, finalizer]);\n\nexport const getStepsToFinalize = () => getAllureState().stepsToFinalize;\n\nexport const clearStepsToFinalize = () => {\n const state = getAllureState();\n state.stepsToFinalize = [];\n};\n", "import { LabelName } from \"allure-js-commons\";\nimport type { TestPlanV1 } from \"allure-js-commons/sdk\";\nimport type { CypressSuite, CypressTest } from \"../types.js\";\nimport { getAllureTestPlan } from \"./state.js\";\nimport { getTestMetadata, resolveSpecRelativePath } from \"./utils.js\";\n\nexport const applyTestPlan = (spec: Cypress.Spec, root: CypressSuite) => {\n const testPlan = getAllureTestPlan();\n if (testPlan) {\n const specPath = resolveSpecRelativePath(spec);\n for (const suite of iterateSuites(root)) {\n const indicesToRemove = getIndicesOfDeselectedTests(testPlan, spec, specPath, suite.tests);\n removeSortedIndices(suite.tests, indicesToRemove);\n }\n }\n};\n\nconst iterateSuites = function* (parent: CypressSuite) {\n const suiteStack: CypressSuite[] = [];\n for (let s: CypressSuite | undefined = parent; s; s = suiteStack.pop()) {\n yield s;\n\n // Pushing in reverse allows us to maintain depth-first pre-order traversal -\n // the same order as used by Mocha & Cypress.\n for (let i = s.suites.length - 1; i >= 0; i--) {\n suiteStack.push(s.suites[i]);\n }\n }\n};\n\nconst getIndicesOfDeselectedTests = (\n testPlan: TestPlanV1,\n spec: Cypress.Spec,\n specPath: string,\n tests: readonly CypressTest[],\n) => {\n const indicesToRemove: number[] = [];\n tests.forEach((test, index) => {\n const { fullNameSuffix, labels } = getTestMetadata(test);\n const fullName = `${specPath}#${fullNameSuffix}`;\n const allureId = labels.find(({ name }) => name === LabelName.ALLURE_ID)?.value;\n\n if (!includedInTestPlan(testPlan, fullName, allureId)) {\n indicesToRemove.push(index);\n }\n });\n return indicesToRemove;\n};\n\nconst removeSortedIndices = <T>(arr: T[], indices: readonly number[]) => {\n for (let i = indices.length - 1; i >= 0; i--) {\n arr.splice(indices[i], 1);\n }\n};\n\nconst includedInTestPlan = (testPlan: TestPlanV1, fullName: string, allureId: string | undefined): boolean =>\n testPlan.tests.some((test) => (allureId && test.id?.toString() === allureId) || test.selector === fullName);\n", "import type { CypressHook, CypressSuite, CypressTest } from \"../../types.js\";\nimport {\n completeHookErrorReporting,\n completeSpecIfNoAfterHookLeft,\n flushRuntimeMessages,\n reportTestPass as onPass,\n reportTestSkip as onPending,\n reportSuiteEnd as onSuiteEnd,\n reportTestEnd as onTestEnd,\n reportHookEnd,\n reportHookStart,\n reportRunStart,\n reportSuiteStart,\n reportTestOrHookFail,\n reportTestStart,\n} from \"../lifecycle.js\";\nimport { initTestRuntime } from \"../runtime.js\";\nimport { applyTestPlan } from \"../testplan.js\";\nimport { isAllureHook, isRootAfterAllHook, isTestReported } from \"../utils.js\";\n\nexport const ALLURE_REPORT_SYSTEM_HOOK = \"__allure_report_system_hook__\";\n\nexport const registerMochaEventListeners = () => {\n ((Cypress as any).mocha.getRunner() as Mocha.Runner)\n .on(\"start\", onStart)\n .on(\"suite\", onSuite)\n .on(\"suite end\", onSuiteEnd)\n .on(\"hook\", onHook)\n .on(\"hook end\", onHookEnd)\n .on(\"test\", onTest)\n .on(\"pass\", onPass)\n .on(\"fail\", onFail)\n .on(\"pending\", onPending)\n .on(\"test end\", onTestEnd);\n};\n\nexport const injectFlushMessageHooks = () => {\n afterEach(ALLURE_REPORT_SYSTEM_HOOK, flushRuntimeMessages);\n after(ALLURE_REPORT_SYSTEM_HOOK, onAfterAll);\n};\n\nconst onStart = () => {\n initTestRuntime();\n reportRunStart();\n};\n\nconst onSuite = (suite: CypressSuite) => {\n if (suite.root) {\n applyTestPlan(Cypress.spec, suite);\n }\n reportSuiteStart(suite);\n};\n\nconst onHook = (hook: CypressHook) => {\n if (isAllureHook(hook)) {\n return;\n }\n\n reportHookStart(hook);\n};\n\nconst onHookEnd = (hook: CypressHook) => {\n if (isAllureHook(hook)) {\n return;\n }\n\n reportHookEnd(hook);\n};\n\nconst onTest = (test: CypressTest) => {\n // Cypress emits an extra EVENT_TEST_BEGIN if the test is skipped.\n // reportTestSkip does that already, so we need to filter the extra event out.\n if (!isTestReported(test)) {\n reportTestStart(test);\n }\n};\n\nconst onFail = (testOrHook: CypressTest | CypressHook, err: Error) => {\n const isHook = \"hookName\" in testOrHook;\n if (isHook && isRootAfterAllHook(testOrHook)) {\n // Errors in spec-level 'after all' hooks are handled by Allure wrappers.\n return;\n }\n\n const isAllureHookFailure = isHook && isAllureHook(testOrHook);\n\n if (isAllureHookFailure) {\n // Normally, Allure hooks are skipped from the report.\n // In case of errors, it will be helpful to see them.\n reportHookStart(testOrHook, Date.now() - (testOrHook.duration ?? 0));\n }\n\n // This will mark the fixture and the test (if any) as failed/broken.\n reportTestOrHookFail(err);\n\n if (isHook) {\n // This will end the fixture and test (if any) and will report the remaining\n // tests in the hook's suite (the ones that will be skipped by Cypress/Mocha).\n completeHookErrorReporting(testOrHook, err);\n }\n};\n\nconst onAfterAll = function (this: Mocha.Context) {\n flushRuntimeMessages();\n completeSpecIfNoAfterHookLeft(this);\n};\n", "import { Status } from \"allure-js-commons\";\nimport type { StatusDetails } from \"allure-js-commons\";\nimport { extractMetadataFromString, getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport type {\n CypressConsoleProps,\n CypressHook,\n CypressLogEntry,\n CypressRenderProps,\n CypressStepStopMessage,\n CypressSuite,\n CypressTest,\n StepDescriptor,\n} from \"../types.js\";\nimport { ALLURE_REPORT_SYSTEM_HOOK } from \"./events/mocha.js\";\nimport { getAllureState, getProjectDir } from \"./state.js\";\nimport { resolveStepStatus } from \"./steps.js\";\n\nconst IS_WIN = Cypress.platform === \"win32\";\n\nexport const getFileNameFromPath = (path: string) => path.substring(path.lastIndexOf(IS_WIN ? \"\\\\\" : \"/\") + 1);\n\nexport const resolveSpecRelativePath = (spec: Cypress.Spec) => {\n const projectDir = getProjectDir();\n const specPath = projectDir ? spec.absolute.substring(projectDir.length + 1) : spec.relative;\n return IS_WIN ? specPath.replaceAll(\"\\\\\", \"/\") : specPath;\n};\n\nexport const uint8ArrayToBase64 = (data: unknown) => {\n // @ts-ignore\n const u8arrayLike = Array.isArray(data) || data.buffer;\n\n if (!u8arrayLike) {\n return data as string;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return btoa(String.fromCharCode.apply(null, data as number[]));\n};\n\nexport const getTestStartData = (test: CypressTest) => ({\n ...getTestMetadata(test),\n start:\n typeof test.wallClockStartedAt === \"string\"\n ? Date.parse(test.wallClockStartedAt)\n : test.wallClockStartedAt?.getTime?.() || Date.now(),\n});\n\nexport const getTestStopData = (test: CypressTest) => ({\n duration: test.duration ?? 0,\n retries: (test as any)._retries ?? 0,\n});\n\nexport const getTestSkipData = () => ({\n statusDetails: { message: \"This is a pending test\" },\n});\n\nexport const getStepStopData = (step: StepDescriptor, status?: Status, statusDetails?: StatusDetails) => {\n const data: CypressStepStopMessage[\"data\"] = {\n id: step.id,\n stop: Date.now(),\n status: status ?? resolveStepStatus(step),\n };\n if (statusDetails) {\n data.statusDetails = statusDetails;\n }\n return data;\n};\n\nconst testReportedKey = Symbol(\"The test has been reported to Allure\");\n\nexport const markTestAsReported = (test: CypressTest) => {\n (test as any)[testReportedKey] = true;\n};\n\nexport const isTestReported = (test: CypressTest) => (test as any)[testReportedKey] === true;\n\nexport const iterateSuites = function* (parent: CypressSuite) {\n const suiteStack: CypressSuite[] = [];\n for (let s: CypressSuite | undefined = parent; s; s = suiteStack.pop()) {\n yield s;\n\n // Pushing in reverse allows us to maintain depth-first pre-order traversal;\n // the same order is used by Mocha & Cypress.\n for (let i = s.suites.length - 1; i >= 0; i--) {\n suiteStack.push(s.suites[i]);\n }\n }\n};\n\nexport const iterateTests = function* (parent: CypressSuite) {\n for (const suite of iterateSuites(parent)) {\n yield* suite.tests;\n }\n};\n\nexport const getSuitePath = (test: CypressTest) => {\n const suites: CypressSuite[] = [];\n for (let s: CypressSuite | undefined = test.parent; s; s = s.parent) {\n suites.push(s);\n }\n suites.reverse();\n return suites;\n};\n\nexport const getSuiteTitlePath = (test: CypressTest): string[] =>\n getSuitePath(test)\n .filter((s) => s.title)\n .map((s) => s.title);\n\nexport const generateApiStepId = () => (getAllureState().nextApiStepId++).toString();\n\nexport const getTestMetadata = (test: CypressTest) => {\n const rawName = test.title;\n const { cleanTitle: name, labels, links } = extractMetadataFromString(rawName);\n const suites = test.titlePath().slice(0, -1);\n const fullNameSuffix = `${[...suites, name].join(\" \")}`;\n return { name, labels, links, fullNameSuffix };\n};\n\nexport const isAllureHook = (hook: CypressHook) => hook.title.includes(ALLURE_REPORT_SYSTEM_HOOK);\n\nexport const isRootAfterAllHook = (hook: CypressHook) => hook.parent!.root && hook.hookName === \"after all\";\n\nexport const isLastRootAfterHook = (context: Mocha.Context) => {\n const currentAfterAll = context.test as CypressHook;\n const rootSuite = (context.test as CypressHook).parent!;\n const hooks = (rootSuite as any).hooks as CypressHook[];\n const lastAfterAll = hooks.findLast((h) => h.hookName === \"after all\");\n return lastAfterAll?.hookId === currentAfterAll.hookId;\n};\n\nexport const getStatusDataOfTestSkippedByHookError = (\n hookTitle: string,\n isEachHook: boolean,\n err: Error,\n suite: CypressSuite,\n) => {\n const status = isEachHook ? Status.SKIPPED : getStatusFromError(err);\n const { message, trace } = getMessageAndTraceFromError(err);\n return {\n status,\n statusDetails: {\n message: isEachHook ? getSkipReason(hookTitle, suite) : message,\n trace,\n },\n };\n};\n\nconst getSkipReason = (hookTitle: string, suite: CypressSuite) => {\n const suiteName = suite.title ? `'${suite.title}'` : \"root\";\n return `'${hookTitle}' defined in the ${suiteName} suite has failed`;\n};\n\nexport const resolveConsoleProps = (entry: CypressLogEntry): CypressConsoleProps => {\n // consoleProps can be a function or an object(cy.origin just return an object)\n return typeof entry.attributes.consoleProps === \"function\"\n ? entry.attributes.consoleProps()\n : entry.attributes.consoleProps;\n};\n\nexport const resolveRenderProps = (entry: CypressLogEntry): CypressRenderProps => {\n // renderProps can be a function or an object(cy.origin just return an object)\n return typeof entry?.attributes?.renderProps === \"function\"\n ? entry.attributes.renderProps()\n : entry.attributes?.renderProps;\n};\n", "import type { StatusDetails } from \"allure-js-commons\";\nimport { Status } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport type {\n ApiStepDescriptor,\n CypressStepFinalizeMessage,\n LogStepDescriptor,\n StepDescriptor,\n StepFinalizer,\n} from \"../types.js\";\nimport { popUntilFindIncluded } from \"../utils.js\";\nimport { reportStepStart, reportStepStop } from \"./lifecycle.js\";\nimport {\n clearStepsToFinalize,\n enqueueRuntimeMessage,\n getStepStack,\n getStepsToFinalize,\n popAllSteps,\n pushStep,\n setupStepFinalization,\n} from \"./state.js\";\nimport { generateApiStepId } from \"./utils.js\";\n\nexport const ALLURE_STEP_CMD_SUBJECT = {};\n\nexport const isApiStep = (descriptor: StepDescriptor): descriptor is ApiStepDescriptor => {\n return descriptor.type === \"api\";\n};\n\nexport const isLogStep = (descriptor: StepDescriptor): descriptor is LogStepDescriptor => {\n return descriptor.type === \"log\";\n};\n\nexport const startAllureApiStep = (name: string) => reportStepStart(pushAllureStep(), name);\n\nexport const pushAllureStep = () => {\n const id = generateApiStepId();\n pushStep({ id, type: \"api\" });\n return id;\n};\n\nexport const reportStepError = (error: Error) => {\n const status = getStatusFromError(error);\n const statusDetails = getMessageAndTraceFromError(error);\n\n // Cypress will abort the test/hook execution soon. No subsequent commands will be run, including the ones that\n // have been scheduled by `allure.step` to stop the currently running steps.\n // Additionally, we can't tell in advance if the current command log steps will be stopped normally or not.\n //\n // Given that, this function will stop all consecutive Allure API steps at the tip of the step stack.\n // The command log steps will be given a chance to stop normally to get the most correct timings.\n //\n // The command log steps that won't stop normally (and Allure API substeps thereof) will be stopped during the\n // test/hook finalization phase.\n stopAllureApiStepStackTip(status, statusDetails);\n\n // It's not guaranteed for command log steps and intermediate Allure API steps to have access to the error at the\n // moment they are stopped.\n // Additionally, Cypress may not update the stack trace of the error at that time. Until that happens, the stack\n // trace points deep in the bundled code, which is little to no use for the user. Therefore, we need to associate\n // the remaining steps with the error object to grab the updated stack trace later.\n associateErrorWithRunningSteps(error);\n};\n\nexport const stopCurrentAllureApiStep = (status?: Status, statusDetails?: StatusDetails) =>\n findAndStopStepWithSubsteps((stepDescriptor) => isApiStep(stepDescriptor), status, statusDetails);\n\nexport const findAndStopStepWithSubsteps = (\n pred: (stepEntry: StepDescriptor) => boolean,\n status?: Status,\n statusDetails?: StatusDetails,\n) => stopSelectedSteps(popUntilFindIncluded(getStepStack(), pred), status, statusDetails);\n\nexport const stopAllSteps = (status?: Status, statusDetails?: StatusDetails) =>\n stopSelectedSteps(popAllSteps(), status, statusDetails);\n\nexport const finalizeSteps = () => {\n // This will stop all dangling steps (like log groups with missing endGroup calls or logs that haven't been\n // finished by Cypress due to an error).\n stopAllSteps();\n\n getStepsToFinalize().forEach(finalizeOneStep);\n clearStepsToFinalize();\n};\n\nexport const resolveStepStatus = (step: StepDescriptor) =>\n step.error ? getStatusFromError(step.error) : Status.PASSED;\n\nconst finalizeOneStep = ([step, finalizer]: [StepDescriptor, StepFinalizer | undefined]) => {\n const { id, error } = step;\n const data: CypressStepFinalizeMessage[\"data\"] = { id };\n\n if (error) {\n // Cypress rewrites the stack trace of an error to point to the location in the test file. Until then, the stack\n // trace points inside the messy bundle, which is not helpful. There are circumstances when we can't be sure this\n // has happened when a step is about to stop. That's why we defer setting the status details until we are sure\n // Cypress does its job.\n data.statusDetails = getMessageAndTraceFromError(error);\n }\n\n finalizer?.(data);\n\n enqueueRuntimeMessage({\n type: \"cypress_step_finalize\",\n data,\n });\n};\n\nconst stopAllureApiStepStackTip = (status: Status, statusDetails: StatusDetails) => {\n const stepStack = getStepStack();\n const firstApiStepAfterLastLogStep = stepStack.at(stepStack.findLastIndex(isLogStep) + 1);\n if (firstApiStepAfterLastLogStep) {\n findAndStopStepWithSubsteps(\n (logEntryOrMessage) => Object.is(logEntryOrMessage, firstApiStepAfterLastLogStep),\n status,\n statusDetails,\n );\n }\n};\n\nconst propagateErrorToStepDescriptor = (step: StepDescriptor, errorOfSubstep: Error | undefined) => {\n if (isLogStep(step)) {\n const error = step.log.attributes.error;\n if (error) {\n return (step.error = error);\n }\n }\n\n if (errorOfSubstep) {\n step.error = errorOfSubstep;\n }\n\n return step.error;\n};\n\nconst stopSelectedSteps = (steps: readonly StepDescriptor[], status?: Status, statusDetails?: StatusDetails) => {\n let error: Error | undefined;\n for (const stepEntry of steps) {\n error = propagateErrorToStepDescriptor(stepEntry, error);\n stopStep(stepEntry, status, statusDetails);\n }\n\n if (error) {\n associateErrorWithRunningSteps(error);\n }\n};\n\nconst associateErrorWithRunningSteps = (error: Error) => getStepStack().forEach((step) => (step.error = error));\n\nconst stopStep = (step: StepDescriptor, status?: Status, statusDetails?: StatusDetails) => {\n reportStepStop(step, status, statusDetails);\n\n if (isApiStep(step) && step.error) {\n setupStepFinalization(step);\n }\n};\n", "import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions } from \"allure-js-commons\";\nimport { Status } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError } from \"allure-js-commons/sdk\";\nimport type { TestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport { getGlobalTestRuntime, setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type { AllureCypressTaskArgs, CypressMessage } from \"../types.js\";\nimport { enqueueRuntimeMessage, getRuntimeMessages, setRuntimeMessages } from \"./state.js\";\nimport { ALLURE_STEP_CMD_SUBJECT, startAllureApiStep, stopCurrentAllureApiStep } from \"./steps.js\";\nimport { uint8ArrayToBase64 } from \"./utils.js\";\n\nexport const initTestRuntime = () => setGlobalTestRuntime(new AllureCypressTestRuntime() as TestRuntime);\n\nexport const getTestRuntime = () => getGlobalTestRuntime() as AllureCypressTestRuntime;\n\nclass AllureCypressTestRuntime implements TestRuntime {\n constructor() {\n this.#resetMessages();\n }\n\n labels(...labels: Label[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n links(...links: Link[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n parameter(name: string, value: string, options?: ParameterOptions) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n description(markdown: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n descriptionHtml(html: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n displayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n historyId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n testCaseId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n // @ts-ignore\n attachment(name: string, content: string, options: AttachmentOptions) {\n // @ts-ignore\n const attachmentRawContent: string | Uint8Array = content?.type === \"Buffer\" ? content.data : content;\n const actualEncoding = typeof attachmentRawContent === \"string\" ? \"utf8\" : \"base64\";\n const attachmentContent = uint8ArrayToBase64(attachmentRawContent);\n\n return this.#enqueueMessageAsync({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n logStep(name: string, status: Status = Status.PASSED, error?: Error): PromiseLike<void> {\n if (this.#isInOriginContext()) {\n startAllureApiStep(name);\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n }\n\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve();\n })\n .then(() => {\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n });\n }\n\n step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve(body());\n })\n .then((result) => {\n stopCurrentAllureApiStep();\n return result;\n });\n }\n\n stepDisplayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n name,\n },\n });\n }\n\n stepParameter(name: string, value: string, mode?: ParameterMode) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n flushAllureMessagesToTask(taskName: string) {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n cy.task(taskName, { absolutePath: Cypress.spec.absolute, messages }, { log: false });\n }\n }\n\n flushAllureMessagesToTaskAsync(taskName: string): Cypress.Chainable<unknown> | undefined {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n const args: AllureCypressTaskArgs = {\n absolutePath: Cypress.spec.absolute,\n messages,\n isInteractive: Cypress.config(\"isInteractive\"),\n };\n return cy.task(taskName, args, { log: false });\n }\n }\n\n #resetMessages() {\n setRuntimeMessages([]);\n }\n\n #enqueueMessageAsync(message: CypressMessage): PromiseLike<void> {\n enqueueRuntimeMessage(message);\n return Cypress.Promise.resolve();\n }\n\n #dequeueAllMessages() {\n const messages = getRuntimeMessages();\n this.#resetMessages();\n return messages;\n }\n\n #isInOriginContext(): boolean {\n try {\n const hasOriginContext = !!(window as any).cypressOriginContext;\n const hasOriginWindow = !!(window as any).cypressOriginWindow;\n\n if (hasOriginContext || hasOriginWindow) {\n return true;\n }\n\n const baseUrl = Cypress.config(\"baseUrl\");\n const currentOrigin = window.location.origin;\n\n if (baseUrl && currentOrigin !== baseUrl) {\n return true;\n }\n\n const cypressInstance = (window as any).Cypress;\n\n if (cypressInstance && cypressInstance.state && cypressInstance.state(\"origin\")) {\n return true;\n }\n\n try {\n const cyExists = typeof cy !== \"undefined\";\n const cyTaskExists = typeof cy.task !== \"undefined\";\n\n // In cy.origin context, cy.task may not be available or may throw\n if (!cyExists || !cyTaskExists) {\n return true;\n }\n } catch (error) {\n return true;\n }\n\n return false;\n } catch (error) {\n return true;\n }\n }\n}\n", "import { ContentType, Status } from \"allure-js-commons\";\nimport type { StatusDetails } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport type { CypressFailMessage, CypressHook, CypressSuite, CypressTest, StepDescriptor } from \"../types.js\";\nimport { getTestRuntime } from \"./runtime.js\";\nimport { dropCurrentTest, enqueueRuntimeMessage, getCurrentTest, setCurrentTest } from \"./state.js\";\nimport { finalizeSteps, stopAllSteps } from \"./steps.js\";\nimport {\n getStatusDataOfTestSkippedByHookError,\n getStepStopData,\n getSuitePath,\n getTestSkipData,\n getTestStartData,\n getTestStopData,\n isAllureHook,\n isLastRootAfterHook,\n isTestReported,\n iterateTests,\n markTestAsReported,\n} from \"./utils.js\";\n\nexport const reportRunStart = () => {\n enqueueRuntimeMessage({\n type: \"cypress_run_start\",\n data: {},\n });\n};\n\nexport const reportSuiteStart = (suite: CypressSuite) => {\n enqueueRuntimeMessage({\n type: \"cypress_suite_start\",\n data: {\n id: suite.id,\n name: suite.title,\n root: suite.root,\n start: Date.now(),\n },\n });\n};\n\nexport const reportSuiteEnd = (suite: CypressSuite) => {\n enqueueRuntimeMessage({\n type: \"cypress_suite_end\",\n data: {\n root: suite.root,\n stop: Date.now(),\n },\n });\n};\n\nexport const reportHookStart = (hook: CypressHook, start?: number) => {\n enqueueRuntimeMessage({\n type: \"cypress_hook_start\",\n data: {\n name: hook.title,\n scopeType: hook.hookName.includes(\"each\") ? \"each\" : \"all\",\n position: hook.hookName.includes(\"before\") ? \"before\" : \"after\",\n start: start ?? Date.now(),\n },\n });\n};\n\nexport const reportHookEnd = (hook: CypressHook) => {\n finalizeSteps();\n enqueueRuntimeMessage({\n type: \"cypress_hook_end\",\n data: {\n duration: hook.duration ?? 0,\n },\n });\n};\n\nexport const reportTestStart = (test: CypressTest) => {\n setCurrentTest(test);\n enqueueRuntimeMessage({\n type: \"cypress_test_start\",\n data: getTestStartData(test),\n });\n markTestAsReported(test);\n};\n\nexport const reportStepStart = (id: string, name: string) => {\n enqueueRuntimeMessage({\n type: \"cypress_step_start\",\n data: {\n id,\n name,\n start: Date.now(),\n },\n });\n};\n\nexport const reportStepStop = (step: StepDescriptor, status?: Status, statusDetails?: StatusDetails) => {\n enqueueRuntimeMessage({\n type: \"cypress_step_stop\",\n data: getStepStopData(step, status, statusDetails),\n });\n};\n\nexport const reportTestPass = () => {\n enqueueRuntimeMessage({\n type: \"cypress_test_pass\",\n data: {},\n });\n};\n\nexport const reportTestOrHookFail = (err: Error) => {\n const status = getStatusFromError(err);\n const statusDetails = getMessageAndTraceFromError(err);\n\n stopAllSteps(status, statusDetails);\n\n enqueueRuntimeMessage({\n type: \"cypress_fail\",\n data: {\n status,\n statusDetails,\n },\n });\n};\n\nexport const completeHookErrorReporting = (hook: CypressHook, err: Error) => {\n const isEachHook = hook.hookName.includes(\"each\");\n const suite = hook.parent!;\n const testFailData = getStatusDataOfTestSkippedByHookError(hook.title, isEachHook, err, suite);\n\n // Cypress doens't emit 'hook end' if the hook has failed.\n reportHookEnd(hook);\n\n // Cypress doens't emit 'test end' if the hook has failed.\n // We must report the test's end manualy in case of a 'before each' hook.\n reportCurrentTestIfAny();\n\n // Cypress skips the remaining tests in the suite of a failed hook.\n // We should include them to the report manually.\n reportRemainingTests(suite, testFailData);\n};\n\nexport const reportTestSkip = (test: CypressTest) => {\n if (isTestReported(test)) {\n stopAllSteps(Status.SKIPPED, {\n message: \"The test was skipped before the command was completed\",\n });\n } else {\n reportTestStart(test);\n }\n\n enqueueRuntimeMessage({\n type: \"cypress_test_skip\",\n data: getTestSkipData(),\n });\n};\n\nexport const reportTestEnd = (test: CypressTest) => {\n finalizeSteps();\n enqueueRuntimeMessage({\n type: \"cypress_test_end\",\n data: {\n duration: test.duration ?? 0,\n retries: (test as any)._retries ?? 0,\n },\n });\n dropCurrentTest();\n};\n\nexport const reportScreenshot = (path: string, name: string) => {\n enqueueRuntimeMessage({\n type: \"attachment_path\",\n data: { path, name, contentType: ContentType.PNG },\n });\n};\n\nexport const completeSpecIfNoAfterHookLeft = (context: Mocha.Context) => {\n if (isLastRootAfterHook(context)) {\n const hook = context.test as CypressHook;\n if (!isAllureHook(hook)) {\n reportHookEnd(hook);\n }\n return completeSpecAsync();\n }\n};\n\nexport const completeSpecOnAfterHookFailure = (\n context: Mocha.Context,\n hookError: Error,\n): Cypress.Chainable<unknown> | undefined => {\n try {\n reportTestOrHookFail(hookError);\n completeHookErrorReporting(context.test as CypressHook, hookError);\n\n // cy.task's then doesn't have onrejected, that's why we don't log async Allure errors here.\n return completeSpecAsync();\n } catch (allureError) {\n logAllureRootAfterError(context, allureError);\n }\n};\n\nexport const throwAfterSpecCompletion = (context: Mocha.Context, err: any) => {\n const chain = completeSpecOnAfterHookFailure(context, err as Error)?.then(() => {\n throw err;\n });\n if (!chain) {\n throw err;\n }\n};\n\nexport const flushRuntimeMessages = () => getTestRuntime().flushAllureMessagesToTask(\"reportAllureCypressSpecMessages\");\n\nexport const completeSpecAsync = () =>\n getTestRuntime().flushAllureMessagesToTaskAsync(\"reportFinalAllureCypressSpecMessages\");\n\nconst reportCurrentTestIfAny = () => {\n const currentTest = getCurrentTest();\n if (currentTest) {\n reportTestEnd(currentTest);\n }\n};\n\nconst reportRemainingTests = (suite: CypressSuite, testFailData: CypressFailMessage[\"data\"]) => {\n for (const test of iterateTests(suite)) {\n // Some tests in the suite might've been already reported.\n if (!isTestReported(test)) {\n reportTestsSkippedByHookError(\n test,\n test.pending ? { ...getTestSkipData(), status: Status.SKIPPED } : testFailData,\n );\n }\n }\n};\n\nconst reportTestsSkippedByHookError = (test: CypressTest, testFailData: CypressFailMessage[\"data\"]) => {\n enqueueRuntimeMessage({\n type: \"cypress_skipped_test\",\n data: {\n ...getTestStartData(test),\n ...testFailData,\n ...getTestStopData(test),\n suites: getSuitePath(test).map((s) => s.id),\n },\n });\n markTestAsReported(test);\n};\n\nconst logAllureRootAfterError = (context: Mocha.Context, err: unknown) => {\n // We play safe and swallow errors here to keep the original 'after all' error.\n try {\n // eslint-disable-next-line no-console\n console.error(`Unexpected error when reporting the failure of ${context.test?.title ?? \"'after all'\"}`);\n // eslint-disable-next-line no-console\n console.error(err);\n } catch {}\n};\n", "import { isPromise } from \"allure-js-commons/sdk\";\nimport type { CypressSuiteFunction, DirectHookImplementation, HookImplementation } from \"../types.js\";\nimport {\n completeSpecIfNoAfterHookLeft,\n completeSpecOnAfterHookFailure,\n throwAfterSpecCompletion,\n} from \"./lifecycle.js\";\n\ntype SuiteDepthCounter = {\n getSuiteDepth: () => number;\n incrementSuiteDepth: () => void;\n decrementSuiteDepth: () => void;\n};\n\n/**\n * Patches the `after` function, to inject reporting of spec-level\n * `after` hooks defined by the user.\n */\nexport const enableScopeLevelAfterHookReporting = () => {\n const suiteDepthCounter = createSuiteDepthCounterState();\n patchDescribe(suiteDepthCounter);\n patchAfter(suiteDepthCounter);\n};\n\nconst createSuiteDepthCounterState = (): SuiteDepthCounter => {\n let suiteDepth = 0;\n return {\n getSuiteDepth: () => suiteDepth,\n incrementSuiteDepth: () => {\n suiteDepth++;\n },\n decrementSuiteDepth: () => {\n suiteDepth--;\n },\n };\n};\n\nconst patchDescribe = ({ incrementSuiteDepth, decrementSuiteDepth }: SuiteDepthCounter) => {\n const patchDescribeFn =\n (target: CypressSuiteFunction): CypressSuiteFunction =>\n (title, configOrFn, fn) => {\n incrementSuiteDepth();\n try {\n return forwardDescribeCall(target, title, configOrFn, fn);\n } finally {\n decrementSuiteDepth();\n }\n };\n const originalDescribeFn: Mocha.SuiteFunction = globalThis.describe;\n const patchedDescribe = patchDescribeFn(originalDescribeFn) as Mocha.SuiteFunction;\n patchedDescribe.only = patchDescribeFn(\n originalDescribeFn.only as CypressSuiteFunction,\n ) as Mocha.ExclusiveSuiteFunction;\n patchedDescribe.skip = patchDescribeFn(originalDescribeFn.skip as CypressSuiteFunction) as Mocha.PendingSuiteFunction;\n globalThis.describe = patchedDescribe;\n};\n\nconst patchAfter = ({ getSuiteDepth }: SuiteDepthCounter) => {\n const originalAfter = globalThis.after;\n const patchedAfter = (nameOrFn: string | HookImplementation, fn?: HookImplementation): void => {\n return typeof nameOrFn === \"string\"\n ? originalAfter(nameOrFn, wrapRootAfterFn(getSuiteDepth, fn))\n : originalAfter(wrapRootAfterFn(getSuiteDepth, nameOrFn)!);\n };\n globalThis.after = patchedAfter;\n};\n\nconst forwardDescribeCall = (target: CypressSuiteFunction, ...args: Parameters<CypressSuiteFunction>) => {\n const [title, configOrFn, fn] = args;\n if (typeof fn === \"undefined\" && typeof configOrFn === \"undefined\") {\n return target(title);\n } else if (typeof configOrFn === \"function\") {\n return target(title, configOrFn);\n } else {\n return target(title, configOrFn, fn);\n }\n};\n\nconst wrapRootAfterFn = (getSuiteDepth: () => number, fn?: HookImplementation): HookImplementation | undefined => {\n if (getSuiteDepth() === 0 && fn) {\n const wrappedFn = fn.length ? wrapAfterFnWithCallback(fn) : wrapAfterFnWithoutArgs(fn as DirectHookImplementation);\n Object.defineProperty(wrappedFn, \"name\", { value: fn.name });\n return wrappedFn;\n }\n return fn;\n};\n\nconst wrapAfterFnWithCallback = (fn: Mocha.Func): Mocha.Func => {\n return function (this: Mocha.Context, done: Mocha.Done) {\n const wrappedDone = (hookError?: Error) => {\n if (hookError) {\n if (!completeSpecOnAfterHookFailure(this, hookError)?.then(() => done(hookError))) {\n done(hookError);\n }\n return;\n }\n\n try {\n if (completeSpecIfNoAfterHookLeft(this)?.then(() => done())) {\n return;\n }\n } catch (allureError) {\n done(allureError);\n return;\n }\n\n done();\n };\n return fn.bind(this)(wrappedDone);\n };\n};\n\nconst wrapAfterFnWithoutArgs = (fn: DirectHookImplementation) => {\n return function (this: Mocha.Context) {\n let result;\n let syncError: any;\n\n try {\n result = fn.bind(this)();\n } catch (e) {\n syncError = e;\n }\n\n if (syncError) {\n throwAfterSpecCompletion(this, syncError);\n } else if (isPromise(result)) {\n return result.then(\n () => completeSpecIfNoAfterHookLeft(this),\n (asyncError) => throwAfterSpecCompletion(this, asyncError),\n );\n } else {\n completeSpecIfNoAfterHookLeft(this);\n return result;\n }\n };\n};\n", "import { serialize } from \"allure-js-commons/sdk\";\nimport { getConfig } from \"./state.js\";\n\nexport default (value: unknown) => {\n return isDomObject(value) ? stringifyAsDom(value) : serializeAsObject(value);\n};\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value);\n\nconst stripAncestorRefs = (value: unknown, ancestors: object[] = []): unknown => {\n if (!isPlainObject(value)) {\n return value;\n }\n\n const result: Record<string, unknown> = {};\n ancestors.push(value);\n\n for (const [key, prop] of Object.entries(value)) {\n if (typeof prop === \"object\" && prop !== null) {\n if (ancestors.includes(prop)) {\n continue;\n }\n result[key] = stripAncestorRefs(prop, ancestors);\n } else {\n result[key] = prop;\n }\n }\n\n ancestors.pop();\n return result;\n};\n\nexport const serializeAsObject = (value: unknown) => {\n if (isPlainObject(value)) {\n const cleaned = stripAncestorRefs(value);\n return serialize({ ...(cleaned as object) }, getSerializeOptions());\n }\n return serialize(value, getSerializeOptions());\n};\n\nconst getSerializeOptions = () => {\n const {\n stepsFromCommands: { maxArgumentDepth: maxDepth, maxArgumentLength: maxLength },\n } = getConfig();\n\n return { maxDepth, maxLength, nonNullReplacerWithDomSupport };\n};\n\nconst isDomObject = (value: unknown): value is object =>\n typeof value === \"object\" && value !== null && Cypress.dom.isDom(value);\n\n// @ts-ignore\nconst stringifyAsDom = (value: object) => Cypress.dom.stringify(value, \"long\");\n\nconst nonNullReplacerWithDomSupport = (_: string, value: unknown) => {\n if (typeof value === \"object\") {\n // Exclude null properties to make the result more compact.\n if (value === null) {\n return undefined;\n }\n\n if (Cypress.dom.isDom(value)) {\n // Window, document, and DOM element properties are serialized with Cypress.dom.stringify.\n return stringifyAsDom(value);\n }\n }\n\n // Use the implementation from allure-js-commons/sdk in all other cases.\n return value;\n};\n", "import type { Parameter } from \"allure-js-commons\";\nimport type { CypressLogEntry, LogStepDescriptor } from \"../types.js\";\nimport { isDefined } from \"../utils.js\";\nimport { reportStepStart } from \"./lifecycle.js\";\nimport serializePropValue from \"./serialize.js\";\nimport { getCurrentStep, getStepStack, pushStep, setupStepFinalization } from \"./state.js\";\nimport { ALLURE_STEP_CMD_SUBJECT, findAndStopStepWithSubsteps, isLogStep } from \"./steps.js\";\nimport { resolveConsoleProps, resolveRenderProps } from \"./utils.js\";\n\nexport const shouldCreateStepFromCommandLogEntry = (entry: CypressLogEntry) => {\n const { event, instrument } = entry.attributes;\n if (instrument !== \"command\") {\n // We are interested in the \"TEST BODY\" panel only for now.\n // Other instruments are logged in separate panels.\n return false;\n }\n\n if (event) {\n // Events are tricky to report as they may span across commands and even leave the test's scope.\n // We ignore them for now.\n return false;\n }\n\n if (isApiStepErrorLogEntry(entry)) {\n // Cypress don't create a log message for 'cy.then' except when it throws an error.\n // This is in particularly happens when the function passed to 'allure.step' throws. In such a case however,\n // creating an extra step from the log entry is redundant because the error is already included in the report as\n // a part of the step.\n return false;\n }\n\n return true;\n};\n\n/**\n * Checks if the current step represents a cy.screenshot command log entry. If this is the case, associates the name\n * of the screenshot with the step. Later, that will allow converting the step with the attachment into the attachment\n * step.\n */\nexport const setupScreenshotAttachmentStep = (originalName: string | undefined, name: string) => {\n const step = getCurrentStep();\n if (step && isLogStep(step)) {\n const {\n name: commandName,\n props: { name: nameFromProps },\n } = resolveConsoleProps(step.log);\n if (commandName === \"screenshot\" && nameFromProps === originalName) {\n step.attachmentName = name;\n }\n }\n};\n\nexport const startCommandLogStep = (entry: CypressLogEntry) => {\n const currentLogEntry = getCurrentLogEntry();\n\n if (typeof currentLogEntry !== \"undefined\" && shouldStopCurrentLogStep(currentLogEntry.log, entry)) {\n stopCommandLogStep(currentLogEntry.log.attributes.id);\n }\n\n pushLogEntry(entry);\n reportStepStart(entry.attributes.id, getCommandLogStepName(entry));\n scheduleCommandLogStepStop(entry);\n};\n\nexport const stopCommandLogStep = (entryId: string) => findAndStopStepWithSubsteps(({ id }) => id === entryId);\n\nconst pushLogEntry = (entry: CypressLogEntry) => {\n const id = entry.attributes.id;\n const stepDescriptor: LogStepDescriptor = { id, type: \"log\", log: entry };\n\n pushStep(stepDescriptor);\n\n // Some properties of some Command Log entries are undefined at the time the entry is stopped. An example is the\n // Yielded property of some queries. We defer converting them to Allure step parameters until the test/hook ends.\n setupStepFinalization(stepDescriptor, (data) => {\n data.parameters = getCommandLogStepParameters(entry);\n\n if (stepDescriptor.attachmentName) {\n // Rename the step to match the attachment name. Once the names are the same, Allure will render the\n // attachment in the place of the step.\n data.name = stepDescriptor.attachmentName;\n }\n });\n};\n\nconst scheduleCommandLogStepStop = (entry: CypressLogEntry) => {\n const { groupStart, end, id } = entry.attributes;\n if (end) {\n // Some entries are already completed (this is similar to the idea behind allure.logStep).\n // Cypress won't call entry.end() in such a case, so we need to stop such a step now.\n // Example: cy.log\n stopCommandLogStep(id);\n } else if (groupStart) {\n // A logging group must be stopped be the user via the Cypress.Log.endGroup() call.\n // If the call is missing, the corresponding step will be stopped either at the test's (the hook's) end.\n const originalEndGroup = entry.endGroup;\n entry.endGroup = function () {\n stopCommandLogStep(id);\n return originalEndGroup.call(this);\n };\n } else {\n // Regular log entries are finalized by Cypress via the Cypress.Log.end() call. We're hooking into this function\n // to complete the step at the same time.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalEnd = entry.end;\n entry.end = function () {\n stopCommandLogStep(id);\n return originalEnd.call(this);\n };\n }\n};\n\nconst isApiStepErrorLogEntry = (entry: CypressLogEntry) => {\n const { name } = entry.attributes;\n return name === \"then\" && Object.is(resolveConsoleProps(entry).props[\"Applied To\"], ALLURE_STEP_CMD_SUBJECT);\n};\n\nconst getCommandLogStepName = (entry: CypressLogEntry) => {\n const { name, message, displayName } = entry.attributes;\n const resolvedName = (displayName ?? name).trim();\n const resolvedMessage = (\n maybeGetAssertionLogMessage(entry) ??\n maybeGetCucumberLogMessage(entry) ??\n resolveRenderProps(entry).message ??\n message\n ).trim();\n const stepName = [resolvedName, resolvedMessage].filter(Boolean).join(\" \");\n return stepName;\n};\n\nconst getCommandLogStepParameters = (entry: CypressLogEntry) =>\n getLogProps(entry)\n .map(([k, v]) => ({\n name: k.toString(),\n value: serializePropValue(v),\n }))\n .filter(getPropValueSetFilter(entry));\n\nconst WELL_KNOWN_CUCUMBER_LOG_NAMES = [\"Given\", \"When\", \"Then\", \"And\"];\n\nconst maybeGetCucumberLogMessage = (entry: CypressLogEntry) => {\n const {\n attributes: { name, message },\n } = entry;\n if (WELL_KNOWN_CUCUMBER_LOG_NAMES.includes(name.trim()) && message.startsWith(\"**\") && message.endsWith(\"**\")) {\n return message.substring(2, message.length - 2);\n }\n};\n\nconst getLogProps = (entry: CypressLogEntry) => {\n const isAssertionWithMessage = !!maybeGetAssertionLogMessage(entry);\n const { props, name } = resolveConsoleProps(entry);\n\n // accessing LocalStorage after the page reload can stick the test runner\n // to avoid the issue, we just need to log the command manually\n // the problem potentially can happen with other storage related commands, like `clearAllLocalStorage`, `clearAllSessionStorage`, `getAllLocalStorage`, `getAllSessionStorage`, `setLocalStorage`, `setSessionStorage`\n // but probably, we don't need to silent them all at this moment\n // the context: https://github.com/allure-framework/allure-js/issues/1222\n if ([\"clearLocalStorage\"].includes(name)) {\n return [] as [string, unknown][];\n }\n\n // For assertion logs, we interpolate the 'Message' property, which contains unformatted assertion description,\n // directly into the step's name.\n // No need to keep the exact same information in the step's parameters.\n return Object.entries(props).filter(([k, v]) => isDefined(v) && !(isAssertionWithMessage && k === \"Message\"));\n};\n\nconst maybeGetAssertionLogMessage = (entry: CypressLogEntry) => {\n if (isAssertLog(entry)) {\n const message = resolveConsoleProps(entry).props.Message;\n\n if (message && typeof message === \"string\") {\n return message;\n }\n }\n};\n\nconst isAssertLog = ({ attributes: { name } }: CypressLogEntry) => name === \"assert\";\n\nconst getCurrentLogEntry = () => getStepStack().findLast(isLogStep);\n\nconst shouldStopCurrentLogStep = (currentLogEntry: CypressLogEntry, newLogEntry: CypressLogEntry) => {\n const { groupStart: currentEntryIsGroup, type: currentEntryType } = currentLogEntry.attributes;\n const { type: newEntryType } = newLogEntry.attributes;\n\n return !currentEntryIsGroup && (currentEntryType === \"child\" || newEntryType !== \"child\");\n};\n\nconst getPropValueSetFilter = (entry: CypressLogEntry) =>\n entry.attributes.name === \"wrap\" ? () => true : ({ name, value }: Parameter) => name !== \"Yielded\" || value !== \"{}\";\n", "import type { CypressLogEntry } from \"../../types.js\";\nimport {\n setupScreenshotAttachmentStep,\n shouldCreateStepFromCommandLogEntry,\n startCommandLogStep,\n} from \"../commandLog.js\";\nimport { reportScreenshot } from \"../lifecycle.js\";\nimport { reportStepError } from \"../steps.js\";\nimport { getFileNameFromPath } from \"../utils.js\";\n\nexport const registerCypressEventListeners = () => Cypress.on(\"fail\", onFail).on(\"log:added\", onLogAdded);\n\nexport const enableReportingOfCypressScreenshots = () => Cypress.Screenshot.defaults({ onAfterScreenshot });\n\nconst onAfterScreenshot = (\n ...[, { name: originalName, path }]: Parameters<Cypress.ScreenshotDefaultsOptions[\"onAfterScreenshot\"]>\n) => {\n const name = originalName ?? getFileNameFromPath(path);\n\n reportScreenshot(path, name);\n setupScreenshotAttachmentStep(originalName, name);\n};\n\nconst onLogAdded = (_: Cypress.ObjectLike, entry: CypressLogEntry) => {\n if (shouldCreateStepFromCommandLogEntry(entry)) {\n startCommandLogStep(entry);\n }\n};\n\nconst onFail = (error: Cypress.CypressError) => {\n reportStepError(error);\n\n // If there are more \"fail\" handlers yet to run, it's not our responsibility to throw.\n // Otherwise, we won't give them any chance to do their job (EventEmitter stops executing handlers as soon\n // as one of them throws - that is also true for eventemitter2, which is used by the browser-side of Cypress).\n if (noSubsequentFailListeners()) {\n throw error;\n }\n};\n\nconst noSubsequentFailListeners = () => Object.is(Cypress.listeners(\"fail\").at(-1), onFail);\n", "import { enableScopeLevelAfterHookReporting } from \"../patching.js\";\nimport { registerCypressEventListeners } from \"./cypress.js\";\nimport { injectFlushMessageHooks, registerMochaEventListeners } from \"./mocha.js\";\n\nexport const enableAllure = () => {\n registerMochaEventListeners();\n registerCypressEventListeners();\n injectFlushMessageHooks();\n enableScopeLevelAfterHookReporting();\n};\n\nexport { enableReportingOfCypressScreenshots } from \"./cypress.js\";\n", "import { enableAllure, enableReportingOfCypressScreenshots } from \"./events/index.js\";\nimport { isAllureInitialized, setAllureInitialized } from \"./state.js\";\n\nexport const initializeAllure = () => {\n if (isAllureInitialized()) {\n return;\n }\n\n setAllureInitialized();\n\n enableAllure();\n enableReportingOfCypressScreenshots();\n};\n", "import { initializeAllure } from \"./browser/index.js\";\n\ninitializeAllure();\n\nexport * from \"allure-js-commons\";\n"],
5
- "mappings": "AAsFA,IAAYA,GAAM,SAANA,EAAM,CAANA,OAAAA,EAAM,OAAA,SAANA,EAAM,OAAA,SAANA,EAAM,OAAA,SAANA,EAAM,QAAA,UAANA,CAAM,GAAA,CAAA,CAAA,EAOLC,GAAmB,CAACD,EAAOE,OAAQF,EAAOG,OAAQH,EAAOI,OAAQJ,EAAOK,OAAO,EAGhFC,IAAK,SAALA,EAAK,CAALA,OAAAA,EAAK,UAAA,YAALA,EAAK,QAAA,UAALA,EAAK,SAAA,WAALA,EAAK,QAAA,UAALA,EAA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,EACxBC,GAAmC,CACrC,ECNO,IAAMC,GAAmB,IAAM,CAChCC,GAAoB,IAIxBC,GAAqB,EAErBC,GAAa,EACbC,GAAoC,EACtC,ECVAC,GAAiB",
4
+ "sourcesContent": ["export interface Attachment {\n name: string;\n type?: string;\n source: string;\n size?: number;\n}\n\nexport interface AttachmentOptions {\n contentType: ContentType | string;\n encoding?: BufferEncoding;\n fileExtension?: string;\n path?: string;\n body?: Buffer;\n}\n\nexport interface Label {\n name: LabelName | string;\n value: string;\n}\n\nexport interface Link {\n name?: string;\n url: string;\n type?: LinkType | string;\n}\n\nexport type ParameterMode = \"hidden\" | \"masked\" | \"default\";\n\nexport interface Parameter {\n name: string;\n value: string;\n excluded?: boolean;\n mode?: ParameterMode;\n}\n\nexport type ParameterOptions = Pick<Parameter, \"mode\" | \"excluded\">;\n\nexport interface StatusDetails {\n message?: string;\n trace?: string;\n actual?: string;\n expected?: string;\n}\n\n// don't use the interface as is, use Results types instead\ninterface Executable {\n name?: string;\n status?: Status;\n statusDetails: StatusDetails;\n stage: Stage;\n description?: string;\n descriptionHtml?: string;\n steps: StepResult[];\n attachments: Attachment[];\n parameters: Parameter[];\n start?: number;\n stop?: number;\n}\n\nexport interface FixtureResult extends Executable {}\n\nexport interface StepResult extends Executable {\n uuid?: string;\n}\n\nexport interface TestResult extends Executable {\n uuid: string;\n historyId?: string;\n fullName?: string;\n testCaseId?: string;\n titlePath?: string[];\n labels: Label[];\n links: Link[];\n}\n\nexport interface TestResultContainer {\n uuid: string;\n name?: string;\n children: string[];\n befores: FixtureResult[];\n afters: FixtureResult[];\n}\n\nexport type TestOrStepResult = StepResult | TestResult;\n\n/* eslint-disable no-shadow */\nexport enum Status {\n FAILED = \"failed\",\n BROKEN = \"broken\",\n PASSED = \"passed\",\n SKIPPED = \"skipped\",\n}\n\nexport const StatusByPriority = [Status.FAILED, Status.BROKEN, Status.PASSED, Status.SKIPPED];\n\n/* eslint-disable no-shadow */\nexport enum Stage {\n SCHEDULED = \"scheduled\",\n RUNNING = \"running\",\n FINISHED = \"finished\",\n PENDING = \"pending\",\n INTERRUPTED = \"interrupted\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LabelName {\n ALLURE_ID = \"ALLURE_ID\",\n /**\n * @deprecated please use ALLURE_ID instead\n */\n AS_ID = ALLURE_ID,\n SUITE = \"suite\",\n PARENT_SUITE = \"parentSuite\",\n SUB_SUITE = \"subSuite\",\n EPIC = \"epic\",\n FEATURE = \"feature\",\n STORY = \"story\",\n SEVERITY = \"severity\",\n TAG = \"tag\",\n OWNER = \"owner\",\n LEAD = \"lead\",\n HOST = \"host\",\n THREAD = \"thread\",\n TEST_METHOD = \"testMethod\",\n TEST_CLASS = \"testClass\",\n PACKAGE = \"package\",\n FRAMEWORK = \"framework\",\n LANGUAGE = \"language\",\n LAYER = \"layer\",\n}\n\n/* eslint-disable no-shadow */\nexport enum Severity {\n BLOCKER = \"blocker\",\n CRITICAL = \"critical\",\n NORMAL = \"normal\",\n MINOR = \"minor\",\n TRIVIAL = \"trivial\",\n}\n\n/* eslint-disable no-shadow */\nexport enum ContentType {\n TEXT = \"text/plain\",\n XML = \"application/xml\",\n HTML = \"text/html\",\n CSV = \"text/csv\",\n TSV = \"text/tab-separated-values\",\n CSS = \"text/css\",\n URI = \"text/uri-list\",\n SVG = \"image/svg+xml\",\n PNG = \"image/png\",\n JSON = \"application/json\",\n ZIP = \"application/zip\",\n WEBM = \"video/webm\",\n JPEG = \"image/jpeg\",\n MP4 = \"video/mp4\",\n IMAGEDIFF = \"application/vnd.allure.image.diff\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LinkType {\n DEFAULT = \"link\",\n ISSUE = \"issue\",\n TMS = \"tms\",\n}\n\nexport interface ImageDiffAttachment {\n expected: string | undefined; // data:image;base64,\n actual: string | undefined; // data:image;base64,\n diff: string | undefined; // data:image;base64,\n name: string;\n}\n", "import type { FixtureResult, Label, Link, StatusDetails, StepResult, TestResult } from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type { RuntimeMessage, SerializeOptions, SerializerReplacerFunc } from \"./types.js\";\n\nexport const getStatusFromError = (error: Partial<Error>): Status => {\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n * `vitest` throws `Error` for extended assertions, so we look into stack\n * `codeceptjs-expect` errors have actual/expected properties or inspect method\n */\n case /assert/gi.test(error.constructor.name):\n case /expectation/gi.test(error.constructor.name):\n case error.name && /assert/gi.test(error.name):\n case error.message && /assert/gi.test(error.message):\n case error.stack && /@vitest\\/expect/gi.test(error.stack):\n case error.stack && /playwright\\/lib\\/matchers\\/expect\\.js/gi.test(error.stack):\n case error.stack && /codeceptjs-expect/gi.test(error.stack):\n case \"matcherResult\" in error:\n case \"inspect\" in error && typeof error.inspect === \"function\":\n case \"actual\" in error:\n case \"expected\" in error:\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nconst actualAndExpected = (value: unknown): { actual?: string; expected?: string } => {\n if (!value || typeof value !== \"object\") {\n return {};\n }\n\n // support for jest asserts\n if (\"matcherResult\" in value && value.matcherResult !== undefined && typeof value.matcherResult === \"object\") {\n return {\n actual: serialize((value.matcherResult as any).actual),\n expected: serialize((value.matcherResult as any).expected),\n };\n }\n\n const actual = \"actual\" in value && value.actual !== undefined ? { actual: serialize(value.actual) } : {};\n const expected = \"expected\" in value && value.expected !== undefined ? { expected: serialize(value.expected) } : {};\n return {\n ...actual,\n ...expected,\n };\n};\n\nexport const getMessageAndTraceFromError = (\n error:\n | Error\n | {\n message?: string;\n stack?: string;\n },\n): StatusDetails => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n ...actualAndExpected(error),\n };\n};\n\ntype AllureTitleMetadataMatch = RegExpMatchArray & {\n groups: {\n type?: string;\n v1?: string;\n v2?: string;\n v3?: string;\n v4?: string;\n };\n};\n\nexport const allureMetadataRegexp = /(?:^|\\s)@?allure\\.(?<type>\\S+)$/;\nexport const allureTitleMetadataRegexp = /(?:^|\\s)@?allure\\.(?<type>[^:=\\s]+)[:=](\"[^\"]+\"|'[^']+'|`[^`]+`|\\S+)/;\nexport const allureTitleMetadataRegexpGlobal = new RegExp(allureTitleMetadataRegexp, \"g\");\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>\\S+)/;\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\n\nexport const getTypeFromAllureTitleMetadataMatch = (match: AllureTitleMetadataMatch) => {\n return match?.[1];\n};\n\nexport const getValueFromAllureTitleMetadataMatch = (match: AllureTitleMetadataMatch) => {\n const quotesRegexp = /['\"`]/;\n const quoteOpenRegexp = new RegExp(`^${quotesRegexp.source}`);\n const quoteCloseRegexp = new RegExp(`${quotesRegexp.source}$`);\n const matchedValue = match?.[2] ?? \"\";\n\n if (quoteOpenRegexp.test(matchedValue) && quoteCloseRegexp.test(matchedValue)) {\n return matchedValue.slice(1, -1);\n }\n\n return matchedValue;\n};\n\nexport const isMetadataTag = (tag: string) => {\n return allureMetadataRegexp.test(tag);\n};\n\nexport const getMetadataLabel = (tag: string, value?: string): Label | undefined => {\n const match = tag.match(allureMetadataRegexp);\n const type = match?.groups?.type;\n\n if (!type) {\n return undefined;\n }\n\n const [subtype, name] = type.split(\".\");\n\n return {\n name: subtype === \"id\" ? LabelName.ALLURE_ID : name,\n value: value ?? \"\",\n };\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n links: Link[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n const links = [] as Link[];\n const metadata = title.matchAll(allureTitleMetadataRegexpGlobal);\n const cleanTitle = title\n .replaceAll(allureTitleMetadataRegexpGlobal, \"\")\n .split(\" \")\n .filter(Boolean)\n .reduce((acc, word) => {\n if (/^[\\n\\r]/.test(word)) {\n return acc + word;\n }\n\n return `${acc} ${word}`;\n }, \"\")\n .trim();\n\n for (const m of metadata) {\n const match = m as AllureTitleMetadataMatch;\n const type = getTypeFromAllureTitleMetadataMatch(match);\n const value = getValueFromAllureTitleMetadataMatch(match);\n\n if (!type || !value) {\n continue;\n }\n\n const [subtype, name] = type.split(\".\");\n\n switch (subtype) {\n case \"id\":\n labels.push({ name: LabelName.ALLURE_ID, value });\n break;\n case \"label\":\n labels.push({ name, value });\n break;\n case \"link\":\n links.push({ type: name, url: value });\n break;\n }\n }\n\n return {\n labels,\n links,\n cleanTitle,\n };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n\nexport const serialize = (value: any, { maxDepth = 0, maxLength = 0, replacer }: SerializeOptions = {}): string =>\n limitString(\n typeof value === \"object\" ? JSON.stringify(value, createSerializeReplacer(maxDepth, replacer)) : String(value),\n maxLength,\n );\n\nconst createSerializeReplacer = (maxDepth: number, userDefinedReplacer: SerializeOptions[\"replacer\"]) => {\n const parents: unknown[] = [];\n const limitingReplacer = function (this: unknown, _: string, value: unknown) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n while (parents.length > 0 && !Object.is(parents.at(-1), this)) {\n parents.pop();\n }\n\n if ((maxDepth && parents.length >= maxDepth) || parents.includes(value)) {\n return undefined;\n }\n\n parents.push(value);\n\n return value instanceof Map\n ? excludeCircularRefsFromMap(parents, value)\n : value instanceof Set\n ? excludeCircularRefsFromSet(parents, value)\n : value;\n };\n return userDefinedReplacer ? composeReplacers(userDefinedReplacer, limitingReplacer) : limitingReplacer;\n};\n\nconst composeReplacers = (first: SerializerReplacerFunc, second: SerializerReplacerFunc): SerializerReplacerFunc =>\n function (k, v) {\n return second.call(this, k, first.call(this, k, v));\n };\n\nconst excludeCircularRefsFromMap = (parents: any[], map: Map<any, any>) => {\n return Array.from(map)\n .filter(([k]) => !parents.includes(k))\n .map(([k, v]) => [k, parents.includes(v) ? undefined : v]);\n};\n\nconst excludeCircularRefsFromSet = (parents: any[], set: Set<any>) => {\n return Array.from(set).map((v) => (parents.includes(v) ? undefined : v));\n};\n\nconst limitString = (value: string, maxLength: number) =>\n maxLength && value.length > maxLength ? `${value.substring(0, maxLength)}...` : value;\n", "import type { TestRuntime } from \"./types.js\";\n\nexport class NoopTestRuntime implements TestRuntime {\n async attachment() {\n await this.warning();\n }\n\n async attachmentFromPath() {\n await this.warning();\n }\n\n async description() {\n await this.warning();\n }\n\n async descriptionHtml() {\n await this.warning();\n }\n\n async displayName() {\n await this.warning();\n }\n\n async historyId() {\n await this.warning();\n }\n\n async labels() {\n await this.warning();\n }\n\n async links() {\n await this.warning();\n }\n\n async parameter() {\n await this.warning();\n }\n\n async logStep() {\n await this.warning();\n }\n\n async step<T>(name: string, body: () => T | PromiseLike<T>): Promise<T> {\n await this.warning();\n return body();\n }\n\n async stepDisplayName() {\n await this.warning();\n }\n\n async stepParameter() {\n await this.warning();\n }\n\n async testCaseId() {\n await this.warning();\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async warning() {\n // eslint-disable-next-line no-console\n console.log(\"no test runtime is found. Please check test framework configuration\");\n }\n}\n\nexport const noopRuntime: TestRuntime = new NoopTestRuntime();\n", "import { noopRuntime } from \"./NoopTestRuntime.js\";\nimport type { TestRuntime } from \"./types.js\";\n\nconst ALLURE_TEST_RUNTIME_KEY = \"allureTestRuntime\";\n\nexport const setGlobalTestRuntime = (runtime: TestRuntime) => {\n (globalThis as any)[ALLURE_TEST_RUNTIME_KEY] = () => runtime;\n};\n\nconst getGlobalTestRuntimeFunction = () => {\n return (globalThis as any)?.[ALLURE_TEST_RUNTIME_KEY] as (() => TestRuntime | undefined) | undefined;\n};\n\nexport const getGlobalTestRuntime = (): TestRuntime => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n return noopRuntime;\n};\n\nexport const getGlobalTestRuntimeWithAutoconfig = (): TestRuntime | Promise<TestRuntime> => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n // protection from bundlers tree-shaking visiting (webpack, rollup)\n const pwAutoconfigModuleName = \"allure-playwright/autoconfig\";\n\n return import(pwAutoconfigModuleName)\n .then(() => getGlobalTestRuntimeFunction()?.() ?? noopRuntime)\n .catch(() => noopRuntime);\n};\n", "import type { Status } from \"./model.js\";\nimport { type ContentType } from \"./model.js\";\nimport { type AttachmentOptions, type Label, type Link, type ParameterMode, type ParameterOptions } from \"./model.js\";\nimport { LabelName, LinkType } from \"./model.js\";\nimport { getGlobalTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { TestRuntime } from \"./sdk/runtime/types.js\";\nimport { isPromise } from \"./sdk/utils.js\";\n\nconst callRuntimeMethod = <\n T extends keyof TestRuntime,\n S extends Parameters<TestRuntime[T]>,\n R extends ReturnType<TestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalTestRuntimeWithAutoconfig();\n\n if (!isPromise(runtime)) {\n // @ts-ignore\n return runtime[method](...args);\n }\n\n return runtime.then((testRuntime) => {\n // @ts-ignore\n return testRuntime[method](...args);\n }) as R;\n};\n\nexport const label = (name: LabelName | string, value: string) => {\n return callRuntimeMethod(\"labels\", { name, value });\n};\n\nexport const labels = (...labelsList: Label[]) => {\n return callRuntimeMethod(\"labels\", ...labelsList);\n};\n\nexport const link = (url: string, name?: string, type?: LinkType | string) => {\n return callRuntimeMethod(\"links\", { url, type, name });\n};\n\nexport const links = (...linksList: Link[]) => {\n return callRuntimeMethod(\"links\", ...linksList);\n};\n\nexport const parameter = (name: string, value: string, options?: ParameterOptions) => {\n return callRuntimeMethod(\"parameter\", name, value, options);\n};\n\nexport const description = (markdown: string) => {\n return callRuntimeMethod(\"description\", markdown);\n};\n\nexport const descriptionHtml = (html: string) => {\n return callRuntimeMethod(\"descriptionHtml\", html);\n};\n\nexport const displayName = (name: string) => {\n return callRuntimeMethod(\"displayName\", name);\n};\n\nexport const historyId = (value: string) => {\n return callRuntimeMethod(\"historyId\", value);\n};\n\nexport const testCaseId = (value: string) => {\n return callRuntimeMethod(\"testCaseId\", value);\n};\n\nexport const attachment = (\n name: string,\n content: Buffer | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachment\", name, content, opts);\n};\n\nexport const attachTrace = (name: string, path: string) => {\n return callRuntimeMethod(\"attachmentFromPath\", name, path, {\n contentType: \"application/vnd.allure.playwright-trace\",\n });\n};\n\nexport const attachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachmentFromPath\", name, path, opts);\n};\n\nexport type StepContext = {\n displayName: (name: string) => void | PromiseLike<void>;\n parameter: (name: string, value: string, mode?: ParameterMode) => void | PromiseLike<void>;\n};\n\nconst stepContext: () => StepContext = () => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const logStep = (name: string, status?: Status, error?: Error): PromiseLike<void> => {\n return callRuntimeMethod(\"logStep\", name, status, error);\n};\n\nexport const step = <T = void>(name: string, body: (context: StepContext) => T | PromiseLike<T>): PromiseLike<T> => {\n return callRuntimeMethod(\"step\", name, () => body(stepContext()));\n};\n\nexport const issue = (url: string, name?: string) => link(url, name, LinkType.ISSUE);\n\nexport const tms = (url: string, name?: string) => link(url, name, LinkType.TMS);\n\nexport const allureId = (value: string) => label(LabelName.ALLURE_ID, value);\n\nexport const epic = (name: string) => label(LabelName.EPIC, name);\n\nexport const feature = (name: string) => label(LabelName.FEATURE, name);\n\nexport const story = (name: string) => label(LabelName.STORY, name);\n\nexport const suite = (name: string) => label(LabelName.SUITE, name);\n\nexport const parentSuite = (name: string) => label(LabelName.PARENT_SUITE, name);\n\nexport const subSuite = (name: string) => label(LabelName.SUB_SUITE, name);\n\nexport const owner = (name: string) => label(LabelName.OWNER, name);\n\nexport const severity = (name: string) => label(LabelName.SEVERITY, name);\n\nexport const layer = (name: string) => label(LabelName.LAYER, name);\n\nexport const tag = (name: string) => label(LabelName.TAG, name);\n\nexport const tags = (...tagsList: string[]) => {\n return callRuntimeMethod(\"labels\", ...tagsList.map((value) => ({ name: LabelName.TAG, value })));\n};\n", "export const DEFAULT_RUNTIME_CONFIG = {\n stepsFromCommands: {\n maxArgumentLength: 128,\n maxArgumentDepth: 3,\n },\n};\n\n/**\n * Pops items from an array into a new one. The item that matches the predicate is the last item to pop.\n * If there is no such item in the array, the array is left unmodified.\n * @param items An array to pop the items from.\n * @param pred A predicate that defines the last item to pop.\n * @returns An array of popped items. The first popped item becomes the first element of this array.\n */\nexport const popUntilFindIncluded = <T>(items: T[], pred: (value: T) => boolean) => {\n const index = items.findIndex(pred);\n return index !== -1 ? toReversed(items.splice(index)) : [];\n};\n\nexport const toReversed = <T = unknown>(arr: T[]): T[] => {\n const len = arr.length;\n const result: T[] = new Array(len);\n\n for (let i = 0; i < len; i++) {\n result[len - i - 1] = arr[i];\n }\n\n return result;\n};\n\nexport const last = <T = unknown>(arr: T[]): T | undefined => {\n return arr[arr.length - 1];\n};\n\nexport const isDefined = <T>(value: T | undefined): value is T => typeof value !== \"undefined\";\n", "import type { AllureSpecState, CypressMessage, CypressTest, StepDescriptor, StepFinalizer } from \"../types.js\";\nimport { DEFAULT_RUNTIME_CONFIG, last, toReversed } from \"../utils.js\";\n\nexport const getAllureState = () => {\n let state = Cypress.env(\"allure\") as AllureSpecState;\n\n if (!state) {\n state = {\n config: DEFAULT_RUNTIME_CONFIG,\n initialized: false,\n messages: [],\n testPlan: undefined,\n currentTest: undefined,\n projectDir: undefined,\n stepStack: [],\n stepsToFinalize: [],\n nextApiStepId: 0,\n };\n\n Cypress.env(\"allure\", state);\n }\n\n return state;\n};\n\nexport const isAllureInitialized = () => getAllureState().initialized;\n\nexport const setAllureInitialized = () => {\n getAllureState().initialized = true;\n};\n\nexport const getRuntimeMessages = () => getAllureState().messages;\n\nexport const setRuntimeMessages = (value: CypressMessage[]) => {\n getAllureState().messages = value;\n};\n\nexport const enqueueRuntimeMessage = (message: CypressMessage) => {\n getRuntimeMessages().push(message);\n};\n\nexport const getAllureTestPlan = () => getAllureState().testPlan;\n\nexport const getProjectDir = () => getAllureState().projectDir;\n\nexport const getCurrentTest = () => getAllureState().currentTest;\n\nexport const setCurrentTest = (test: CypressTest) => {\n getAllureState().currentTest = test;\n};\n\nexport const dropCurrentTest = () => {\n getAllureState().currentTest = undefined;\n};\n\nexport const getConfig = () => getAllureState().config;\n\nexport const getStepStack = () => getAllureState().stepStack;\n\nexport const getCurrentStep = () => last(getStepStack());\n\nexport const pushStep = (step: StepDescriptor) => getStepStack().push(step);\n\nexport const popStep = () => getStepStack().pop();\n\nexport const popSteps = (index: number) => toReversed(getStepStack().splice(index));\n\nexport const popAllSteps = () => popSteps(0);\n\nexport const clearStepStack = () => {\n getAllureState().stepStack = [];\n};\n\nexport const setupStepFinalization = <T extends StepDescriptor>(step: T, finalizer?: StepFinalizer) =>\n getAllureState().stepsToFinalize.push([step, finalizer]);\n\nexport const getStepsToFinalize = () => getAllureState().stepsToFinalize;\n\nexport const clearStepsToFinalize = () => {\n const state = getAllureState();\n state.stepsToFinalize = [];\n};\n", "import { LabelName } from \"allure-js-commons\";\nimport type { TestPlanV1 } from \"allure-js-commons/sdk\";\nimport type { CypressSuite, CypressTest } from \"../types.js\";\nimport { getAllureTestPlan } from \"./state.js\";\nimport { getTestMetadata, resolveSpecRelativePath } from \"./utils.js\";\n\nexport const applyTestPlan = (spec: Cypress.Spec, root: CypressSuite) => {\n const testPlan = getAllureTestPlan();\n if (testPlan) {\n const specPath = resolveSpecRelativePath(spec);\n for (const suite of iterateSuites(root)) {\n const indicesToRemove = getIndicesOfDeselectedTests(testPlan, spec, specPath, suite.tests);\n removeSortedIndices(suite.tests, indicesToRemove);\n }\n }\n};\n\nconst iterateSuites = function* (parent: CypressSuite) {\n const suiteStack: CypressSuite[] = [];\n for (let s: CypressSuite | undefined = parent; s; s = suiteStack.pop()) {\n yield s;\n\n // Pushing in reverse allows us to maintain depth-first pre-order traversal -\n // the same order as used by Mocha & Cypress.\n for (let i = s.suites.length - 1; i >= 0; i--) {\n suiteStack.push(s.suites[i]);\n }\n }\n};\n\nconst getIndicesOfDeselectedTests = (\n testPlan: TestPlanV1,\n spec: Cypress.Spec,\n specPath: string,\n tests: readonly CypressTest[],\n) => {\n const indicesToRemove: number[] = [];\n tests.forEach((test, index) => {\n const { fullNameSuffix, labels } = getTestMetadata(test);\n const fullName = `${specPath}#${fullNameSuffix}`;\n const allureId = labels.find(({ name }) => name === LabelName.ALLURE_ID)?.value;\n\n if (!includedInTestPlan(testPlan, fullName, allureId)) {\n indicesToRemove.push(index);\n }\n });\n return indicesToRemove;\n};\n\nconst removeSortedIndices = <T>(arr: T[], indices: readonly number[]) => {\n for (let i = indices.length - 1; i >= 0; i--) {\n arr.splice(indices[i], 1);\n }\n};\n\nconst includedInTestPlan = (testPlan: TestPlanV1, fullName: string, allureId: string | undefined): boolean =>\n testPlan.tests.some((test) => (allureId && test.id?.toString() === allureId) || test.selector === fullName);\n", "import type { CypressHook, CypressSuite, CypressTest } from \"../../types.js\";\nimport {\n completeHookErrorReporting,\n completeSpecIfNoAfterHookLeft,\n flushRuntimeMessages,\n reportTestPass as onPass,\n reportTestSkip as onPending,\n reportSuiteEnd as onSuiteEnd,\n reportTestEnd as onTestEnd,\n reportHookEnd,\n reportHookStart,\n reportRunStart,\n reportSuiteStart,\n reportTestOrHookFail,\n reportTestStart,\n} from \"../lifecycle.js\";\nimport { initTestRuntime } from \"../runtime.js\";\nimport { applyTestPlan } from \"../testplan.js\";\nimport { isAllureHook, isRootAfterAllHook, isTestReported } from \"../utils.js\";\n\nexport const ALLURE_REPORT_SYSTEM_HOOK = \"__allure_report_system_hook__\";\n\nexport const registerMochaEventListeners = () => {\n ((Cypress as any).mocha.getRunner() as Mocha.Runner)\n .on(\"start\", onStart)\n .on(\"suite\", onSuite)\n .on(\"suite end\", onSuiteEnd)\n .on(\"hook\", onHook)\n .on(\"hook end\", onHookEnd)\n .on(\"test\", onTest)\n .on(\"pass\", onPass)\n .on(\"fail\", onFail)\n .on(\"pending\", onPending)\n .on(\"test end\", onTestEnd);\n};\n\nexport const injectFlushMessageHooks = () => {\n afterEach(ALLURE_REPORT_SYSTEM_HOOK, flushRuntimeMessages);\n after(ALLURE_REPORT_SYSTEM_HOOK, onAfterAll);\n};\n\nconst onStart = () => {\n initTestRuntime();\n reportRunStart();\n};\n\nconst onSuite = (suite: CypressSuite) => {\n if (suite.root) {\n applyTestPlan(Cypress.spec, suite);\n }\n reportSuiteStart(suite);\n};\n\nconst onHook = (hook: CypressHook) => {\n if (isAllureHook(hook)) {\n return;\n }\n\n reportHookStart(hook);\n};\n\nconst onHookEnd = (hook: CypressHook) => {\n if (isAllureHook(hook)) {\n return;\n }\n\n reportHookEnd(hook);\n};\n\nconst onTest = (test: CypressTest) => {\n // Cypress emits an extra EVENT_TEST_BEGIN if the test is skipped.\n // reportTestSkip does that already, so we need to filter the extra event out.\n if (!isTestReported(test)) {\n reportTestStart(test);\n }\n};\n\nconst onFail = (testOrHook: CypressTest | CypressHook, err: Error) => {\n const isHook = \"hookName\" in testOrHook;\n if (isHook && isRootAfterAllHook(testOrHook)) {\n // Errors in spec-level 'after all' hooks are handled by Allure wrappers.\n return;\n }\n\n const isAllureHookFailure = isHook && isAllureHook(testOrHook);\n\n if (isAllureHookFailure) {\n // Normally, Allure hooks are skipped from the report.\n // In case of errors, it will be helpful to see them.\n reportHookStart(testOrHook, Date.now() - (testOrHook.duration ?? 0));\n }\n\n // This will mark the fixture and the test (if any) as failed/broken.\n reportTestOrHookFail(err);\n\n if (isHook) {\n // This will end the fixture and test (if any) and will report the remaining\n // tests in the hook's suite (the ones that will be skipped by Cypress/Mocha).\n completeHookErrorReporting(testOrHook, err);\n }\n};\n\nconst onAfterAll = function (this: Mocha.Context) {\n flushRuntimeMessages();\n completeSpecIfNoAfterHookLeft(this);\n};\n", "import { Status } from \"allure-js-commons\";\nimport type { StatusDetails } from \"allure-js-commons\";\nimport { extractMetadataFromString, getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport type {\n CypressConsoleProps,\n CypressHook,\n CypressLogEntry,\n CypressRenderProps,\n CypressStepStopMessage,\n CypressSuite,\n CypressTest,\n StepDescriptor,\n} from \"../types.js\";\nimport { ALLURE_REPORT_SYSTEM_HOOK } from \"./events/mocha.js\";\nimport { getAllureState, getProjectDir } from \"./state.js\";\nimport { resolveStepStatus } from \"./steps.js\";\n\nconst IS_WIN = Cypress.platform === \"win32\";\n\nexport const getFileNameFromPath = (path: string) => path.substring(path.lastIndexOf(IS_WIN ? \"\\\\\" : \"/\") + 1);\n\nexport const resolveSpecRelativePath = (spec: Cypress.Spec) => {\n const projectDir = getProjectDir();\n const specPath = projectDir ? spec.absolute.substring(projectDir.length + 1) : spec.relative;\n return IS_WIN ? specPath.replaceAll(\"\\\\\", \"/\") : specPath;\n};\n\nexport const uint8ArrayToBase64 = (data: unknown) => {\n // @ts-ignore\n const u8arrayLike = Array.isArray(data) || data.buffer;\n\n if (!u8arrayLike) {\n return data as string;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return btoa(String.fromCharCode.apply(null, data as number[]));\n};\n\nexport const getTestStartData = (test: CypressTest) => ({\n ...getTestMetadata(test),\n start:\n typeof test.wallClockStartedAt === \"string\"\n ? Date.parse(test.wallClockStartedAt)\n : test.wallClockStartedAt?.getTime?.() || Date.now(),\n});\n\nexport const getTestStopData = (test: CypressTest) => ({\n duration: test.duration ?? 0,\n retries: (test as any)._retries ?? 0,\n});\n\nexport const getTestSkipData = () => ({\n statusDetails: { message: \"This is a pending test\" },\n});\n\nexport const getStepStopData = (step: StepDescriptor, status?: Status, statusDetails?: StatusDetails) => {\n const data: CypressStepStopMessage[\"data\"] = {\n id: step.id,\n stop: Date.now(),\n status: status ?? resolveStepStatus(step),\n };\n if (statusDetails) {\n data.statusDetails = statusDetails;\n }\n return data;\n};\n\nconst testReportedKey = Symbol(\"The test has been reported to Allure\");\n\nexport const markTestAsReported = (test: CypressTest) => {\n (test as any)[testReportedKey] = true;\n};\n\nexport const isTestReported = (test: CypressTest) => (test as any)[testReportedKey] === true;\n\nexport const iterateSuites = function* (parent: CypressSuite) {\n const suiteStack: CypressSuite[] = [];\n for (let s: CypressSuite | undefined = parent; s; s = suiteStack.pop()) {\n yield s;\n\n // Pushing in reverse allows us to maintain depth-first pre-order traversal;\n // the same order is used by Mocha & Cypress.\n for (let i = s.suites.length - 1; i >= 0; i--) {\n suiteStack.push(s.suites[i]);\n }\n }\n};\n\nexport const iterateTests = function* (parent: CypressSuite) {\n for (const suite of iterateSuites(parent)) {\n yield* suite.tests;\n }\n};\n\nexport const getSuitePath = (test: CypressTest) => {\n const suites: CypressSuite[] = [];\n for (let s: CypressSuite | undefined = test.parent; s; s = s.parent) {\n suites.push(s);\n }\n suites.reverse();\n return suites;\n};\n\nexport const getSuiteTitlePath = (test: CypressTest): string[] =>\n getSuitePath(test)\n .filter((s) => s.title)\n .map((s) => s.title);\n\nexport const generateApiStepId = () => (getAllureState().nextApiStepId++).toString();\n\nexport const getTestMetadata = (test: CypressTest) => {\n const rawName = test.title;\n const { cleanTitle: name, labels, links } = extractMetadataFromString(rawName);\n const suites = test.titlePath().slice(0, -1);\n const fullNameSuffix = `${[...suites, name].join(\" \")}`;\n return { name, labels, links, fullNameSuffix };\n};\n\nexport const isAllureHook = (hook: CypressHook) => hook.title.includes(ALLURE_REPORT_SYSTEM_HOOK);\n\nexport const isRootAfterAllHook = (hook: CypressHook) => hook.parent!.root && hook.hookName === \"after all\";\n\nexport const isLastRootAfterHook = (context: Mocha.Context) => {\n const currentAfterAll = context.test as CypressHook;\n const rootSuite = (context.test as CypressHook).parent!;\n const hooks = (rootSuite as any).hooks as CypressHook[];\n const lastAfterAll = hooks.findLast((h) => h.hookName === \"after all\");\n return lastAfterAll?.hookId === currentAfterAll.hookId;\n};\n\nexport const getStatusDataOfTestSkippedByHookError = (\n hookTitle: string,\n isEachHook: boolean,\n err: Error,\n suite: CypressSuite,\n) => {\n const status = isEachHook ? Status.SKIPPED : getStatusFromError(err);\n const { message, trace } = getMessageAndTraceFromError(err);\n return {\n status,\n statusDetails: {\n message: isEachHook ? getSkipReason(hookTitle, suite) : message,\n trace,\n },\n };\n};\n\nconst getSkipReason = (hookTitle: string, suite: CypressSuite) => {\n const suiteName = suite.title ? `'${suite.title}'` : \"root\";\n return `'${hookTitle}' defined in the ${suiteName} suite has failed`;\n};\n\nexport const resolveConsoleProps = (entry: CypressLogEntry): CypressConsoleProps => {\n // consoleProps can be a function or an object(cy.origin just return an object)\n return typeof entry.attributes.consoleProps === \"function\"\n ? entry.attributes.consoleProps()\n : entry.attributes.consoleProps;\n};\n\nexport const resolveRenderProps = (entry: CypressLogEntry): CypressRenderProps => {\n // renderProps can be a function or an object(cy.origin just return an object)\n return typeof entry?.attributes?.renderProps === \"function\"\n ? entry.attributes.renderProps()\n : entry.attributes?.renderProps;\n};\n", "import type { StatusDetails } from \"allure-js-commons\";\nimport { Status } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport type {\n ApiStepDescriptor,\n CypressStepFinalizeMessage,\n LogStepDescriptor,\n StepDescriptor,\n StepFinalizer,\n} from \"../types.js\";\nimport { popUntilFindIncluded } from \"../utils.js\";\nimport { reportStepStart, reportStepStop } from \"./lifecycle.js\";\nimport {\n clearStepsToFinalize,\n enqueueRuntimeMessage,\n getStepStack,\n getStepsToFinalize,\n popAllSteps,\n pushStep,\n setupStepFinalization,\n} from \"./state.js\";\nimport { generateApiStepId } from \"./utils.js\";\n\nexport const ALLURE_STEP_CMD_SUBJECT = {};\n\nexport const isApiStep = (descriptor: StepDescriptor): descriptor is ApiStepDescriptor => {\n return descriptor.type === \"api\";\n};\n\nexport const isLogStep = (descriptor: StepDescriptor): descriptor is LogStepDescriptor => {\n return descriptor.type === \"log\";\n};\n\nexport const startAllureApiStep = (name: string) => reportStepStart(pushAllureStep(), name);\n\nexport const pushAllureStep = () => {\n const id = generateApiStepId();\n pushStep({ id, type: \"api\" });\n return id;\n};\n\nexport const reportStepError = (error: Error) => {\n const status = getStatusFromError(error);\n const statusDetails = getMessageAndTraceFromError(error);\n\n // Cypress will abort the test/hook execution soon. No subsequent commands will be run, including the ones that\n // have been scheduled by `allure.step` to stop the currently running steps.\n // Additionally, we can't tell in advance if the current command log steps will be stopped normally or not.\n //\n // Given that, this function will stop all consecutive Allure API steps at the tip of the step stack.\n // The command log steps will be given a chance to stop normally to get the most correct timings.\n //\n // The command log steps that won't stop normally (and Allure API substeps thereof) will be stopped during the\n // test/hook finalization phase.\n stopAllureApiStepStackTip(status, statusDetails);\n\n // It's not guaranteed for command log steps and intermediate Allure API steps to have access to the error at the\n // moment they are stopped.\n // Additionally, Cypress may not update the stack trace of the error at that time. Until that happens, the stack\n // trace points deep in the bundled code, which is little to no use for the user. Therefore, we need to associate\n // the remaining steps with the error object to grab the updated stack trace later.\n associateErrorWithRunningSteps(error);\n};\n\nexport const stopCurrentAllureApiStep = (status?: Status, statusDetails?: StatusDetails) =>\n findAndStopStepWithSubsteps((stepDescriptor) => isApiStep(stepDescriptor), status, statusDetails);\n\nexport const findAndStopStepWithSubsteps = (\n pred: (stepEntry: StepDescriptor) => boolean,\n status?: Status,\n statusDetails?: StatusDetails,\n) => stopSelectedSteps(popUntilFindIncluded(getStepStack(), pred), status, statusDetails);\n\nexport const stopAllSteps = (status?: Status, statusDetails?: StatusDetails) =>\n stopSelectedSteps(popAllSteps(), status, statusDetails);\n\nexport const finalizeSteps = () => {\n // This will stop all dangling steps (like log groups with missing endGroup calls or logs that haven't been\n // finished by Cypress due to an error).\n stopAllSteps();\n\n getStepsToFinalize().forEach(finalizeOneStep);\n clearStepsToFinalize();\n};\n\nexport const resolveStepStatus = (step: StepDescriptor) =>\n step.error ? getStatusFromError(step.error) : Status.PASSED;\n\nconst finalizeOneStep = ([step, finalizer]: [StepDescriptor, StepFinalizer | undefined]) => {\n const { id, error } = step;\n const data: CypressStepFinalizeMessage[\"data\"] = { id };\n\n if (error) {\n // Cypress rewrites the stack trace of an error to point to the location in the test file. Until then, the stack\n // trace points inside the messy bundle, which is not helpful. There are circumstances when we can't be sure this\n // has happened when a step is about to stop. That's why we defer setting the status details until we are sure\n // Cypress does its job.\n data.statusDetails = getMessageAndTraceFromError(error);\n }\n\n finalizer?.(data);\n\n enqueueRuntimeMessage({\n type: \"cypress_step_finalize\",\n data,\n });\n};\n\nconst stopAllureApiStepStackTip = (status: Status, statusDetails: StatusDetails) => {\n const stepStack = getStepStack();\n const firstApiStepAfterLastLogStep = stepStack.at(stepStack.findLastIndex(isLogStep) + 1);\n if (firstApiStepAfterLastLogStep) {\n findAndStopStepWithSubsteps(\n (logEntryOrMessage) => Object.is(logEntryOrMessage, firstApiStepAfterLastLogStep),\n status,\n statusDetails,\n );\n }\n};\n\nconst propagateErrorToStepDescriptor = (step: StepDescriptor, errorOfSubstep: Error | undefined) => {\n if (isLogStep(step)) {\n const error = step.log.attributes.error;\n if (error) {\n return (step.error = error);\n }\n }\n\n if (errorOfSubstep) {\n step.error = errorOfSubstep;\n }\n\n return step.error;\n};\n\nconst stopSelectedSteps = (steps: readonly StepDescriptor[], status?: Status, statusDetails?: StatusDetails) => {\n let error: Error | undefined;\n for (const stepEntry of steps) {\n error = propagateErrorToStepDescriptor(stepEntry, error);\n stopStep(stepEntry, status, statusDetails);\n }\n\n if (error) {\n associateErrorWithRunningSteps(error);\n }\n};\n\nconst associateErrorWithRunningSteps = (error: Error) => getStepStack().forEach((step) => (step.error = error));\n\nconst stopStep = (step: StepDescriptor, status?: Status, statusDetails?: StatusDetails) => {\n reportStepStop(step, status, statusDetails);\n\n if (isApiStep(step) && step.error) {\n setupStepFinalization(step);\n }\n};\n", "import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions } from \"allure-js-commons\";\nimport { Status } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError } from \"allure-js-commons/sdk\";\nimport type { TestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport { getGlobalTestRuntime, setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type { AllureCypressTaskArgs, CypressMessage } from \"../types.js\";\nimport { enqueueRuntimeMessage, getRuntimeMessages, setRuntimeMessages } from \"./state.js\";\nimport { ALLURE_STEP_CMD_SUBJECT, startAllureApiStep, stopCurrentAllureApiStep } from \"./steps.js\";\nimport { uint8ArrayToBase64 } from \"./utils.js\";\n\nexport const initTestRuntime = () => setGlobalTestRuntime(new AllureCypressTestRuntime() as TestRuntime);\n\nexport const getTestRuntime = () => getGlobalTestRuntime() as AllureCypressTestRuntime;\n\nclass AllureCypressTestRuntime implements TestRuntime {\n constructor() {\n this.#resetMessages();\n }\n\n labels(...labels: Label[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n links(...links: Link[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n parameter(name: string, value: string, options?: ParameterOptions) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n description(markdown: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n descriptionHtml(html: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n displayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n historyId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n testCaseId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n // @ts-ignore\n attachment(name: string, content: string, options: AttachmentOptions) {\n // @ts-ignore\n const attachmentRawContent: string | Uint8Array = content?.type === \"Buffer\" ? content.data : content;\n const actualEncoding = typeof attachmentRawContent === \"string\" ? \"utf8\" : \"base64\";\n const attachmentContent = uint8ArrayToBase64(attachmentRawContent);\n\n return this.#enqueueMessageAsync({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n logStep(name: string, status: Status = Status.PASSED, error?: Error): PromiseLike<void> {\n if (this.#isInOriginContext()) {\n startAllureApiStep(name);\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n }\n\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve();\n })\n .then(() => {\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n });\n }\n\n step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve(body());\n })\n .then((result) => {\n stopCurrentAllureApiStep();\n return result;\n });\n }\n\n stepDisplayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n name,\n },\n });\n }\n\n stepParameter(name: string, value: string, mode?: ParameterMode) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n flushAllureMessagesToTask(taskName: string) {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n cy.task(taskName, { absolutePath: Cypress.spec.absolute, messages }, { log: false });\n }\n }\n\n flushAllureMessagesToTaskAsync(taskName: string): Cypress.Chainable<unknown> | undefined {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n const args: AllureCypressTaskArgs = {\n absolutePath: Cypress.spec.absolute,\n messages,\n isInteractive: Cypress.config(\"isInteractive\"),\n };\n return cy.task(taskName, args, { log: false });\n }\n }\n\n #resetMessages() {\n setRuntimeMessages([]);\n }\n\n #enqueueMessageAsync(message: CypressMessage): PromiseLike<void> {\n enqueueRuntimeMessage(message);\n return Cypress.Promise.resolve();\n }\n\n #dequeueAllMessages() {\n const messages = getRuntimeMessages();\n this.#resetMessages();\n return messages;\n }\n\n #isInOriginContext(): boolean {\n try {\n const hasOriginContext = !!(window as any).cypressOriginContext;\n const hasOriginWindow = !!(window as any).cypressOriginWindow;\n\n if (hasOriginContext || hasOriginWindow) {\n return true;\n }\n\n const baseUrl = Cypress.config(\"baseUrl\");\n const currentOrigin = window.location.origin;\n\n if (baseUrl && currentOrigin !== baseUrl) {\n return true;\n }\n\n const cypressInstance = (window as any).Cypress;\n\n if (cypressInstance && cypressInstance.state && cypressInstance.state(\"origin\")) {\n return true;\n }\n\n try {\n const cyExists = typeof cy !== \"undefined\";\n const cyTaskExists = typeof cy.task !== \"undefined\";\n\n // In cy.origin context, cy.task may not be available or may throw\n if (!cyExists || !cyTaskExists) {\n return true;\n }\n } catch (error) {\n return true;\n }\n\n return false;\n } catch (error) {\n return true;\n }\n }\n}\n", "import { ContentType, Status } from \"allure-js-commons\";\nimport type { StatusDetails } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport type { CypressFailMessage, CypressHook, CypressSuite, CypressTest, StepDescriptor } from \"../types.js\";\nimport { getTestRuntime } from \"./runtime.js\";\nimport { dropCurrentTest, enqueueRuntimeMessage, getCurrentTest, setCurrentTest } from \"./state.js\";\nimport { finalizeSteps, stopAllSteps } from \"./steps.js\";\nimport {\n getStatusDataOfTestSkippedByHookError,\n getStepStopData,\n getSuitePath,\n getTestSkipData,\n getTestStartData,\n getTestStopData,\n isAllureHook,\n isLastRootAfterHook,\n isTestReported,\n iterateTests,\n markTestAsReported,\n} from \"./utils.js\";\n\nexport const reportRunStart = () => {\n enqueueRuntimeMessage({\n type: \"cypress_run_start\",\n data: {},\n });\n};\n\nexport const reportSuiteStart = (suite: CypressSuite) => {\n enqueueRuntimeMessage({\n type: \"cypress_suite_start\",\n data: {\n id: suite.id,\n name: suite.title,\n root: suite.root,\n start: Date.now(),\n },\n });\n};\n\nexport const reportSuiteEnd = (suite: CypressSuite) => {\n enqueueRuntimeMessage({\n type: \"cypress_suite_end\",\n data: {\n root: suite.root,\n stop: Date.now(),\n },\n });\n};\n\nexport const reportHookStart = (hook: CypressHook, start?: number) => {\n enqueueRuntimeMessage({\n type: \"cypress_hook_start\",\n data: {\n name: hook.title,\n scopeType: hook.hookName.includes(\"each\") ? \"each\" : \"all\",\n position: hook.hookName.includes(\"before\") ? \"before\" : \"after\",\n start: start ?? Date.now(),\n },\n });\n};\n\nexport const reportHookEnd = (hook: CypressHook) => {\n finalizeSteps();\n enqueueRuntimeMessage({\n type: \"cypress_hook_end\",\n data: {\n duration: hook.duration ?? 0,\n },\n });\n};\n\nexport const reportTestStart = (test: CypressTest) => {\n setCurrentTest(test);\n enqueueRuntimeMessage({\n type: \"cypress_test_start\",\n data: getTestStartData(test),\n });\n markTestAsReported(test);\n};\n\nexport const reportStepStart = (id: string, name: string) => {\n enqueueRuntimeMessage({\n type: \"cypress_step_start\",\n data: {\n id,\n name,\n start: Date.now(),\n },\n });\n};\n\nexport const reportStepStop = (step: StepDescriptor, status?: Status, statusDetails?: StatusDetails) => {\n enqueueRuntimeMessage({\n type: \"cypress_step_stop\",\n data: getStepStopData(step, status, statusDetails),\n });\n};\n\nexport const reportTestPass = () => {\n enqueueRuntimeMessage({\n type: \"cypress_test_pass\",\n data: {},\n });\n};\n\nexport const reportTestOrHookFail = (err: Error) => {\n const status = getStatusFromError(err);\n const statusDetails = getMessageAndTraceFromError(err);\n\n stopAllSteps(status, statusDetails);\n\n enqueueRuntimeMessage({\n type: \"cypress_fail\",\n data: {\n status,\n statusDetails,\n },\n });\n};\n\nexport const completeHookErrorReporting = (hook: CypressHook, err: Error) => {\n const isEachHook = hook.hookName.includes(\"each\");\n const suite = hook.parent!;\n const testFailData = getStatusDataOfTestSkippedByHookError(hook.title, isEachHook, err, suite);\n\n // Cypress doens't emit 'hook end' if the hook has failed.\n reportHookEnd(hook);\n\n // Cypress doens't emit 'test end' if the hook has failed.\n // We must report the test's end manualy in case of a 'before each' hook.\n reportCurrentTestIfAny();\n\n // Cypress skips the remaining tests in the suite of a failed hook.\n // We should include them to the report manually.\n reportRemainingTests(suite, testFailData);\n};\n\nexport const reportTestSkip = (test: CypressTest) => {\n if (isTestReported(test)) {\n stopAllSteps(Status.SKIPPED, {\n message: \"The test was skipped before the command was completed\",\n });\n } else {\n reportTestStart(test);\n }\n\n enqueueRuntimeMessage({\n type: \"cypress_test_skip\",\n data: getTestSkipData(),\n });\n};\n\nexport const reportTestEnd = (test: CypressTest) => {\n finalizeSteps();\n enqueueRuntimeMessage({\n type: \"cypress_test_end\",\n data: {\n duration: test.duration ?? 0,\n retries: (test as any)._retries ?? 0,\n },\n });\n dropCurrentTest();\n};\n\nexport const reportScreenshot = (path: string, name: string) => {\n enqueueRuntimeMessage({\n type: \"attachment_path\",\n data: { path, name, contentType: ContentType.PNG },\n });\n};\n\nexport const completeSpecIfNoAfterHookLeft = (context: Mocha.Context) => {\n if (isLastRootAfterHook(context)) {\n const hook = context.test as CypressHook;\n if (!isAllureHook(hook)) {\n reportHookEnd(hook);\n }\n return completeSpecAsync();\n }\n};\n\nexport const completeSpecOnAfterHookFailure = (\n context: Mocha.Context,\n hookError: Error,\n): Cypress.Chainable<unknown> | undefined => {\n try {\n reportTestOrHookFail(hookError);\n completeHookErrorReporting(context.test as CypressHook, hookError);\n\n // cy.task's then doesn't have onrejected, that's why we don't log async Allure errors here.\n return completeSpecAsync();\n } catch (allureError) {\n logAllureRootAfterError(context, allureError);\n }\n};\n\nexport const throwAfterSpecCompletion = (context: Mocha.Context, err: any) => {\n const chain = completeSpecOnAfterHookFailure(context, err as Error)?.then(() => {\n throw err;\n });\n if (!chain) {\n throw err;\n }\n};\n\nexport const flushRuntimeMessages = () => getTestRuntime().flushAllureMessagesToTask(\"reportAllureCypressSpecMessages\");\n\nexport const completeSpecAsync = () =>\n getTestRuntime().flushAllureMessagesToTaskAsync(\"reportFinalAllureCypressSpecMessages\");\n\nconst reportCurrentTestIfAny = () => {\n const currentTest = getCurrentTest();\n if (currentTest) {\n reportTestEnd(currentTest);\n }\n};\n\nconst reportRemainingTests = (suite: CypressSuite, testFailData: CypressFailMessage[\"data\"]) => {\n for (const test of iterateTests(suite)) {\n // Some tests in the suite might've been already reported.\n if (!isTestReported(test)) {\n reportTestsSkippedByHookError(\n test,\n test.pending ? { ...getTestSkipData(), status: Status.SKIPPED } : testFailData,\n );\n }\n }\n};\n\nconst reportTestsSkippedByHookError = (test: CypressTest, testFailData: CypressFailMessage[\"data\"]) => {\n enqueueRuntimeMessage({\n type: \"cypress_skipped_test\",\n data: {\n ...getTestStartData(test),\n ...testFailData,\n ...getTestStopData(test),\n suites: getSuitePath(test).map((s) => s.id),\n },\n });\n markTestAsReported(test);\n};\n\nconst logAllureRootAfterError = (context: Mocha.Context, err: unknown) => {\n // We play safe and swallow errors here to keep the original 'after all' error.\n try {\n // eslint-disable-next-line no-console\n console.error(`Unexpected error when reporting the failure of ${context.test?.title ?? \"'after all'\"}`);\n // eslint-disable-next-line no-console\n console.error(err);\n } catch {}\n};\n", "import { isPromise } from \"allure-js-commons/sdk\";\nimport type { CypressSuiteFunction, DirectHookImplementation, HookImplementation } from \"../types.js\";\nimport {\n completeSpecIfNoAfterHookLeft,\n completeSpecOnAfterHookFailure,\n throwAfterSpecCompletion,\n} from \"./lifecycle.js\";\n\ntype SuiteDepthCounter = {\n getSuiteDepth: () => number;\n incrementSuiteDepth: () => void;\n decrementSuiteDepth: () => void;\n};\n\n/**\n * Patches the `after` function, to inject reporting of spec-level\n * `after` hooks defined by the user.\n */\nexport const enableScopeLevelAfterHookReporting = () => {\n const suiteDepthCounter = createSuiteDepthCounterState();\n patchDescribe(suiteDepthCounter);\n patchAfter(suiteDepthCounter);\n};\n\nconst createSuiteDepthCounterState = (): SuiteDepthCounter => {\n let suiteDepth = 0;\n return {\n getSuiteDepth: () => suiteDepth,\n incrementSuiteDepth: () => {\n suiteDepth++;\n },\n decrementSuiteDepth: () => {\n suiteDepth--;\n },\n };\n};\n\nconst patchDescribe = ({ incrementSuiteDepth, decrementSuiteDepth }: SuiteDepthCounter) => {\n const patchDescribeFn =\n (target: CypressSuiteFunction): CypressSuiteFunction =>\n (title, configOrFn, fn) => {\n incrementSuiteDepth();\n try {\n return forwardDescribeCall(target, title, configOrFn, fn);\n } finally {\n decrementSuiteDepth();\n }\n };\n const originalDescribeFn: Mocha.SuiteFunction = globalThis.describe;\n const patchedDescribe = patchDescribeFn(originalDescribeFn) as Mocha.SuiteFunction;\n patchedDescribe.only = patchDescribeFn(\n originalDescribeFn.only as CypressSuiteFunction,\n ) as Mocha.ExclusiveSuiteFunction;\n patchedDescribe.skip = patchDescribeFn(originalDescribeFn.skip as CypressSuiteFunction) as Mocha.PendingSuiteFunction;\n globalThis.describe = patchedDescribe;\n};\n\nconst patchAfter = ({ getSuiteDepth }: SuiteDepthCounter) => {\n const originalAfter = globalThis.after;\n const patchedAfter = (nameOrFn: string | HookImplementation, fn?: HookImplementation): void => {\n return typeof nameOrFn === \"string\"\n ? originalAfter(nameOrFn, wrapRootAfterFn(getSuiteDepth, fn))\n : originalAfter(wrapRootAfterFn(getSuiteDepth, nameOrFn)!);\n };\n globalThis.after = patchedAfter;\n};\n\nconst forwardDescribeCall = (target: CypressSuiteFunction, ...args: Parameters<CypressSuiteFunction>) => {\n const [title, configOrFn, fn] = args;\n if (typeof fn === \"undefined\" && typeof configOrFn === \"undefined\") {\n return target(title);\n } else if (typeof configOrFn === \"function\") {\n return target(title, configOrFn);\n } else {\n return target(title, configOrFn, fn);\n }\n};\n\nconst wrapRootAfterFn = (getSuiteDepth: () => number, fn?: HookImplementation): HookImplementation | undefined => {\n if (getSuiteDepth() === 0 && fn) {\n const wrappedFn = fn.length ? wrapAfterFnWithCallback(fn) : wrapAfterFnWithoutArgs(fn as DirectHookImplementation);\n Object.defineProperty(wrappedFn, \"name\", { value: fn.name });\n return wrappedFn;\n }\n return fn;\n};\n\nconst wrapAfterFnWithCallback = (fn: Mocha.Func): Mocha.Func => {\n return function (this: Mocha.Context, done: Mocha.Done) {\n const wrappedDone = (hookError?: Error) => {\n if (hookError) {\n if (!completeSpecOnAfterHookFailure(this, hookError)?.then(() => done(hookError))) {\n done(hookError);\n }\n return;\n }\n\n try {\n if (completeSpecIfNoAfterHookLeft(this)?.then(() => done())) {\n return;\n }\n } catch (allureError) {\n done(allureError);\n return;\n }\n\n done();\n };\n return fn.bind(this)(wrappedDone);\n };\n};\n\nconst wrapAfterFnWithoutArgs = (fn: DirectHookImplementation) => {\n return function (this: Mocha.Context) {\n let result;\n let syncError: any;\n\n try {\n result = fn.bind(this)();\n } catch (e) {\n syncError = e;\n }\n\n if (syncError) {\n throwAfterSpecCompletion(this, syncError);\n } else if (isPromise(result)) {\n return result.then(\n () => completeSpecIfNoAfterHookLeft(this),\n (asyncError) => throwAfterSpecCompletion(this, asyncError),\n );\n } else {\n completeSpecIfNoAfterHookLeft(this);\n return result;\n }\n };\n};\n", "import { serialize } from \"allure-js-commons/sdk\";\nimport { getConfig } from \"./state.js\";\n\nexport default (value: unknown) => {\n return isDomObject(value) ? stringifyAsDom(value) : serializeAsObject(value);\n};\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value);\n\nconst stripAncestorRefs = (value: unknown, ancestors: object[] = []): unknown => {\n if (!isPlainObject(value)) {\n return value;\n }\n\n const result: Record<string, unknown> = {};\n ancestors.push(value);\n\n for (const [key, prop] of Object.entries(value)) {\n if (typeof prop === \"object\" && prop !== null) {\n if (ancestors.includes(prop)) {\n continue;\n }\n result[key] = stripAncestorRefs(prop, ancestors);\n } else {\n result[key] = prop;\n }\n }\n\n ancestors.pop();\n return result;\n};\n\nexport const serializeAsObject = (value: unknown) => {\n if (isPlainObject(value)) {\n const cleaned = stripAncestorRefs(value);\n return serialize({ ...(cleaned as object) }, getSerializeOptions());\n }\n return serialize(value, getSerializeOptions());\n};\n\nconst getSerializeOptions = () => {\n const {\n stepsFromCommands: { maxArgumentDepth: maxDepth, maxArgumentLength: maxLength },\n } = getConfig();\n\n return { maxDepth, maxLength, nonNullReplacerWithDomSupport };\n};\n\nconst isDomObject = (value: unknown): value is object =>\n typeof value === \"object\" && value !== null && Cypress.dom.isDom(value);\n\n// @ts-ignore\nconst stringifyAsDom = (value: object) => Cypress.dom.stringify(value, \"long\");\n\nconst nonNullReplacerWithDomSupport = (_: string, value: unknown) => {\n if (typeof value === \"object\") {\n // Exclude null properties to make the result more compact.\n if (value === null) {\n return undefined;\n }\n\n if (Cypress.dom.isDom(value)) {\n // Window, document, and DOM element properties are serialized with Cypress.dom.stringify.\n return stringifyAsDom(value);\n }\n }\n\n // Use the implementation from allure-js-commons/sdk in all other cases.\n return value;\n};\n", "import type { Parameter } from \"allure-js-commons\";\nimport type { CypressLogEntry, LogStepDescriptor } from \"../types.js\";\nimport { isDefined } from \"../utils.js\";\nimport { reportStepStart } from \"./lifecycle.js\";\nimport serializePropValue from \"./serialize.js\";\nimport { getCurrentStep, getStepStack, pushStep, setupStepFinalization } from \"./state.js\";\nimport { ALLURE_STEP_CMD_SUBJECT, findAndStopStepWithSubsteps, isLogStep } from \"./steps.js\";\nimport { resolveConsoleProps, resolveRenderProps } from \"./utils.js\";\n\nexport const shouldCreateStepFromCommandLogEntry = (entry: CypressLogEntry) => {\n const { event, instrument } = entry.attributes;\n if (instrument !== \"command\") {\n // We are interested in the \"TEST BODY\" panel only for now.\n // Other instruments are logged in separate panels.\n return false;\n }\n\n if (event) {\n // Events are tricky to report as they may span across commands and even leave the test's scope.\n // We ignore them for now.\n return false;\n }\n\n if (isApiStepErrorLogEntry(entry)) {\n // Cypress don't create a log message for 'cy.then' except when it throws an error.\n // This is in particularly happens when the function passed to 'allure.step' throws. In such a case however,\n // creating an extra step from the log entry is redundant because the error is already included in the report as\n // a part of the step.\n return false;\n }\n\n return true;\n};\n\n/**\n * Checks if the current step represents a cy.screenshot command log entry. If this is the case, associates the name\n * of the screenshot with the step. Later, that will allow converting the step with the attachment into the attachment\n * step.\n */\nexport const setupScreenshotAttachmentStep = (originalName: string | undefined, name: string) => {\n const step = getCurrentStep();\n if (step && isLogStep(step)) {\n const {\n name: commandName,\n props: { name: nameFromProps },\n } = resolveConsoleProps(step.log);\n if (commandName === \"screenshot\" && nameFromProps === originalName) {\n step.attachmentName = name;\n }\n }\n};\n\nexport const startCommandLogStep = (entry: CypressLogEntry) => {\n const currentLogEntry = getCurrentLogEntry();\n\n if (typeof currentLogEntry !== \"undefined\" && shouldStopCurrentLogStep(currentLogEntry.log, entry)) {\n stopCommandLogStep(currentLogEntry.log.attributes.id);\n }\n\n pushLogEntry(entry);\n reportStepStart(entry.attributes.id, getCommandLogStepName(entry));\n scheduleCommandLogStepStop(entry);\n};\n\nexport const stopCommandLogStep = (entryId: string) => findAndStopStepWithSubsteps(({ id }) => id === entryId);\n\nconst pushLogEntry = (entry: CypressLogEntry) => {\n const id = entry.attributes.id;\n const stepDescriptor: LogStepDescriptor = { id, type: \"log\", log: entry };\n\n pushStep(stepDescriptor);\n\n // Some properties of some Command Log entries are undefined at the time the entry is stopped. An example is the\n // Yielded property of some queries. We defer converting them to Allure step parameters until the test/hook ends.\n setupStepFinalization(stepDescriptor, (data) => {\n data.parameters = getCommandLogStepParameters(entry);\n\n if (stepDescriptor.attachmentName) {\n // Rename the step to match the attachment name. Once the names are the same, Allure will render the\n // attachment in the place of the step.\n data.name = stepDescriptor.attachmentName;\n }\n });\n};\n\nconst scheduleCommandLogStepStop = (entry: CypressLogEntry) => {\n const { groupStart, end, id } = entry.attributes;\n if (end) {\n // Some entries are already completed (this is similar to the idea behind allure.logStep).\n // Cypress won't call entry.end() in such a case, so we need to stop such a step now.\n // Example: cy.log\n stopCommandLogStep(id);\n } else if (groupStart) {\n // A logging group must be stopped be the user via the Cypress.Log.endGroup() call.\n // If the call is missing, the corresponding step will be stopped either at the test's (the hook's) end.\n const originalEndGroup = entry.endGroup;\n entry.endGroup = function () {\n stopCommandLogStep(id);\n return originalEndGroup.call(this);\n };\n } else {\n // Regular log entries are finalized by Cypress via the Cypress.Log.end() call. We're hooking into this function\n // to complete the step at the same time.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalEnd = entry.end;\n entry.end = function () {\n stopCommandLogStep(id);\n return originalEnd.call(this);\n };\n }\n};\n\nconst isApiStepErrorLogEntry = (entry: CypressLogEntry) => {\n const { name } = entry.attributes;\n return name === \"then\" && Object.is(resolveConsoleProps(entry).props[\"Applied To\"], ALLURE_STEP_CMD_SUBJECT);\n};\n\nconst getCommandLogStepName = (entry: CypressLogEntry) => {\n const { name, message, displayName } = entry.attributes;\n const resolvedName = (displayName ?? name).trim();\n const resolvedMessage = (\n maybeGetAssertionLogMessage(entry) ??\n maybeGetCucumberLogMessage(entry) ??\n resolveRenderProps(entry).message ??\n message\n ).trim();\n const stepName = [resolvedName, resolvedMessage].filter(Boolean).join(\" \");\n return stepName;\n};\n\nconst getCommandLogStepParameters = (entry: CypressLogEntry) =>\n getLogProps(entry)\n .map(([k, v]) => ({\n name: k.toString(),\n value: serializePropValue(v),\n }))\n .filter(getPropValueSetFilter(entry));\n\nconst WELL_KNOWN_CUCUMBER_LOG_NAMES = [\"Given\", \"When\", \"Then\", \"And\"];\n\nconst maybeGetCucumberLogMessage = (entry: CypressLogEntry) => {\n const {\n attributes: { name, message },\n } = entry;\n if (WELL_KNOWN_CUCUMBER_LOG_NAMES.includes(name.trim()) && message.startsWith(\"**\") && message.endsWith(\"**\")) {\n return message.substring(2, message.length - 2);\n }\n};\n\nconst getLogProps = (entry: CypressLogEntry) => {\n const isAssertionWithMessage = !!maybeGetAssertionLogMessage(entry);\n const { props, name } = resolveConsoleProps(entry);\n\n // accessing LocalStorage after the page reload can stick the test runner\n // to avoid the issue, we just need to log the command manually\n // the problem potentially can happen with other storage related commands, like `clearAllLocalStorage`, `clearAllSessionStorage`, `getAllLocalStorage`, `getAllSessionStorage`, `setLocalStorage`, `setSessionStorage`\n // but probably, we don't need to silent them all at this moment\n // the context: https://github.com/allure-framework/allure-js/issues/1222\n if ([\"clearLocalStorage\"].includes(name)) {\n return [] as [string, unknown][];\n }\n\n // For assertion logs, we interpolate the 'Message' property, which contains unformatted assertion description,\n // directly into the step's name.\n // No need to keep the exact same information in the step's parameters.\n return Object.entries(props).filter(([k, v]) => isDefined(v) && !(isAssertionWithMessage && k === \"Message\"));\n};\n\nconst maybeGetAssertionLogMessage = (entry: CypressLogEntry) => {\n if (isAssertLog(entry)) {\n const message = resolveConsoleProps(entry).props.Message;\n\n if (message && typeof message === \"string\") {\n return message;\n }\n }\n};\n\nconst isAssertLog = ({ attributes: { name } }: CypressLogEntry) => name === \"assert\";\n\nconst getCurrentLogEntry = () => getStepStack().findLast(isLogStep);\n\nconst shouldStopCurrentLogStep = (currentLogEntry: CypressLogEntry, newLogEntry: CypressLogEntry) => {\n const { groupStart: currentEntryIsGroup, type: currentEntryType } = currentLogEntry.attributes;\n const { type: newEntryType } = newLogEntry.attributes;\n\n return !currentEntryIsGroup && (currentEntryType === \"child\" || newEntryType !== \"child\");\n};\n\nconst getPropValueSetFilter = (entry: CypressLogEntry) =>\n entry.attributes.name === \"wrap\" ? () => true : ({ name, value }: Parameter) => name !== \"Yielded\" || value !== \"{}\";\n", "import type { CypressLogEntry } from \"../../types.js\";\nimport {\n setupScreenshotAttachmentStep,\n shouldCreateStepFromCommandLogEntry,\n startCommandLogStep,\n} from \"../commandLog.js\";\nimport { reportScreenshot } from \"../lifecycle.js\";\nimport { reportStepError } from \"../steps.js\";\nimport { getFileNameFromPath } from \"../utils.js\";\n\nexport const registerCypressEventListeners = () => Cypress.on(\"fail\", onFail).on(\"log:added\", onLogAdded);\n\nexport const enableReportingOfCypressScreenshots = () => Cypress.Screenshot.defaults({ onAfterScreenshot });\n\nconst onAfterScreenshot = (\n ...[, { name: originalName, path }]: Parameters<Cypress.ScreenshotDefaultsOptions[\"onAfterScreenshot\"]>\n) => {\n const name = originalName ?? getFileNameFromPath(path);\n\n reportScreenshot(path, name);\n setupScreenshotAttachmentStep(originalName, name);\n};\n\nconst onLogAdded = (_: Cypress.ObjectLike, entry: CypressLogEntry) => {\n if (shouldCreateStepFromCommandLogEntry(entry)) {\n startCommandLogStep(entry);\n }\n};\n\nconst onFail = (error: Cypress.CypressError) => {\n reportStepError(error);\n\n // If there are more \"fail\" handlers yet to run, it's not our responsibility to throw.\n // Otherwise, we won't give them any chance to do their job (EventEmitter stops executing handlers as soon\n // as one of them throws - that is also true for eventemitter2, which is used by the browser-side of Cypress).\n if (noSubsequentFailListeners()) {\n throw error;\n }\n};\n\nconst noSubsequentFailListeners = () => Object.is(Cypress.listeners(\"fail\").at(-1), onFail);\n", "import { enableScopeLevelAfterHookReporting } from \"../patching.js\";\nimport { registerCypressEventListeners } from \"./cypress.js\";\nimport { injectFlushMessageHooks, registerMochaEventListeners } from \"./mocha.js\";\n\nexport const enableAllure = () => {\n registerMochaEventListeners();\n registerCypressEventListeners();\n injectFlushMessageHooks();\n enableScopeLevelAfterHookReporting();\n};\n\nexport { enableReportingOfCypressScreenshots } from \"./cypress.js\";\n", "import { enableAllure, enableReportingOfCypressScreenshots } from \"./events/index.js\";\nimport { isAllureInitialized, setAllureInitialized } from \"./state.js\";\n\nexport const initializeAllure = () => {\n if (isAllureInitialized()) {\n return;\n }\n\n setAllureInitialized();\n\n enableAllure();\n enableReportingOfCypressScreenshots();\n};\n", "import { initializeAllure } from \"./browser/index.js\";\n\ninitializeAllure();\n\nexport * from \"allure-js-commons\";\n"],
5
+ "mappings": "AAsFA,IAAYA,GAAM,SAANA,EAAM,CAANA,OAAAA,EAAM,OAAA,SAANA,EAAM,OAAA,SAANA,EAAM,OAAA,SAANA,EAAM,QAAA,UAANA,CAAM,GAAA,CAAA,CAAA,EAOLC,GAAmB,CAACD,EAAOE,OAAQF,EAAOG,OAAQH,EAAOI,OAAQJ,EAAOK,OAAO,EAGhFC,IAAK,SAALA,EAAK,CAALA,OAAAA,EAAK,UAAA,YAALA,EAAK,QAAA,UAALA,EAAK,SAAA,WAALA,EAAK,QAAA,UAALA,EAAK,YAAA,cAALA,CAAK,GAAA,CAAA,CAAA,EASLC,GAAS,SAATA,EAAS,CAATA,OAAAA,EAAS,UAAA,YAATA,EAAS,MAAA,YAATA,EAAS,MAAA,QAATA,EAAS,aAAA,cAATA,EAAS,UAAA,WAATA,EAAS,KAAA,OAATA,EAAS,QAAA,UAATA,EAAS,MAAA,QAATA,EAAS,SAAA,WAATA,EAAS,IAAA,MAATA,EAAS,MAAA,QAATA,EAAS,KAAA,OAATA,EAAS,KAAA,OAATA,EAAS,OAAA,SAATA,EAAS,YAAA,aAATA,EAAS,WAAA,YAATA,EAAS,QAAA,UAATA,EAAS,UAAA,YAATA,EAAS,SAAA,WAATA,EAAS,MAAA,QAATA,CAAS,GAAA,CAAA,CAAA,EA2BTC,IAAQ,SAARA,EAAQ,CAARA,OAAAA,EAAQ,QAAA,UAARA,EAAQ,SAAA,WAARA,EAAQ,OAAA,SAARA,EAAQ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M,WAAW,OAAS,OAAS,IAAM,GAAO,CAAC,CAAE,KAAAM,EAAM,MAAAmD,CAAM,IAAiBnD,IAAS,WAAamD,IAAU,KCpL3G,IAAMC,GAAgC,IAAM,QAAQ,GAAG,OAAQC,EAAM,EAAE,GAAG,YAAaC,EAAU,EAE3FC,GAAsC,IAAM,QAAQ,WAAW,SAAS,CAAE,kBAAAC,EAAkB,CAAC,EAEpGA,GAAoB,IACrB,CAAC,CAAE,CAAE,KAAMC,EAAc,KAAAC,CAAK,CAAC,IAC/B,CACH,IAAMC,EAAOF,GAAgBG,GAAoBF,CAAI,EAErDG,GAAiBH,EAAMC,CAAI,EAC3BG,GAA8BL,EAAcE,CAAI,CAClD,EAEML,GAAa,CAACS,EAAuBC,IAA2B,CAChEC,GAAoCD,CAAK,GAC3CE,GAAoBF,CAAK,CAE7B,EAEMX,GAAUc,GAAgC,CAM9C,GALAC,GAAgBD,CAAK,EAKjBE,GAA0B,EAC5B,MAAMF,CAEV,EAEME,GAA4B,IAAM,OAAO,GAAG,QAAQ,UAAU,MAAM,EAAE,GAAG,EAAE,EAAGhB,EAAM,ECpCnF,IAAMiB,GAAe,IAAM,CAChCC,GAA4B,EAC5BC,GAA8B,EAC9BC,GAAwB,EACxBC,GAAmC,CACrC,ECNO,IAAMC,GAAmB,IAAM,CAChCC,GAAoB,IAIxBC,GAAqB,EAErBC,GAAa,EACbC,GAAoC,EACtC,ECVAC,GAAiB",
6
6
  "names": ["Status", "StatusByPriority", "FAILED", "BROKEN", "PASSED", "SKIPPED", "Stage", "LabelName", "Severity", "ContentType", "LinkType", "getStatusFromError", "error", "test", "constructor", "name", "message", "stack", "inspect", "Status", "FAILED", "BROKEN", "ansiRegex", "onlyFirst", "arguments", "length", "undefined", "pattern", "join", "RegExp", "stripAnsi", "str", "regex", "replace", "actualAndExpected", "value", "matcherResult", "actual", "serialize", "expected", "_objectSpread", "getMessageAndTraceFromError", "trace", "allureTitleMetadataRegexp", "_wrapRegExp", "type", "allureTitleMetadataRegexpGlobal", "RegExp", "getTypeFromAllureTitleMetadataMatch", "match", "getValueFromAllureTitleMetadataMatch", "_match$", "quotesRegexp", "quoteOpenRegexp", "RegExp", "concat", "source", "quoteCloseRegexp", "matchedValue", "test", "slice", "extractMetadataFromString", "title", "labels", "links", "metadata", "matchAll", "allureTitleMetadataRegexpGlobal", "cleanTitle", "replaceAll", "split", "filter", "Boolean", "reduce", "acc", "word", "test", "concat", "trim", "m", "match", "type", "getTypeFromAllureTitleMetadataMatch", "value", "getValueFromAllureTitleMetadataMatch", "subtype", "name", "push", "LabelName", "ALLURE_ID", "url", "isPromise", "obj", "then", "serialize", "value", "maxDepth", "maxLength", "replacer", "arguments", "length", "undefined", "limitString", "JSON", "stringify", "createSerializeReplacer", "String", "userDefinedReplacer", "parents", "limitingReplacer", "_", "Object", "is", "at", "pop", "includes", "push", "Map", "excludeCircularRefsFromMap", "Set", "excludeCircularRefsFromSet", "composeReplacers", "first", "second", "k", "v", "call", "map", "Array", "from", "filter", "_ref", "_ref2", "set", "concat", "substring", "NoopTestRuntime", "attachment", "_this", "_asyncToGenerator", "warning", "attachmentFromPath", "_this2", "description", "_this3", "descriptionHtml", "_this4", "displayName", "_this5", "historyId", "_this6", "labels", "_this7", "links", "_this8", "parameter", "_this9", "logStep", "_this0", "step", "name", "body", "_this1", "stepDisplayName", "_this10", "stepParameter", "_this11", "testCaseId", "_this12", "console", "log", "noopRuntime", "ALLURE_TEST_RUNTIME_KEY", "setGlobalTestRuntime", "runtime", "globalThis", "getGlobalTestRuntimeFunction", "getGlobalTestRuntime", "testRuntime", "_testRuntime", "noopRuntime", "getGlobalTestRuntimeWithAutoconfig", "_testRuntime2", "pwAutoconfigModuleName", "_tsRewriteRelativeImportExtensions", "then", "_getGlobalTestRuntime", "_getGlobalTestRuntime2", "catch", "callRuntimeMethod", "method", "_len", "arguments", "length", "args", "Array", "_key", "runtime", "getGlobalTestRuntimeWithAutoconfig", "isPromise", "then", "testRuntime", "label", "name", "value", "labels", "_len2", "labelsList", "_key2", "link", "url", "type", "links", "_len3", "linksList", "_key3", "parameter", "options", "description", "markdown", "descriptionHtml", "html", "displayName", "historyId", "testCaseId", "attachment", "content", "opts", "contentType", "attachTrace", "path", "attachmentPath", "stepContext", "mode", "logStep", "status", "error", "step", "body", "issue", "LinkType", "ISSUE", "tms", "TMS", "allureId", "LabelName", "ALLURE_ID", "epic", "EPIC", "feature", "FEATURE", "story", "STORY", "suite", "SUITE", "parentSuite", "PARENT_SUITE", "subSuite", "SUB_SUITE", "owner", "OWNER", "severity", "SEVERITY", "layer", "LAYER", "tag", "TAG", "tags", "_len4", "tagsList", "_key4", "map", "DEFAULT_RUNTIME_CONFIG", "popUntilFindIncluded", "items", "pred", "index", "toReversed", "arr", "len", "result", "i", "last", "isDefined", "value", "getAllureState", "state", "DEFAULT_RUNTIME_CONFIG", "isAllureInitialized", "setAllureInitialized", "getRuntimeMessages", "setRuntimeMessages", "value", "enqueueRuntimeMessage", "message", "getAllureTestPlan", "getProjectDir", "getCurrentTest", "setCurrentTest", "test", "dropCurrentTest", "getConfig", "getStepStack", "getCurrentStep", "last", "pushStep", "step", "popSteps", "index", "toReversed", "getStepStack", "popAllSteps", "setupStepFinalization", "step", "finalizer", "getAllureState", "getStepsToFinalize", "clearStepsToFinalize", "state", "applyTestPlan", "spec", "root", "testPlan", "getAllureTestPlan", "specPath", "resolveSpecRelativePath", "suite", "iterateSuites", "indicesToRemove", "getIndicesOfDeselectedTests", "removeSortedIndices", "parent", "suiteStack", "s", "i", "tests", "test", "index", "fullNameSuffix", "labels", "getTestMetadata", "fullName", "allureId", "name", "LabelName", "includedInTestPlan", "arr", "indices", "ALLURE_REPORT_SYSTEM_HOOK", "registerMochaEventListeners", "onStart", "onSuite", "reportSuiteEnd", "onHook", "onHookEnd", "onTest", "reportTestPass", "onFail", "reportTestSkip", "reportTestEnd", "injectFlushMessageHooks", "flushRuntimeMessages", "onAfterAll", "initTestRuntime", "reportRunStart", "suite", "applyTestPlan", "reportSuiteStart", "hook", "isAllureHook", "reportHookStart", "reportHookEnd", "test", "isTestReported", "reportTestStart", "testOrHook", "err", "isHook", "isRootAfterAllHook", "reportTestOrHookFail", "completeHookErrorReporting", "completeSpecIfNoAfterHookLeft", "IS_WIN", "getFileNameFromPath", "path", "resolveSpecRelativePath", "spec", "projectDir", "getProjectDir", "specPath", "uint8ArrayToBase64", "data", "getTestStartData", "test", "getTestMetadata", "getTestStopData", "getTestSkipData", "getStepStopData", "step", "status", "statusDetails", "resolveStepStatus", "testReportedKey", "markTestAsReported", "isTestReported", "iterateSuites", "parent", "suiteStack", "s", "i", "iterateTests", "suite", "getSuitePath", "suites", "generateApiStepId", "getAllureState", "getTestMetadata", "test", "rawName", "name", "labels", "links", "extractMetadataFromString", "fullNameSuffix", "isAllureHook", "hook", "ALLURE_REPORT_SYSTEM_HOOK", "isRootAfterAllHook", "isLastRootAfterHook", "context", "currentAfterAll", "h", "getStatusDataOfTestSkippedByHookError", "hookTitle", "isEachHook", "err", "suite", "status", "Status", "getStatusFromError", "message", "trace", "getMessageAndTraceFromError", "getSkipReason", "suiteName", "resolveConsoleProps", "entry", "resolveRenderProps", "ALLURE_STEP_CMD_SUBJECT", "isApiStep", "descriptor", "isLogStep", "startAllureApiStep", "name", "reportStepStart", "pushAllureStep", "id", "generateApiStepId", "pushStep", "reportStepError", "error", "status", "getStatusFromError", "statusDetails", "getMessageAndTraceFromError", "stopAllureApiStepStackTip", "associateErrorWithRunningSteps", "stopCurrentAllureApiStep", "findAndStopStepWithSubsteps", "stepDescriptor", "pred", "stopSelectedSteps", "popUntilFindIncluded", "getStepStack", "stopAllSteps", "popAllSteps", "finalizeSteps", "getStepsToFinalize", "finalizeOneStep", "clearStepsToFinalize", "resolveStepStatus", "step", "Status", "finalizer", "data", "enqueueRuntimeMessage", "stepStack", "firstApiStepAfterLastLogStep", "logEntryOrMessage", "propagateErrorToStepDescriptor", "errorOfSubstep", "steps", "stepEntry", "stopStep", "reportStepStop", "setupStepFinalization", "initTestRuntime", "setGlobalTestRuntime", "AllureCypressTestRuntime", "getTestRuntime", "getGlobalTestRuntime", "#resetMessages", "labels", "#enqueueMessageAsync", "links", "name", "value", "options", "markdown", "html", "content", "attachmentRawContent", "actualEncoding", "attachmentContent", "uint8ArrayToBase64", "path", "status", "Status", "error", "#isInOriginContext", "startAllureApiStep", "stopCurrentAllureApiStep", "getMessageAndTraceFromError", "ALLURE_STEP_CMD_SUBJECT", "body", "result", "mode", "taskName", "messages", "#dequeueAllMessages", "args", "setRuntimeMessages", "message", "enqueueRuntimeMessage", "getRuntimeMessages", "hasOriginContext", "hasOriginWindow", "baseUrl", "currentOrigin", "cypressInstance", "cyExists", "cyTaskExists", "reportRunStart", "enqueueRuntimeMessage", "reportSuiteStart", "suite", "reportSuiteEnd", "reportHookStart", "hook", "start", "reportHookEnd", "finalizeSteps", "reportTestStart", "test", "setCurrentTest", "getTestStartData", "markTestAsReported", "reportStepStart", "id", "name", "reportStepStop", "step", "status", "statusDetails", "getStepStopData", "reportTestPass", "reportTestOrHookFail", "err", "getStatusFromError", "getMessageAndTraceFromError", "stopAllSteps", "completeHookErrorReporting", "isEachHook", "testFailData", "getStatusDataOfTestSkippedByHookError", "reportCurrentTestIfAny", "reportRemainingTests", "reportTestSkip", "isTestReported", "Status", "getTestSkipData", "reportTestEnd", "dropCurrentTest", "reportScreenshot", "path", "ContentType", "completeSpecIfNoAfterHookLeft", "context", "isLastRootAfterHook", "isAllureHook", "completeSpecAsync", "completeSpecOnAfterHookFailure", "hookError", "allureError", "logAllureRootAfterError", "throwAfterSpecCompletion", "flushRuntimeMessages", "getTestRuntime", "currentTest", "getCurrentTest", "iterateTests", "reportTestsSkippedByHookError", "getTestStopData", "getSuitePath", "s", "enableScopeLevelAfterHookReporting", "suiteDepthCounter", "createSuiteDepthCounterState", "patchDescribe", "patchAfter", "suiteDepth", "incrementSuiteDepth", "decrementSuiteDepth", "patchDescribeFn", "target", "title", "configOrFn", "fn", "forwardDescribeCall", "originalDescribeFn", "patchedDescribe", "getSuiteDepth", "originalAfter", "patchedAfter", "nameOrFn", "wrapRootAfterFn", "args", "wrappedFn", "wrapAfterFnWithCallback", "wrapAfterFnWithoutArgs", "done", "wrappedDone", "hookError", "completeSpecOnAfterHookFailure", "completeSpecIfNoAfterHookLeft", "allureError", "result", "syncError", "e", "throwAfterSpecCompletion", "isPromise", "asyncError", "serialize_default", "value", "isDomObject", "stringifyAsDom", "serializeAsObject", "isPlainObject", "stripAncestorRefs", "ancestors", "result", "key", "prop", "cleaned", "serialize", "getSerializeOptions", "maxDepth", "maxLength", "getConfig", "nonNullReplacerWithDomSupport", "_", "shouldCreateStepFromCommandLogEntry", "entry", "event", "instrument", "isApiStepErrorLogEntry", "setupScreenshotAttachmentStep", "originalName", "name", "step", "getCurrentStep", "isLogStep", "commandName", "nameFromProps", "resolveConsoleProps", "startCommandLogStep", "currentLogEntry", "getCurrentLogEntry", "shouldStopCurrentLogStep", "stopCommandLogStep", "pushLogEntry", "reportStepStart", "getCommandLogStepName", "scheduleCommandLogStepStop", "entryId", "findAndStopStepWithSubsteps", "id", "stepDescriptor", "pushStep", "setupStepFinalization", "data", "getCommandLogStepParameters", "groupStart", "end", "originalEndGroup", "originalEnd", "ALLURE_STEP_CMD_SUBJECT", "message", "displayName", "resolvedName", "resolvedMessage", "maybeGetAssertionLogMessage", "maybeGetCucumberLogMessage", "resolveRenderProps", "getLogProps", "k", "v", "serialize_default", "getPropValueSetFilter", "WELL_KNOWN_CUCUMBER_LOG_NAMES", "isAssertionWithMessage", "props", "isDefined", "isAssertLog", "getStepStack", "newLogEntry", "currentEntryIsGroup", "currentEntryType", "newEntryType", "value", "registerCypressEventListeners", "onFail", "onLogAdded", "enableReportingOfCypressScreenshots", "onAfterScreenshot", "originalName", "path", "name", "getFileNameFromPath", "reportScreenshot", "setupScreenshotAttachmentStep", "_", "entry", "shouldCreateStepFromCommandLogEntry", "startCommandLogStep", "error", "reportStepError", "noSubsequentFailListeners", "enableAllure", "registerMochaEventListeners", "registerCypressEventListeners", "injectFlushMessageHooks", "enableScopeLevelAfterHookReporting", "initializeAllure", "isAllureInitialized", "setAllureInitialized", "enableAllure", "enableReportingOfCypressScreenshots", "initializeAllure"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure-cypress",
3
- "version": "3.4.4",
3
+ "version": "3.4.5",
4
4
  "description": "Allure Cypress integration",
5
5
  "keywords": [
6
6
  "allure",
@@ -60,7 +60,7 @@
60
60
  "test": "vitest run"
61
61
  },
62
62
  "dependencies": {
63
- "allure-js-commons": "3.4.4"
63
+ "allure-js-commons": "3.4.5"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@babel/cli": "^7.28.0",
@@ -76,7 +76,7 @@
76
76
  "@typescript-eslint/eslint-plugin": "^8.0.0",
77
77
  "@typescript-eslint/parser": "^8.0.0",
78
78
  "allure-commandline": "^2.29.0",
79
- "allure-vitest": "3.4.4",
79
+ "allure-vitest": "3.4.5",
80
80
  "babel-plugin-add-module-exports": "^1.0.4",
81
81
  "cypress": "^15.0.0",
82
82
  "esbuild": "^0.27.0",