allure-cypress 3.8.0 → 3.10.0

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.
@@ -216,12 +216,9 @@ class AllureCypress {
216
216
  });
217
217
  });
218
218
  _classPrivateFieldInitSpec(this, _startRun, absolutePath => {
219
- // This function is executed once on `cypress run`, but it can be executed
220
- // multiple times during an interactive session (`cypress open`). Ideally,
221
- // in that case, we should remove previous result objects that haven't been
222
- // written yet, but it would've required support in ReporterRuntime.
223
- // Currently, we're discarding the entire spec context.
224
- _classPrivateFieldGet(_initializeSpecContext, this).call(this, absolutePath);
219
+ if (!this.specContextByAbsolutePath.has(absolutePath)) {
220
+ _classPrivateFieldGet(_initializeSpecContext, this).call(this, absolutePath);
221
+ }
225
222
  });
226
223
  _classPrivateFieldInitSpec(this, _startSuite, (context, _ref2) => {
227
224
  var {
@@ -326,12 +323,16 @@ class AllureCypress {
326
323
  labels: metadataLabels = []
327
324
  } = _ref7,
328
325
  otherTestData = _objectWithoutProperties(_ref7, _excluded2);
326
+ var projectName = (0, _reporter.getProjectName)();
329
327
  var posixPath = (0, _reporter.getPosixPath)(context.specPath);
328
+ var fullNameBase = projectName ? "".concat(projectName, ":").concat(posixPath) : posixPath;
329
+ var legacyFullName = "".concat(posixPath, "#").concat(fullNameSuffix);
330
+ var titlePath = posixPath.split("/").concat(context.suiteNames);
330
331
  return this.allureRuntime.startTest(_objectSpread({
331
332
  stage: _allureJsCommons.Stage.RUNNING,
332
- labels: [(0, _reporter.getLanguageLabel)(), (0, _reporter.getFrameworkLabel)("cypress"), ...(0, _reporter.getSuiteLabels)(context.suiteNames), ...metadataLabels, ...(0, _reporter.getEnvironmentLabels)(), (0, _reporter.getHostLabel)(), (0, _reporter.getThreadLabel)(), (0, _reporter.getPackageLabel)(context.specPath)],
333
- fullName: "".concat(posixPath, "#").concat(fullNameSuffix),
334
- titlePath: posixPath.split("/").concat(context.suiteNames)
333
+ labels: [(0, _reporter.getLanguageLabel)(), (0, _reporter.getFrameworkLabel)("cypress"), ...(0, _reporter.getSuiteLabels)(context.suiteNames), ...metadataLabels, ...(0, _reporter.getEnvironmentLabels)(), (0, _reporter.getHostLabel)(), (0, _reporter.getThreadLabel)(), (0, _reporter.getPackageLabel)(context.specPath), (0, _reporter.getFallbackTestCaseIdLabel)((0, _reporter.md5)(legacyFullName))],
334
+ fullName: "".concat(fullNameBase, "#").concat(fullNameSuffix),
335
+ titlePath: projectName ? [projectName, ...titlePath] : titlePath
335
336
  }, otherTestData), scopes);
336
337
  });
337
338
  _classPrivateFieldInitSpec(this, _failHookAndTest, (context, _ref8) => {
@@ -589,6 +590,7 @@ var createRuntimeState = allureConfig => ({
589
590
  messages: [],
590
591
  testPlan: (0, _reporter.parseTestPlan)(),
591
592
  projectDir: (0, _reporter.getProjectRoot)(),
593
+ projectName: (0, _reporter.getProjectName)(),
592
594
  stepStack: [],
593
595
  stepsToFinalize: [],
594
596
  nextApiStepId: 0
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.js","names":["_allureJsCommons","require","_reporter","_utils","_excluded","_excluded2","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","n","indexOf","propertyIsEnumerable","call","hasOwnProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","_classPrivateFieldGet","s","get","_assertClassBrand","_endAllSpecs","WeakMap","_applyAllureCypressMessages","_startRun","_startSuite","_pushNewSuiteScope","_stopSuite","_writeLastSuiteScope","_startHook","_stopHook","_startTest","_addNewTestResult","_failHookAndTest","_passTest","_skipTest","_addSkippedTest","_stopTest","_stopExistingTestResult","_fixTestStepStops","_fixFixtureStepStops","_fixStepStops","_startStep","_stopStep","_finalizeStep","_applyRuntimeApiMessages","_emitPreviousTestScope","_resolveRootUuid","_attachSpecVideo","_emitRemainingScopes","_initializeSpecContext","AllureCypress","constructor","config","undefined","Map","on","reportAllureCypressSpecMessages","args","reportFinalAllureCypressSpecMessages","isInteractive","endSpec","absolutePath","onAfterSpec","onAfterRun","spec","results","_results$video","absolute","video","endRun","allureRuntime","writeEnvironmentInfo","writeCategoriesDefinitions","specAbsolutePath","cypressVideoPath","specContext","specContextByAbsolutePath","delete","_ref","messages","message","type","context","data","_ref2","id","name","root","suiteNames","suiteId","scope","startScope","suiteScopes","suiteIdToScope","suiteScopeToId","_ref3","pop","writeScope","_ref4","scopeType","position","start","isEach","isAfterEach","testScope","last","fixture","startFixture","status","_ref5","duration","fixtureUuid","updateFixture","_fixture$status","Status","PASSED","stopFixture","_ref6","fullNameSuffix","testResultData","test","videoScope","_ref7","scopes","labels","metadataLabels","otherTestData","posixPath","getPosixPath","specPath","startTest","stage","Stage","RUNNING","getLanguageLabel","getFrameworkLabel","getSuiteLabels","getEnvironmentLabels","getHostLabel","getThreadLabel","getPackageLabel","fullName","concat","titlePath","split","_ref8","statusDetails","setError","result","assign","testUuid","updateTest","failed","testResult","_ref9","SKIPPED","_ref0","suites","retries","map","Boolean","writeTest","_ref1","_ref10","parameters","toString","excluded","FINISHED","stopTest","_ref11","stop","steps","step","at","_ref12","properties","rootUuid","stepUuid","startStep","stepsByFrontEndId","_ref13","updateStep","stopStep","_ref14","applyRuntimeMessages","applyGlobalRuntimeMessages","_context$fixture","shouldVideoBeAttached","videoOnFailOnly","writeAttachment","contentType","ContentType","MP4","getRelativePath","resultsDir","rest","ReporterRuntime","writer","createDefaultWriter","exports","createRuntimeState","allureConfig","getRuntimeConfigDefaults","initialized","testPlan","parseTestPlan","projectDir","getProjectRoot","stepStack","stepsToFinalize","nextApiStepId","stepsFromCommands","maxArgumentLength","DEFAULT_RUNTIME_CONFIG","maxArgumentDepth","initializeRuntimeState","cypressConfig","env","allure","allureCypress","hasCypressConfig","allureCypressReporter","attachToCypress"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { ContentType, Stage, Status } from \"allure-js-commons\";\nimport type { FixtureResult, TestResult } from \"allure-js-commons\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getPackageLabel,\n getPosixPath,\n getProjectRoot,\n getRelativePath,\n getSuiteLabels,\n getThreadLabel,\n parseTestPlan,\n} from \"allure-js-commons/sdk/reporter\";\nimport type Cypress from \"cypress\";\n\nimport type {\n AllureCypressConfig,\n AllureCypressTaskArgs,\n AllureSpecState,\n CypressFailMessage,\n CypressHookEndMessage,\n CypressHookStartMessage,\n CypressSkippedTestMessage,\n CypressStepFinalizeMessage,\n CypressStepStartMessage,\n CypressStepStopMessage,\n CypressSuiteEndMessage,\n CypressSuiteStartMessage,\n CypressTestEndMessage,\n CypressTestSkipMessage,\n CypressTestStartMessage,\n SpecContext,\n} from \"./types.js\";\nimport { DEFAULT_RUNTIME_CONFIG, last } from \"./utils.js\";\n\nexport class AllureCypress {\n allureRuntime: ReporterRuntime;\n specContextByAbsolutePath = new Map<string, SpecContext>();\n videoOnFailOnly: boolean = false;\n\n constructor(config: AllureCypressConfig = {}) {\n const { resultsDir, videoOnFailOnly = false, ...rest } = config;\n\n this.videoOnFailOnly = videoOnFailOnly;\n this.allureRuntime = new ReporterRuntime({\n writer: createDefaultWriter({ resultsDir }),\n ...rest,\n });\n }\n\n attachToCypress = (on: Cypress.PluginEvents) => {\n on(\"task\", {\n reportAllureCypressSpecMessages: (args: AllureCypressTaskArgs) => {\n this.#applyAllureCypressMessages(args);\n return null;\n },\n reportFinalAllureCypressSpecMessages: (args: AllureCypressTaskArgs) => {\n this.#applyAllureCypressMessages(args);\n if (args.isInteractive) {\n // In non-interactive mode the spec is ended via the 'after:spec' event instead\n // to get the spec's video.\n this.endSpec(args.absolutePath);\n }\n return null;\n },\n });\n\n // Emits the remaining fixtures and writes the video of the spec.\n // In interactive mode it's invoked through the `reportFinalAllureCypressSpecMessages` task.\n on(\"after:spec\", this.onAfterSpec);\n\n // Emits the categories and env info. Doesn't work in interactive mode unless\n // `experimentalInteractiveRunEvents` is set.\n on(\"after:run\", this.onAfterRun);\n };\n\n /**\n * Forward the `after:spec` event into Allure Cypress using this function if\n * you need to define your own handler or combine Allure Cypress with other\n * plugins. More info [here](https://github.com/allure-framework/allure-js/blob/main/packages/allure-cypress/README.md#setupnodeevents-limitations).\n * @param spec The first argument of the `after:spec` event.\n * @param results The second argument of the `after:spec` event. It's `undefined` in interactive mode.\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * setupNodeEvents: (on, config) => {\n * const allureReporter = allureCypress(on, config);\n * on(\"after:spec\", (spec, results) => {\n * allureReporter.onAfterSpec(spec, results);\n * });\n * return config;\n * }\n * // ...\n * });\n * ```\n */\n onAfterSpec = (spec: Cypress.Spec, results: CypressCommandLine.RunResult | undefined) => {\n this.endSpec(spec.absolute, results?.video ?? undefined);\n };\n\n /**\n * Forward the `after:run` event into Allure Cypress using this function if\n * you need to define your own handler or combine Allure Cypress with other\n * plugins. More info [here](https://github.com/allure-framework/allure-js/blob/main/packages/allure-cypress/README.md#setupnodeevents-limitations).\n * @param results The argument of the `after:run` event. It's `undefined` in interactive mode.\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * setupNodeEvents: (on, config) => {\n * const allureReporter = allureCypress(on, config);\n * on(\"after:run\", (results) => {\n * allureReporter.onAfterRun(results);\n * });\n * return config;\n * }\n * // ...\n * });\n * ```\n */\n onAfterRun = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n results: CypressCommandLine.CypressFailedRunResult | CypressCommandLine.CypressRunResult | undefined,\n ) => {\n this.endRun();\n };\n\n endRun = () => {\n this.#endAllSpecs();\n this.allureRuntime.writeEnvironmentInfo();\n this.allureRuntime.writeCategoriesDefinitions();\n };\n\n endSpec = (specAbsolutePath: string, cypressVideoPath?: string) => {\n const specContext = this.specContextByAbsolutePath.get(specAbsolutePath);\n if (specContext) {\n this.#attachSpecVideo(specContext, cypressVideoPath);\n this.#emitRemainingScopes(specContext);\n this.specContextByAbsolutePath.delete(specAbsolutePath);\n }\n };\n\n #endAllSpecs = () => {\n for (const specAbsolutePath of this.specContextByAbsolutePath.keys()) {\n this.endSpec(specAbsolutePath);\n }\n };\n\n #applyAllureCypressMessages = ({ messages, absolutePath }: AllureCypressTaskArgs) => {\n messages.forEach((message) => {\n if (message.type === \"cypress_run_start\") {\n this.#startRun(absolutePath);\n return;\n }\n\n const context = this.specContextByAbsolutePath.get(absolutePath);\n if (!context) {\n return;\n }\n\n switch (message.type) {\n case \"cypress_suite_start\":\n this.#startSuite(context, message);\n break;\n case \"cypress_suite_end\":\n this.#stopSuite(context, message);\n break;\n case \"cypress_hook_start\":\n this.#startHook(context, message);\n break;\n case \"cypress_hook_end\":\n this.#stopHook(context, message);\n break;\n case \"cypress_test_start\":\n this.#startTest(context, message);\n break;\n case \"cypress_test_pass\":\n this.#passTest(context);\n break;\n case \"cypress_fail\":\n this.#failHookAndTest(context, message);\n break;\n case \"cypress_test_skip\":\n this.#skipTest(context, message);\n break;\n case \"cypress_skipped_test\":\n this.#addSkippedTest(context, message);\n break;\n case \"cypress_test_end\":\n this.#stopTest(context, message);\n break;\n case \"cypress_step_start\":\n this.#startStep(context, message.data);\n break;\n case \"cypress_step_stop\":\n this.#stopStep(context, message.data);\n break;\n case \"cypress_step_finalize\":\n this.#finalizeStep(context, message.data);\n break;\n default:\n this.#applyRuntimeApiMessages(context, message);\n break;\n }\n });\n };\n\n #startRun = (absolutePath: string) => {\n // This function is executed once on `cypress run`, but it can be executed\n // multiple times during an interactive session (`cypress open`). Ideally,\n // in that case, we should remove previous result objects that haven't been\n // written yet, but it would've required support in ReporterRuntime.\n // Currently, we're discarding the entire spec context.\n this.#initializeSpecContext(absolutePath);\n };\n\n #startSuite = (context: SpecContext, { data: { id, name, root } }: CypressSuiteStartMessage) => {\n this.#pushNewSuiteScope(context, id);\n if (!root) {\n this.#emitPreviousTestScope(context);\n context.suiteNames.push(name);\n }\n };\n\n #pushNewSuiteScope = (context: SpecContext, suiteId: string) => {\n const scope = this.allureRuntime.startScope();\n context.suiteScopes.push(scope);\n context.suiteIdToScope.set(suiteId, scope);\n context.suiteScopeToId.set(scope, suiteId);\n return scope;\n };\n\n #stopSuite = (context: SpecContext, { data: { root } }: CypressSuiteEndMessage) => {\n this.#emitPreviousTestScope(context);\n if (!root) {\n context.suiteNames.pop();\n }\n this.#writeLastSuiteScope(context);\n };\n\n #writeLastSuiteScope = (context: SpecContext) => {\n const scope = context.suiteScopes.pop();\n if (scope) {\n const suiteId = context.suiteScopeToId.get(scope);\n if (suiteId) {\n context.suiteScopeToId.delete(scope);\n context.suiteIdToScope.delete(suiteId);\n }\n this.allureRuntime.writeScope(scope);\n }\n };\n\n #startHook = (context: SpecContext, { data: { name, scopeType, position, start } }: CypressHookStartMessage) => {\n const isEach = scopeType === \"each\";\n const isAfterEach = position === \"after\" && isEach;\n if (!isAfterEach) {\n this.#emitPreviousTestScope(context);\n }\n\n const scope = isEach ? context.testScope : last(context.suiteScopes);\n if (scope) {\n context.fixture = this.allureRuntime.startFixture(scope, position, {\n name,\n start,\n status: undefined,\n });\n }\n };\n\n #stopHook = (context: SpecContext, { data: { duration } }: CypressHookEndMessage) => {\n const fixtureUuid = context.fixture;\n if (fixtureUuid) {\n this.allureRuntime.updateFixture(fixtureUuid, (fixture) => {\n fixture.status ??= Status.PASSED;\n });\n this.allureRuntime.stopFixture(fixtureUuid, { duration });\n this.#fixFixtureStepStops(fixtureUuid);\n context.fixture = undefined;\n }\n };\n\n #startTest = (context: SpecContext, { data: { fullNameSuffix, ...testResultData } }: CypressTestStartMessage) => {\n this.#emitPreviousTestScope(context);\n const testScope = this.allureRuntime.startScope();\n context.testScope = testScope;\n context.test = this.#addNewTestResult(context, fullNameSuffix, testResultData, [\n context.videoScope,\n ...context.suiteScopes,\n testScope,\n ]);\n };\n\n #addNewTestResult = (\n context: SpecContext,\n fullNameSuffix: string,\n { labels: metadataLabels = [], ...otherTestData }: Partial<TestResult>,\n scopes: string[],\n ) => {\n const posixPath = getPosixPath(context.specPath);\n\n return this.allureRuntime.startTest(\n {\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"cypress\"),\n ...getSuiteLabels(context.suiteNames),\n ...metadataLabels,\n ...getEnvironmentLabels(),\n getHostLabel(),\n getThreadLabel(),\n getPackageLabel(context.specPath),\n ],\n fullName: `${posixPath}#${fullNameSuffix}`,\n titlePath: posixPath.split(\"/\").concat(context.suiteNames),\n ...otherTestData,\n },\n scopes,\n );\n };\n\n #failHookAndTest = (context: SpecContext, { data: { status, statusDetails } }: CypressFailMessage) => {\n const setError = (result: object) => Object.assign(result, { status, statusDetails });\n\n const fixtureUuid = context.fixture;\n if (fixtureUuid) {\n this.allureRuntime.updateFixture(fixtureUuid, setError);\n }\n\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, setError);\n }\n\n context.failed = true;\n };\n\n #passTest = (context: SpecContext) => {\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.status = Status.PASSED;\n });\n }\n };\n\n #skipTest = (context: SpecContext, { data: { statusDetails } }: CypressTestSkipMessage) => {\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.status = Status.SKIPPED;\n if (statusDetails) {\n testResult.statusDetails = statusDetails;\n }\n });\n }\n };\n\n #addSkippedTest = (\n context: SpecContext,\n { data: { fullNameSuffix, suites, duration, retries, ...testResultData } }: CypressSkippedTestMessage,\n ) => {\n // Tests skipped because of a hook error may share all suites of the current context\n // or just a part thereof (if it's from a sibling suite).\n const scopes = suites.map((s) => context.suiteIdToScope.get(s)).filter((s): s is string => Boolean(s));\n\n const testUuid = this.#addNewTestResult(context, fullNameSuffix, testResultData, [context.videoScope, ...scopes]);\n this.#stopExistingTestResult(testUuid, { duration, retries });\n this.allureRuntime.writeTest(testUuid);\n };\n\n #stopTest = (context: SpecContext, { data }: CypressTestEndMessage) => {\n const testUuid = context.test;\n if (testUuid) {\n this.#stopExistingTestResult(testUuid, data);\n this.allureRuntime.writeTest(testUuid);\n context.test = undefined;\n }\n };\n\n #stopExistingTestResult = (testUuid: string, { retries, duration }: CypressTestEndMessage[\"data\"]) => {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n if (retries > 0) {\n testResult.parameters.push({\n name: \"Retry\",\n value: retries.toString(),\n excluded: true,\n });\n }\n testResult.stage = Stage.FINISHED;\n });\n this.allureRuntime.stopTest(testUuid, { duration });\n this.#fixTestStepStops(testUuid);\n };\n\n #fixTestStepStops = (testUuid: string) => {\n this.allureRuntime.updateTest(testUuid, this.#fixStepStops);\n };\n\n #fixFixtureStepStops = (fixtureUuid: string) => {\n this.allureRuntime.updateFixture(fixtureUuid, this.#fixStepStops);\n };\n\n #fixStepStops = ({ stop, steps = [] }: TestResult | FixtureResult) => {\n if (stop) {\n // In some circumstances, steps becomes dangling and are stopped at the test end/hook end events, which happen\n // chronologically after the test or fixture ends. This leads to the steps' stop time being greater than the one\n // of the test/fixture.\n // The only steps that may be affected are the rightmost descendants of the test/fixture.\n for (let step = steps.at(-1); step; step = step.steps.at(-1)) {\n if (step.stop && step.stop > stop) {\n step.stop = stop;\n } else {\n // Steps are always stopped child-to-parent. If a step's stop time is OK, its substeps are also correct.\n return;\n }\n }\n }\n };\n\n #startStep = (context: SpecContext, { id, ...properties }: CypressStepStartMessage[\"data\"]) => {\n const rootUuid = this.#resolveRootUuid(context);\n if (rootUuid) {\n const stepUuid = this.allureRuntime.startStep(rootUuid, undefined, properties);\n if (stepUuid) {\n context.stepsByFrontEndId.set(id, stepUuid);\n }\n }\n };\n\n #stopStep = (context: SpecContext, { id, stop, ...properties }: CypressStepStopMessage[\"data\"]) => {\n const stepUuid = context.stepsByFrontEndId.get(id);\n if (stepUuid) {\n this.allureRuntime.updateStep(stepUuid, (r) => {\n Object.assign(r, properties);\n });\n this.allureRuntime.stopStep(stepUuid, { stop });\n }\n };\n\n #finalizeStep = (context: SpecContext, { id, ...properties }: CypressStepFinalizeMessage[\"data\"]) => {\n const stepUuid = context.stepsByFrontEndId.get(id);\n if (stepUuid) {\n this.allureRuntime.updateStep(stepUuid, (r) => {\n Object.assign(r, properties);\n });\n context.stepsByFrontEndId.delete(id);\n }\n };\n\n #applyRuntimeApiMessages = (context: SpecContext, message: RuntimeMessage) => {\n const rootUuid = this.#resolveRootUuid(context);\n if (rootUuid) {\n this.allureRuntime.applyRuntimeMessages(rootUuid, [message]);\n } else {\n this.allureRuntime.applyGlobalRuntimeMessages([message]);\n }\n };\n\n /**\n * We must defer emitting a test's scope until we receive all the test's `afterEach` hooks.\n * At the same time, we should report it as early as we can. That means we should call this\n * method in the following cases:\n * - when an `after` hook of the test starts (`after` hooks are called later than `afterEach`)\n * - when a `before` or `beforeEach` hook of the next test starts (in case the next test has `before`/`beforeEach` hooks)\n * - when the next test starts (in case the next test doesn't have `before`/`beforeEach` hooks)\n * - when the test's suite ends (in case the test is the last one in its suite, including the root suite of the spec)\n * - when a nested suite starts\n * - when the spec ends\n */\n #emitPreviousTestScope = (context: SpecContext) => {\n const testScope = context.testScope;\n\n // Checking the test allows us to tell `beforeEach` and `afterEach` apart.\n // Here we're interested in `afterEach` only.\n if (!context.test && testScope) {\n this.allureRuntime.writeScope(testScope);\n context.testScope = undefined;\n }\n };\n\n #resolveRootUuid = (context: SpecContext) => context.fixture ?? context.test;\n\n #attachSpecVideo = (context: SpecContext, cypressVideoPath?: string) => {\n const shouldVideoBeAttached = (!this.videoOnFailOnly || context.failed) && cypressVideoPath;\n if (shouldVideoBeAttached) {\n const fixtureUuid = this.allureRuntime.startFixture(context.videoScope, \"after\", {\n name: \"Cypress video\",\n status: Status.PASSED,\n stage: Stage.FINISHED,\n })!;\n this.allureRuntime.writeAttachment(fixtureUuid, undefined, \"Cypress video\", cypressVideoPath, {\n contentType: ContentType.MP4,\n });\n this.allureRuntime.stopFixture(fixtureUuid);\n this.allureRuntime.writeScope(context.videoScope);\n }\n };\n\n #emitRemainingScopes = (context: SpecContext) => {\n this.#emitPreviousTestScope(context);\n context.suiteScopes.forEach((scope) => {\n this.allureRuntime.writeScope(scope);\n });\n };\n\n #initializeSpecContext = (absolutePath: string) => {\n const specPath = getRelativePath(absolutePath);\n const context: SpecContext = {\n specPath,\n test: undefined,\n fixture: undefined,\n stepsByFrontEndId: new Map(),\n videoScope: this.allureRuntime.startScope(),\n suiteIdToScope: new Map(),\n suiteScopeToId: new Map(),\n suiteScopes: [],\n testScope: undefined,\n suiteNames: [],\n failed: false,\n };\n this.specContextByAbsolutePath.set(absolutePath, context);\n };\n}\n\nconst createRuntimeState = (allureConfig?: AllureCypressConfig): AllureSpecState => ({\n config: getRuntimeConfigDefaults(allureConfig),\n initialized: false,\n messages: [],\n testPlan: parseTestPlan(),\n projectDir: getProjectRoot(),\n stepStack: [],\n stepsToFinalize: [],\n nextApiStepId: 0,\n});\n\nconst getRuntimeConfigDefaults = ({\n stepsFromCommands: {\n maxArgumentLength = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength,\n maxArgumentDepth = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth,\n } = DEFAULT_RUNTIME_CONFIG.stepsFromCommands,\n}: AllureCypressConfig = DEFAULT_RUNTIME_CONFIG): AllureSpecState[\"config\"] => ({\n stepsFromCommands: {\n maxArgumentDepth,\n maxArgumentLength,\n },\n});\n\nconst initializeRuntimeState = (cypressConfig: Cypress.PluginConfigOptions, allureConfig?: AllureCypressConfig) => {\n cypressConfig.env.allure = createRuntimeState(allureConfig);\n return cypressConfig;\n};\n\n/**\n * Sets up Allure Cypress.\n * @param on The function used to subscribe to Cypress Node events (it's the first argument of `setupNodeEvents`).\n * @param cypressConfig The Cypress configuration (the second argument of `setupNodeEvents`). If provided, the selective run feature will be enabled.\n * @param allureConfig An Allure configuration object (optional).\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * e2e: {\n * setupNodeEvents: (on, config) => {\n * allureCypress(on, config, { videoOnFailOnly: true });\n * return config;\n * },\n * // ...\n * }\n * });\n * ```\n */\nexport const allureCypress = (\n on: Cypress.PluginEvents,\n cypressConfig?: Cypress.PluginConfigOptions,\n allureConfig?: AllureCypressConfig,\n) => {\n // Backward compatibility; mainly for JS users who have no type hints\n if (!allureConfig && cypressConfig && !(\"env\" in cypressConfig)) {\n allureConfig = cypressConfig as AllureCypressConfig;\n }\n\n const hasCypressConfig = cypressConfig && \"env\" in cypressConfig;\n\n const allureCypressReporter = new AllureCypress(allureConfig);\n allureCypressReporter.attachToCypress(on);\n\n if (hasCypressConfig) {\n initializeRuntimeState(cypressConfig, allureConfig);\n }\n\n return allureCypressReporter;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAmCA,IAAAE,MAAA,GAAAF,OAAA;AAA0D,IAAAG,SAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WA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aAAa,GAAGA,CAC3BpK,EAAwB,EACxBiK,aAA2C,EAC3Cf,YAAkC,KAC/B;EACH;EACA,IAAI,CAACA,YAAY,IAAIe,aAAa,IAAI,EAAE,KAAK,IAAIA,aAAa,CAAC,EAAE;IAC/Df,YAAY,GAAGe,aAAoC;EACrD;EAEA,IAAMI,gBAAgB,GAAGJ,aAAa,IAAI,KAAK,IAAIA,aAAa;EAEhE,IAAMK,qBAAqB,GAAG,IAAI3K,aAAa,CAACuJ,YAAY,CAAC;EAC7DoB,qBAAqB,CAACC,eAAe,CAACvK,EAAE,CAAC;EAEzC,IAAIqK,gBAAgB,EAAE;IACpBL,sBAAsB,CAACC,aAAa,EAAEf,YAAY,CAAC;EACrD;EAEA,OAAOoB,qBAAqB;AAC9B,CAAC;AAACtB,OAAA,CAAAoB,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"reporter.js","names":["_allureJsCommons","require","_reporter","_utils","_excluded","_excluded2","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","n","indexOf","propertyIsEnumerable","call","hasOwnProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","_classPrivateFieldGet","s","get","_assertClassBrand","_endAllSpecs","WeakMap","_applyAllureCypressMessages","_startRun","_startSuite","_pushNewSuiteScope","_stopSuite","_writeLastSuiteScope","_startHook","_stopHook","_startTest","_addNewTestResult","_failHookAndTest","_passTest","_skipTest","_addSkippedTest","_stopTest","_stopExistingTestResult","_fixTestStepStops","_fixFixtureStepStops","_fixStepStops","_startStep","_stopStep","_finalizeStep","_applyRuntimeApiMessages","_emitPreviousTestScope","_resolveRootUuid","_attachSpecVideo","_emitRemainingScopes","_initializeSpecContext","AllureCypress","constructor","config","undefined","Map","on","reportAllureCypressSpecMessages","args","reportFinalAllureCypressSpecMessages","isInteractive","endSpec","absolutePath","onAfterSpec","onAfterRun","spec","results","_results$video","absolute","video","endRun","allureRuntime","writeEnvironmentInfo","writeCategoriesDefinitions","specAbsolutePath","cypressVideoPath","specContext","specContextByAbsolutePath","delete","_ref","messages","message","type","context","data","_ref2","id","name","root","suiteNames","suiteId","scope","startScope","suiteScopes","suiteIdToScope","suiteScopeToId","_ref3","pop","writeScope","_ref4","scopeType","position","start","isEach","isAfterEach","testScope","last","fixture","startFixture","status","_ref5","duration","fixtureUuid","updateFixture","_fixture$status","Status","PASSED","stopFixture","_ref6","fullNameSuffix","testResultData","test","videoScope","_ref7","scopes","labels","metadataLabels","otherTestData","projectName","getProjectName","posixPath","getPosixPath","specPath","fullNameBase","concat","legacyFullName","titlePath","split","startTest","stage","Stage","RUNNING","getLanguageLabel","getFrameworkLabel","getSuiteLabels","getEnvironmentLabels","getHostLabel","getThreadLabel","getPackageLabel","getFallbackTestCaseIdLabel","md5","fullName","_ref8","statusDetails","setError","result","assign","testUuid","updateTest","failed","testResult","_ref9","SKIPPED","_ref0","suites","retries","map","Boolean","writeTest","_ref1","_ref10","parameters","toString","excluded","FINISHED","stopTest","_ref11","stop","steps","step","at","_ref12","properties","rootUuid","stepUuid","startStep","stepsByFrontEndId","_ref13","updateStep","stopStep","_ref14","applyRuntimeMessages","applyGlobalRuntimeMessages","_context$fixture","shouldVideoBeAttached","videoOnFailOnly","writeAttachment","contentType","ContentType","MP4","getRelativePath","resultsDir","rest","ReporterRuntime","writer","createDefaultWriter","exports","createRuntimeState","allureConfig","getRuntimeConfigDefaults","initialized","testPlan","parseTestPlan","projectDir","getProjectRoot","stepStack","stepsToFinalize","nextApiStepId","stepsFromCommands","maxArgumentLength","DEFAULT_RUNTIME_CONFIG","maxArgumentDepth","initializeRuntimeState","cypressConfig","env","allure","allureCypress","hasCypressConfig","allureCypressReporter","attachToCypress"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { ContentType, Stage, Status } from \"allure-js-commons\";\nimport type { FixtureResult, TestResult } from \"allure-js-commons\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFallbackTestCaseIdLabel,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getPackageLabel,\n getPosixPath,\n getProjectName,\n getProjectRoot,\n getRelativePath,\n getSuiteLabels,\n getThreadLabel,\n md5,\n parseTestPlan,\n} from \"allure-js-commons/sdk/reporter\";\nimport type Cypress from \"cypress\";\n\nimport type {\n AllureCypressConfig,\n AllureCypressTaskArgs,\n AllureSpecState,\n CypressFailMessage,\n CypressHookEndMessage,\n CypressHookStartMessage,\n CypressSkippedTestMessage,\n CypressStepFinalizeMessage,\n CypressStepStartMessage,\n CypressStepStopMessage,\n CypressSuiteEndMessage,\n CypressSuiteStartMessage,\n CypressTestEndMessage,\n CypressTestSkipMessage,\n CypressTestStartMessage,\n SpecContext,\n} from \"./types.js\";\nimport { DEFAULT_RUNTIME_CONFIG, last } from \"./utils.js\";\n\nexport class AllureCypress {\n allureRuntime: ReporterRuntime;\n specContextByAbsolutePath = new Map<string, SpecContext>();\n videoOnFailOnly: boolean = false;\n\n constructor(config: AllureCypressConfig = {}) {\n const { resultsDir, videoOnFailOnly = false, ...rest } = config;\n\n this.videoOnFailOnly = videoOnFailOnly;\n this.allureRuntime = new ReporterRuntime({\n writer: createDefaultWriter({ resultsDir }),\n ...rest,\n });\n }\n\n attachToCypress = (on: Cypress.PluginEvents) => {\n on(\"task\", {\n reportAllureCypressSpecMessages: (args: AllureCypressTaskArgs) => {\n this.#applyAllureCypressMessages(args);\n return null;\n },\n reportFinalAllureCypressSpecMessages: (args: AllureCypressTaskArgs) => {\n this.#applyAllureCypressMessages(args);\n if (args.isInteractive) {\n // In non-interactive mode the spec is ended via the 'after:spec' event instead\n // to get the spec's video.\n this.endSpec(args.absolutePath);\n }\n return null;\n },\n });\n\n // Emits the remaining fixtures and writes the video of the spec.\n // In interactive mode it's invoked through the `reportFinalAllureCypressSpecMessages` task.\n on(\"after:spec\", this.onAfterSpec);\n\n // Emits the categories and env info. Doesn't work in interactive mode unless\n // `experimentalInteractiveRunEvents` is set.\n on(\"after:run\", this.onAfterRun);\n };\n\n /**\n * Forward the `after:spec` event into Allure Cypress using this function if\n * you need to define your own handler or combine Allure Cypress with other\n * plugins. More info [here](https://github.com/allure-framework/allure-js/blob/main/packages/allure-cypress/README.md#setupnodeevents-limitations).\n * @param spec The first argument of the `after:spec` event.\n * @param results The second argument of the `after:spec` event. It's `undefined` in interactive mode.\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * setupNodeEvents: (on, config) => {\n * const allureReporter = allureCypress(on, config);\n * on(\"after:spec\", (spec, results) => {\n * allureReporter.onAfterSpec(spec, results);\n * });\n * return config;\n * }\n * // ...\n * });\n * ```\n */\n onAfterSpec = (spec: Cypress.Spec, results: CypressCommandLine.RunResult | undefined) => {\n this.endSpec(spec.absolute, results?.video ?? undefined);\n };\n\n /**\n * Forward the `after:run` event into Allure Cypress using this function if\n * you need to define your own handler or combine Allure Cypress with other\n * plugins. More info [here](https://github.com/allure-framework/allure-js/blob/main/packages/allure-cypress/README.md#setupnodeevents-limitations).\n * @param results The argument of the `after:run` event. It's `undefined` in interactive mode.\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * setupNodeEvents: (on, config) => {\n * const allureReporter = allureCypress(on, config);\n * on(\"after:run\", (results) => {\n * allureReporter.onAfterRun(results);\n * });\n * return config;\n * }\n * // ...\n * });\n * ```\n */\n onAfterRun = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n results: CypressCommandLine.CypressFailedRunResult | CypressCommandLine.CypressRunResult | undefined,\n ) => {\n this.endRun();\n };\n\n endRun = () => {\n this.#endAllSpecs();\n this.allureRuntime.writeEnvironmentInfo();\n this.allureRuntime.writeCategoriesDefinitions();\n };\n\n endSpec = (specAbsolutePath: string, cypressVideoPath?: string) => {\n const specContext = this.specContextByAbsolutePath.get(specAbsolutePath);\n if (specContext) {\n this.#attachSpecVideo(specContext, cypressVideoPath);\n this.#emitRemainingScopes(specContext);\n this.specContextByAbsolutePath.delete(specAbsolutePath);\n }\n };\n\n #endAllSpecs = () => {\n for (const specAbsolutePath of this.specContextByAbsolutePath.keys()) {\n this.endSpec(specAbsolutePath);\n }\n };\n\n #applyAllureCypressMessages = ({ messages, absolutePath }: AllureCypressTaskArgs) => {\n messages.forEach((message) => {\n if (message.type === \"cypress_run_start\") {\n this.#startRun(absolutePath);\n return;\n }\n\n const context = this.specContextByAbsolutePath.get(absolutePath);\n if (!context) {\n return;\n }\n\n switch (message.type) {\n case \"cypress_suite_start\":\n this.#startSuite(context, message);\n break;\n case \"cypress_suite_end\":\n this.#stopSuite(context, message);\n break;\n case \"cypress_hook_start\":\n this.#startHook(context, message);\n break;\n case \"cypress_hook_end\":\n this.#stopHook(context, message);\n break;\n case \"cypress_test_start\":\n this.#startTest(context, message);\n break;\n case \"cypress_test_pass\":\n this.#passTest(context);\n break;\n case \"cypress_fail\":\n this.#failHookAndTest(context, message);\n break;\n case \"cypress_test_skip\":\n this.#skipTest(context, message);\n break;\n case \"cypress_skipped_test\":\n this.#addSkippedTest(context, message);\n break;\n case \"cypress_test_end\":\n this.#stopTest(context, message);\n break;\n case \"cypress_step_start\":\n this.#startStep(context, message.data);\n break;\n case \"cypress_step_stop\":\n this.#stopStep(context, message.data);\n break;\n case \"cypress_step_finalize\":\n this.#finalizeStep(context, message.data);\n break;\n default:\n this.#applyRuntimeApiMessages(context, message);\n break;\n }\n });\n };\n\n #startRun = (absolutePath: string) => {\n if (!this.specContextByAbsolutePath.has(absolutePath)) {\n this.#initializeSpecContext(absolutePath);\n }\n };\n\n #startSuite = (context: SpecContext, { data: { id, name, root } }: CypressSuiteStartMessage) => {\n this.#pushNewSuiteScope(context, id);\n if (!root) {\n this.#emitPreviousTestScope(context);\n context.suiteNames.push(name);\n }\n };\n\n #pushNewSuiteScope = (context: SpecContext, suiteId: string) => {\n const scope = this.allureRuntime.startScope();\n context.suiteScopes.push(scope);\n context.suiteIdToScope.set(suiteId, scope);\n context.suiteScopeToId.set(scope, suiteId);\n return scope;\n };\n\n #stopSuite = (context: SpecContext, { data: { root } }: CypressSuiteEndMessage) => {\n this.#emitPreviousTestScope(context);\n if (!root) {\n context.suiteNames.pop();\n }\n this.#writeLastSuiteScope(context);\n };\n\n #writeLastSuiteScope = (context: SpecContext) => {\n const scope = context.suiteScopes.pop();\n if (scope) {\n const suiteId = context.suiteScopeToId.get(scope);\n if (suiteId) {\n context.suiteScopeToId.delete(scope);\n context.suiteIdToScope.delete(suiteId);\n }\n this.allureRuntime.writeScope(scope);\n }\n };\n\n #startHook = (context: SpecContext, { data: { name, scopeType, position, start } }: CypressHookStartMessage) => {\n const isEach = scopeType === \"each\";\n const isAfterEach = position === \"after\" && isEach;\n if (!isAfterEach) {\n this.#emitPreviousTestScope(context);\n }\n\n const scope = isEach ? context.testScope : last(context.suiteScopes);\n if (scope) {\n context.fixture = this.allureRuntime.startFixture(scope, position, {\n name,\n start,\n status: undefined,\n });\n }\n };\n\n #stopHook = (context: SpecContext, { data: { duration } }: CypressHookEndMessage) => {\n const fixtureUuid = context.fixture;\n if (fixtureUuid) {\n this.allureRuntime.updateFixture(fixtureUuid, (fixture) => {\n fixture.status ??= Status.PASSED;\n });\n this.allureRuntime.stopFixture(fixtureUuid, { duration });\n this.#fixFixtureStepStops(fixtureUuid);\n context.fixture = undefined;\n }\n };\n\n #startTest = (context: SpecContext, { data: { fullNameSuffix, ...testResultData } }: CypressTestStartMessage) => {\n this.#emitPreviousTestScope(context);\n const testScope = this.allureRuntime.startScope();\n context.testScope = testScope;\n context.test = this.#addNewTestResult(context, fullNameSuffix, testResultData, [\n context.videoScope,\n ...context.suiteScopes,\n testScope,\n ]);\n };\n\n #addNewTestResult = (\n context: SpecContext,\n fullNameSuffix: string,\n { labels: metadataLabels = [], ...otherTestData }: Partial<TestResult>,\n scopes: string[],\n ) => {\n const projectName = getProjectName();\n const posixPath = getPosixPath(context.specPath);\n const fullNameBase = projectName ? `${projectName}:${posixPath}` : posixPath;\n const legacyFullName = `${posixPath}#${fullNameSuffix}`;\n\n const titlePath = posixPath.split(\"/\").concat(context.suiteNames);\n\n return this.allureRuntime.startTest(\n {\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"cypress\"),\n ...getSuiteLabels(context.suiteNames),\n ...metadataLabels,\n ...getEnvironmentLabels(),\n getHostLabel(),\n getThreadLabel(),\n getPackageLabel(context.specPath),\n getFallbackTestCaseIdLabel(md5(legacyFullName)),\n ],\n fullName: `${fullNameBase}#${fullNameSuffix}`,\n titlePath: projectName ? [projectName, ...titlePath] : titlePath,\n ...otherTestData,\n },\n scopes,\n );\n };\n\n #failHookAndTest = (context: SpecContext, { data: { status, statusDetails } }: CypressFailMessage) => {\n const setError = (result: object) => Object.assign(result, { status, statusDetails });\n\n const fixtureUuid = context.fixture;\n if (fixtureUuid) {\n this.allureRuntime.updateFixture(fixtureUuid, setError);\n }\n\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, setError);\n }\n\n context.failed = true;\n };\n\n #passTest = (context: SpecContext) => {\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.status = Status.PASSED;\n });\n }\n };\n\n #skipTest = (context: SpecContext, { data: { statusDetails } }: CypressTestSkipMessage) => {\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.status = Status.SKIPPED;\n if (statusDetails) {\n testResult.statusDetails = statusDetails;\n }\n });\n }\n };\n\n #addSkippedTest = (\n context: SpecContext,\n { data: { fullNameSuffix, suites, duration, retries, ...testResultData } }: CypressSkippedTestMessage,\n ) => {\n // Tests skipped because of a hook error may share all suites of the current context\n // or just a part thereof (if it's from a sibling suite).\n const scopes = suites.map((s) => context.suiteIdToScope.get(s)).filter((s): s is string => Boolean(s));\n\n const testUuid = this.#addNewTestResult(context, fullNameSuffix, testResultData, [context.videoScope, ...scopes]);\n this.#stopExistingTestResult(testUuid, { duration, retries });\n this.allureRuntime.writeTest(testUuid);\n };\n\n #stopTest = (context: SpecContext, { data }: CypressTestEndMessage) => {\n const testUuid = context.test;\n if (testUuid) {\n this.#stopExistingTestResult(testUuid, data);\n this.allureRuntime.writeTest(testUuid);\n context.test = undefined;\n }\n };\n\n #stopExistingTestResult = (testUuid: string, { retries, duration }: CypressTestEndMessage[\"data\"]) => {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n if (retries > 0) {\n testResult.parameters.push({\n name: \"Retry\",\n value: retries.toString(),\n excluded: true,\n });\n }\n testResult.stage = Stage.FINISHED;\n });\n this.allureRuntime.stopTest(testUuid, { duration });\n this.#fixTestStepStops(testUuid);\n };\n\n #fixTestStepStops = (testUuid: string) => {\n this.allureRuntime.updateTest(testUuid, this.#fixStepStops);\n };\n\n #fixFixtureStepStops = (fixtureUuid: string) => {\n this.allureRuntime.updateFixture(fixtureUuid, this.#fixStepStops);\n };\n\n #fixStepStops = ({ stop, steps = [] }: TestResult | FixtureResult) => {\n if (stop) {\n // In some circumstances, steps becomes dangling and are stopped at the test end/hook end events, which happen\n // chronologically after the test or fixture ends. This leads to the steps' stop time being greater than the one\n // of the test/fixture.\n // The only steps that may be affected are the rightmost descendants of the test/fixture.\n for (let step = steps.at(-1); step; step = step.steps.at(-1)) {\n if (step.stop && step.stop > stop) {\n step.stop = stop;\n } else {\n // Steps are always stopped child-to-parent. If a step's stop time is OK, its substeps are also correct.\n return;\n }\n }\n }\n };\n\n #startStep = (context: SpecContext, { id, ...properties }: CypressStepStartMessage[\"data\"]) => {\n const rootUuid = this.#resolveRootUuid(context);\n if (rootUuid) {\n const stepUuid = this.allureRuntime.startStep(rootUuid, undefined, properties);\n if (stepUuid) {\n context.stepsByFrontEndId.set(id, stepUuid);\n }\n }\n };\n\n #stopStep = (context: SpecContext, { id, stop, ...properties }: CypressStepStopMessage[\"data\"]) => {\n const stepUuid = context.stepsByFrontEndId.get(id);\n if (stepUuid) {\n this.allureRuntime.updateStep(stepUuid, (r) => {\n Object.assign(r, properties);\n });\n this.allureRuntime.stopStep(stepUuid, { stop });\n }\n };\n\n #finalizeStep = (context: SpecContext, { id, ...properties }: CypressStepFinalizeMessage[\"data\"]) => {\n const stepUuid = context.stepsByFrontEndId.get(id);\n if (stepUuid) {\n this.allureRuntime.updateStep(stepUuid, (r) => {\n Object.assign(r, properties);\n });\n context.stepsByFrontEndId.delete(id);\n }\n };\n\n #applyRuntimeApiMessages = (context: SpecContext, message: RuntimeMessage) => {\n const rootUuid = this.#resolveRootUuid(context);\n if (rootUuid) {\n this.allureRuntime.applyRuntimeMessages(rootUuid, [message]);\n } else {\n this.allureRuntime.applyGlobalRuntimeMessages([message]);\n }\n };\n\n /**\n * We must defer emitting a test's scope until we receive all the test's `afterEach` hooks.\n * At the same time, we should report it as early as we can. That means we should call this\n * method in the following cases:\n * - when an `after` hook of the test starts (`after` hooks are called later than `afterEach`)\n * - when a `before` or `beforeEach` hook of the next test starts (in case the next test has `before`/`beforeEach` hooks)\n * - when the next test starts (in case the next test doesn't have `before`/`beforeEach` hooks)\n * - when the test's suite ends (in case the test is the last one in its suite, including the root suite of the spec)\n * - when a nested suite starts\n * - when the spec ends\n */\n #emitPreviousTestScope = (context: SpecContext) => {\n const testScope = context.testScope;\n\n // Checking the test allows us to tell `beforeEach` and `afterEach` apart.\n // Here we're interested in `afterEach` only.\n if (!context.test && testScope) {\n this.allureRuntime.writeScope(testScope);\n context.testScope = undefined;\n }\n };\n\n #resolveRootUuid = (context: SpecContext) => context.fixture ?? context.test;\n\n #attachSpecVideo = (context: SpecContext, cypressVideoPath?: string) => {\n const shouldVideoBeAttached = (!this.videoOnFailOnly || context.failed) && cypressVideoPath;\n if (shouldVideoBeAttached) {\n const fixtureUuid = this.allureRuntime.startFixture(context.videoScope, \"after\", {\n name: \"Cypress video\",\n status: Status.PASSED,\n stage: Stage.FINISHED,\n })!;\n this.allureRuntime.writeAttachment(fixtureUuid, undefined, \"Cypress video\", cypressVideoPath, {\n contentType: ContentType.MP4,\n });\n this.allureRuntime.stopFixture(fixtureUuid);\n this.allureRuntime.writeScope(context.videoScope);\n }\n };\n\n #emitRemainingScopes = (context: SpecContext) => {\n this.#emitPreviousTestScope(context);\n context.suiteScopes.forEach((scope) => {\n this.allureRuntime.writeScope(scope);\n });\n };\n\n #initializeSpecContext = (absolutePath: string) => {\n const specPath = getRelativePath(absolutePath);\n const context: SpecContext = {\n specPath,\n test: undefined,\n fixture: undefined,\n stepsByFrontEndId: new Map(),\n videoScope: this.allureRuntime.startScope(),\n suiteIdToScope: new Map(),\n suiteScopeToId: new Map(),\n suiteScopes: [],\n testScope: undefined,\n suiteNames: [],\n failed: false,\n };\n this.specContextByAbsolutePath.set(absolutePath, context);\n };\n}\n\nconst createRuntimeState = (allureConfig?: AllureCypressConfig): AllureSpecState => ({\n config: getRuntimeConfigDefaults(allureConfig),\n initialized: false,\n messages: [],\n testPlan: parseTestPlan(),\n projectDir: getProjectRoot(),\n projectName: getProjectName(),\n stepStack: [],\n stepsToFinalize: [],\n nextApiStepId: 0,\n});\n\nconst getRuntimeConfigDefaults = ({\n stepsFromCommands: {\n maxArgumentLength = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength,\n maxArgumentDepth = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth,\n } = DEFAULT_RUNTIME_CONFIG.stepsFromCommands,\n}: AllureCypressConfig = DEFAULT_RUNTIME_CONFIG): AllureSpecState[\"config\"] => ({\n stepsFromCommands: {\n maxArgumentDepth,\n maxArgumentLength,\n },\n});\n\nconst initializeRuntimeState = (cypressConfig: Cypress.PluginConfigOptions, allureConfig?: AllureCypressConfig) => {\n cypressConfig.env.allure = createRuntimeState(allureConfig);\n return cypressConfig;\n};\n\n/**\n * Sets up Allure Cypress.\n * @param on The function used to subscribe to Cypress Node events (it's the first argument of `setupNodeEvents`).\n * @param cypressConfig The Cypress configuration (the second argument of `setupNodeEvents`). If provided, the selective run feature will be enabled.\n * @param allureConfig An Allure configuration object (optional).\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * e2e: {\n * setupNodeEvents: (on, config) => {\n * allureCypress(on, config, { videoOnFailOnly: true });\n * return config;\n * },\n * // ...\n * }\n * });\n * ```\n */\nexport const allureCypress = (\n on: Cypress.PluginEvents,\n cypressConfig?: Cypress.PluginConfigOptions,\n allureConfig?: AllureCypressConfig,\n) => {\n // Backward compatibility; mainly for JS users who have no type hints\n if (!allureConfig && cypressConfig && !(\"env\" in cypressConfig)) {\n allureConfig = cypressConfig as AllureCypressConfig;\n }\n\n const hasCypressConfig = cypressConfig && \"env\" in cypressConfig;\n\n const allureCypressReporter = new AllureCypress(allureConfig);\n allureCypressReporter.attachToCypress(on);\n\n if (hasCypressConfig) {\n initializeRuntimeState(cypressConfig, allureConfig);\n }\n\n return allureCypressReporter;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAsCA,IAAAE,MAAA,GAAAF,OAAA;AAA0D,IAAAG,SAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA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,iBAAiB;MAC9EE,gBAAgB,GAAGD,6BAAsB,CAACF,iBAAiB,CAACG;IAC9D,CAAC,GAAGD,6BAAsB,CAACF;EACR,CAAC,GAAAvO,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAmE,SAAA,GAAAnE,SAAA,MAAGyO,6BAAsB;EAAA,OAAiC;IAC9EF,iBAAiB,EAAE;MACjBG,gBAAgB;MAChBF;IACF;EACF,CAAC;AAAA,CAAC;AAEF,IAAMG,sBAAsB,GAAGA,CAACC,aAA0C,EAAEf,YAAkC,KAAK;EACjHe,aAAa,CAACC,GAAG,CAACC,MAAM,GAAGlB,kBAAkB,CAACC,YAAY,CAAC;EAC3D,OAAOe,aAAa;AACtB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMG,aAAa,GAAGA,CAC3B1K,EAAwB,EACxBuK,aAA2C,EAC3Cf,YAAkC,KAC/B;EACH;EACA,IAAI,CAACA,YAAY,IAAIe,aAAa,IAAI,EAAE,KAAK,IAAIA,aAAa,CAAC,EAAE;IAC/Df,YAAY,GAAGe,aAAoC;EACrD;EAEA,IAAMI,gBAAgB,GAAGJ,aAAa,IAAI,KAAK,IAAIA,aAAa;EAEhE,IAAMK,qBAAqB,GAAG,IAAIjL,aAAa,CAAC6J,YAAY,CAAC;EAC7DoB,qBAAqB,CAACC,eAAe,CAAC7K,EAAE,CAAC;EAEzC,IAAI2K,gBAAgB,EAAE;IACpBL,sBAAsB,CAACC,aAAa,EAAEf,YAAY,CAAC;EACrD;EAEA,OAAOoB,qBAAqB;AAC9B,CAAC;AAACtB,OAAA,CAAAoB,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type { Label, Parameter, Status, StatusDetails } from \"allure-js-commons\";\nimport type {\n RuntimeMessage,\n RuntimeStartStepMessage,\n RuntimeStopStepMessage,\n TestPlanV1,\n} from \"allure-js-commons/sdk\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\n\nexport type AllureCypressConfig = ReporterConfig & {\n videoOnFailOnly?: boolean;\n stepsFromCommands?: Partial<AllureSpecState[\"config\"][\"stepsFromCommands\"]>;\n};\n\nexport type CypressSuite = Mocha.Suite & {\n id: string;\n parent: CypressSuite | undefined;\n tests: CypressTest[];\n suites: CypressSuite[];\n};\n\nexport type CypressTest = Mocha.Test & {\n wallClockStartedAt?: Date;\n parent: CypressSuite | undefined;\n};\n\nexport type CypressHook = Mocha.Hook & {\n hookId: string;\n hookName: string;\n parent: CypressSuite | undefined;\n};\n\nexport type CypressCommand = {\n attributes: {\n name: string;\n id: string;\n args: any[];\n };\n state: \"passed\" | \"failed\" | \"queued\";\n};\n\nexport type CypressRenderProps = { message?: string };\n\nexport type CypressConsoleProps = {\n name: string;\n props: Record<string, unknown>;\n};\n\nexport type CypressLogEntry = ReturnType<typeof Cypress.log> & {\n attributes: {\n id: string;\n error?: Error;\n name: string;\n message: string;\n displayName?: string;\n event: boolean;\n type: string;\n instrument: string;\n groupStart: boolean;\n createdAtTimestamp: number;\n updatedAtTimestamp: number;\n end?: boolean;\n renderProps: (() => CypressRenderProps) | CypressRenderProps;\n consoleProps: (() => CypressConsoleProps) | CypressConsoleProps;\n };\n endGroup: () => unknown;\n};\n\nexport type CupressRunStart = {\n type: \"cypress_run_start\";\n data: object;\n};\n\nexport type CypressSuiteStartMessage = {\n type: \"cypress_suite_start\";\n data: {\n id: string;\n name: string;\n root: boolean;\n start: number;\n };\n};\n\nexport type CypressSuiteEndMessage = {\n type: \"cypress_suite_end\";\n data: {\n root: boolean;\n stop: number;\n };\n};\n\nexport type CypressHookStartMessage = {\n type: \"cypress_hook_start\";\n data: {\n name: string;\n scopeType: \"each\" | \"all\";\n position: \"before\" | \"after\";\n start: number;\n };\n};\n\nexport type CypressHookEndMessage = {\n type: \"cypress_hook_end\";\n data: {\n duration: number;\n };\n};\n\nexport type CypressTestStartMessage = {\n type: \"cypress_test_start\";\n data: {\n name: string;\n fullNameSuffix: string;\n start: number;\n labels: Label[];\n };\n};\n\nexport type CypressFailMessage = {\n type: \"cypress_fail\";\n data: {\n status: Status;\n statusDetails: StatusDetails;\n };\n};\n\nexport type CypressTestSkipMessage = {\n type: \"cypress_test_skip\";\n data: {\n statusDetails?: StatusDetails;\n };\n};\n\nexport type CypressTestPassMessage = {\n type: \"cypress_test_pass\";\n data: object;\n};\n\nexport type CypressSkippedTestMessage = {\n type: \"cypress_skipped_test\";\n data: CypressTestStartMessage[\"data\"] &\n CypressFailMessage[\"data\"] &\n CypressTestEndMessage[\"data\"] & {\n suites: string[];\n };\n};\n\nexport type CypressTestEndMessage = {\n type: \"cypress_test_end\";\n data: {\n duration: number;\n retries: number;\n };\n};\n\nexport type CypressStepStartMessage = {\n type: \"cypress_step_start\";\n data: {\n id: string;\n name: string;\n start: number;\n };\n};\n\nexport type CypressStepStopMessage = {\n type: \"cypress_step_stop\";\n data: {\n id: string;\n status: Status;\n statusDetails?: StatusDetails;\n stop: number;\n };\n};\n\nexport type CypressStepFinalizeMessage = {\n type: \"cypress_step_finalize\";\n data: {\n id: string;\n name?: string;\n parameters?: Parameter[];\n statusDetails?: StatusDetails;\n };\n};\n\nexport type CypressMessage =\n | Exclude<RuntimeMessage, RuntimeStartStepMessage | RuntimeStopStepMessage>\n | CupressRunStart\n | CypressSuiteStartMessage\n | CypressSuiteEndMessage\n | CypressHookStartMessage\n | CypressHookEndMessage\n | CypressTestStartMessage\n | CypressStepStartMessage\n | CypressStepStopMessage\n | CypressStepFinalizeMessage\n | CypressTestPassMessage\n | CypressFailMessage\n | CypressTestSkipMessage\n | CypressSkippedTestMessage\n | CypressTestEndMessage;\n\nexport type SpecContext = {\n specPath: string;\n test: string | undefined;\n fixture: string | undefined;\n stepsByFrontEndId: Map<string, string>;\n videoScope: string;\n suiteIdToScope: Map<string, string>;\n suiteScopeToId: Map<string, string>;\n suiteScopes: string[];\n testScope: string | undefined;\n suiteNames: string[];\n failed: boolean;\n};\n\ntype StepDescriptorBase = {\n id: string;\n error?: Error;\n};\n\nexport type LogStepDescriptor = StepDescriptorBase & {\n type: \"log\";\n attachmentName?: string;\n log: CypressLogEntry;\n};\n\nexport type ApiStepDescriptor = StepDescriptorBase & {\n type: \"api\";\n};\n\nexport type StepDescriptor = LogStepDescriptor | ApiStepDescriptor;\n\nexport type StepFinalizer = (message: CypressStepFinalizeMessage[\"data\"]) => void;\n\nexport type AllureSpecState = {\n config: {\n stepsFromCommands: {\n maxArgumentLength: number;\n maxArgumentDepth: number;\n };\n };\n initialized: boolean;\n testPlan: TestPlanV1 | null | undefined;\n projectDir?: string;\n messages: CypressMessage[];\n currentTest?: CypressTest;\n stepStack: StepDescriptor[];\n stepsToFinalize: [step: StepDescriptor, finalizer: StepFinalizer | undefined][];\n nextApiStepId: number;\n};\n\nexport type AllureCypressTaskArgs = {\n absolutePath: string;\n messages: readonly CypressMessage[];\n isInteractive: boolean;\n};\n\nexport type CypressSuiteFunction = (\n title: string,\n configOrFn?: Cypress.SuiteConfigOverrides | ((this: Mocha.Suite) => void),\n fn?: (this: Mocha.Suite) => void,\n) => Mocha.Suite;\n\nexport type DirectHookImplementation = Mocha.AsyncFunc | ((this: Mocha.Context) => void);\nexport type HookImplementation = Mocha.Func | DirectHookImplementation;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type { Label, Parameter, Status, StatusDetails } from \"allure-js-commons\";\nimport type {\n RuntimeMessage,\n RuntimeStartStepMessage,\n RuntimeStopStepMessage,\n TestPlanV1,\n} from \"allure-js-commons/sdk\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\n\nexport type AllureCypressConfig = ReporterConfig & {\n videoOnFailOnly?: boolean;\n stepsFromCommands?: Partial<AllureSpecState[\"config\"][\"stepsFromCommands\"]>;\n};\n\nexport type CypressSuite = Mocha.Suite & {\n id: string;\n parent: CypressSuite | undefined;\n tests: CypressTest[];\n suites: CypressSuite[];\n};\n\nexport type CypressTest = Mocha.Test & {\n wallClockStartedAt?: Date;\n parent: CypressSuite | undefined;\n};\n\nexport type CypressHook = Mocha.Hook & {\n hookId: string;\n hookName: string;\n parent: CypressSuite | undefined;\n};\n\nexport type CypressCommand = {\n attributes: {\n name: string;\n id: string;\n args: any[];\n };\n state: \"passed\" | \"failed\" | \"queued\";\n};\n\nexport type CypressRenderProps = { message?: string };\n\nexport type CypressConsoleProps = {\n name: string;\n props: Record<string, unknown>;\n};\n\nexport type CypressLogEntry = ReturnType<typeof Cypress.log> & {\n attributes: {\n id: string;\n error?: Error;\n name: string;\n message: string;\n displayName?: string;\n event: boolean;\n type: string;\n instrument: string;\n groupStart: boolean;\n createdAtTimestamp: number;\n updatedAtTimestamp: number;\n end?: boolean;\n renderProps: (() => CypressRenderProps) | CypressRenderProps;\n consoleProps: (() => CypressConsoleProps) | CypressConsoleProps;\n };\n endGroup: () => unknown;\n};\n\nexport type CupressRunStart = {\n type: \"cypress_run_start\";\n data: object;\n};\n\nexport type CypressSuiteStartMessage = {\n type: \"cypress_suite_start\";\n data: {\n id: string;\n name: string;\n root: boolean;\n start: number;\n };\n};\n\nexport type CypressSuiteEndMessage = {\n type: \"cypress_suite_end\";\n data: {\n root: boolean;\n stop: number;\n };\n};\n\nexport type CypressHookStartMessage = {\n type: \"cypress_hook_start\";\n data: {\n name: string;\n scopeType: \"each\" | \"all\";\n position: \"before\" | \"after\";\n start: number;\n };\n};\n\nexport type CypressHookEndMessage = {\n type: \"cypress_hook_end\";\n data: {\n duration: number;\n };\n};\n\nexport type CypressTestStartMessage = {\n type: \"cypress_test_start\";\n data: {\n name: string;\n fullNameSuffix: string;\n start: number;\n labels: Label[];\n };\n};\n\nexport type CypressFailMessage = {\n type: \"cypress_fail\";\n data: {\n status: Status;\n statusDetails: StatusDetails;\n };\n};\n\nexport type CypressTestSkipMessage = {\n type: \"cypress_test_skip\";\n data: {\n statusDetails?: StatusDetails;\n };\n};\n\nexport type CypressTestPassMessage = {\n type: \"cypress_test_pass\";\n data: object;\n};\n\nexport type CypressSkippedTestMessage = {\n type: \"cypress_skipped_test\";\n data: CypressTestStartMessage[\"data\"] &\n CypressFailMessage[\"data\"] &\n CypressTestEndMessage[\"data\"] & {\n suites: string[];\n };\n};\n\nexport type CypressTestEndMessage = {\n type: \"cypress_test_end\";\n data: {\n duration: number;\n retries: number;\n };\n};\n\nexport type CypressStepStartMessage = {\n type: \"cypress_step_start\";\n data: {\n id: string;\n name: string;\n start: number;\n };\n};\n\nexport type CypressStepStopMessage = {\n type: \"cypress_step_stop\";\n data: {\n id: string;\n status: Status;\n statusDetails?: StatusDetails;\n stop: number;\n };\n};\n\nexport type CypressStepFinalizeMessage = {\n type: \"cypress_step_finalize\";\n data: {\n id: string;\n name?: string;\n parameters?: Parameter[];\n statusDetails?: StatusDetails;\n };\n};\n\nexport type CypressMessage =\n | Exclude<RuntimeMessage, RuntimeStartStepMessage | RuntimeStopStepMessage>\n | CupressRunStart\n | CypressSuiteStartMessage\n | CypressSuiteEndMessage\n | CypressHookStartMessage\n | CypressHookEndMessage\n | CypressTestStartMessage\n | CypressStepStartMessage\n | CypressStepStopMessage\n | CypressStepFinalizeMessage\n | CypressTestPassMessage\n | CypressFailMessage\n | CypressTestSkipMessage\n | CypressSkippedTestMessage\n | CypressTestEndMessage;\n\nexport type SpecContext = {\n specPath: string;\n test: string | undefined;\n fixture: string | undefined;\n stepsByFrontEndId: Map<string, string>;\n videoScope: string;\n suiteIdToScope: Map<string, string>;\n suiteScopeToId: Map<string, string>;\n suiteScopes: string[];\n testScope: string | undefined;\n suiteNames: string[];\n failed: boolean;\n};\n\ntype StepDescriptorBase = {\n id: string;\n error?: Error;\n};\n\nexport type LogStepDescriptor = StepDescriptorBase & {\n type: \"log\";\n attachmentName?: string;\n log: CypressLogEntry;\n};\n\nexport type ApiStepDescriptor = StepDescriptorBase & {\n type: \"api\";\n};\n\nexport type StepDescriptor = LogStepDescriptor | ApiStepDescriptor;\n\nexport type StepFinalizer = (message: CypressStepFinalizeMessage[\"data\"]) => void;\n\nexport type AllureSpecState = {\n config: {\n stepsFromCommands: {\n maxArgumentLength: number;\n maxArgumentDepth: number;\n };\n };\n initialized: boolean;\n testPlan: TestPlanV1 | null | undefined;\n projectDir?: string;\n projectName?: string;\n messages: CypressMessage[];\n currentTest?: CypressTest;\n stepStack: StepDescriptor[];\n stepsToFinalize: [step: StepDescriptor, finalizer: StepFinalizer | undefined][];\n nextApiStepId: number;\n};\n\nexport type AllureCypressTaskArgs = {\n absolutePath: string;\n messages: readonly CypressMessage[];\n isInteractive: boolean;\n};\n\nexport type CypressSuiteFunction = (\n title: string,\n configOrFn?: Cypress.SuiteConfigOverrides | ((this: Mocha.Suite) => void),\n fn?: (this: Mocha.Suite) => void,\n) => Mocha.Suite;\n\nexport type DirectHookImplementation = Mocha.AsyncFunc | ((this: Mocha.Context) => void);\nexport type HookImplementation = Mocha.Func | DirectHookImplementation;\n"],"mappings":"","ignoreList":[]}
@@ -9,6 +9,7 @@ export var getAllureState = () => {
9
9
  testPlan: undefined,
10
10
  currentTest: undefined,
11
11
  projectDir: undefined,
12
+ projectName: undefined,
12
13
  stepStack: [],
13
14
  stepsToFinalize: [],
14
15
  nextApiStepId: 0
@@ -30,6 +31,7 @@ export var enqueueRuntimeMessage = message => {
30
31
  };
31
32
  export var getAllureTestPlan = () => getAllureState().testPlan;
32
33
  export var getProjectDir = () => getAllureState().projectDir;
34
+ export var getProjectName = () => getAllureState().projectName;
33
35
  export var getCurrentTest = () => getAllureState().currentTest;
34
36
  export var setCurrentTest = test => {
35
37
  getAllureState().currentTest = test;
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","names":["DEFAULT_RUNTIME_CONFIG","last","toReversed","getAllureState","state","Cypress","env","config","initialized","messages","testPlan","undefined","currentTest","projectDir","stepStack","stepsToFinalize","nextApiStepId","isAllureInitialized","setAllureInitialized","getRuntimeMessages","setRuntimeMessages","value","enqueueRuntimeMessage","message","push","getAllureTestPlan","getProjectDir","getCurrentTest","setCurrentTest","test","dropCurrentTest","getConfig","getStepStack","getCurrentStep","pushStep","step","popStep","pop","popSteps","index","splice","popAllSteps","clearStepStack","setupStepFinalization","finalizer","getStepsToFinalize","clearStepsToFinalize"],"sources":["../../../src/browser/state.ts"],"sourcesContent":["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"],"mappings":"AACA,SAASA,sBAAsB,EAAEC,IAAI,EAAEC,UAAU,QAAQ,aAAa;AAEtE,OAAO,IAAMC,cAAc,GAAGA,CAAA,KAAM;EAClC,IAAIC,KAAK,GAAGC,OAAO,CAACC,GAAG,CAAC,QAAQ,CAAoB;EAEpD,IAAI,CAACF,KAAK,EAAE;IACVA,KAAK,GAAG;MACNG,MAAM,EAAEP,sBAAsB;MAC9BQ,WAAW,EAAE,KAAK;MAClBC,QAAQ,EAAE,EAAE;MACZC,QAAQ,EAAEC,SAAS;MACnBC,WAAW,EAAED,SAAS;MACtBE,UAAU,EAAEF,SAAS;MACrBG,SAAS,EAAE,EAAE;MACbC,eAAe,EAAE,EAAE;MACnBC,aAAa,EAAE;IACjB,CAAC;IAEDX,OAAO,CAACC,GAAG,CAAC,QAAQ,EAAEF,KAAK,CAAC;EAC9B;EAEA,OAAOA,KAAK;AACd,CAAC;AAED,OAAO,IAAMa,mBAAmB,GAAGA,CAAA,KAAMd,cAAc,CAAC,CAAC,CAACK,WAAW;AAErE,OAAO,IAAMU,oBAAoB,GAAGA,CAAA,KAAM;EACxCf,cAAc,CAAC,CAAC,CAACK,WAAW,GAAG,IAAI;AACrC,CAAC;AAED,OAAO,IAAMW,kBAAkB,GAAGA,CAAA,KAAMhB,cAAc,CAAC,CAAC,CAACM,QAAQ;AAEjE,OAAO,IAAMW,kBAAkB,GAAIC,KAAuB,IAAK;EAC7DlB,cAAc,CAAC,CAAC,CAACM,QAAQ,GAAGY,KAAK;AACnC,CAAC;AA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KAAM;EAClCvC,cAAc,CAAC,CAAC,CAACW,SAAS,GAAG,EAAE;AACjC,CAAC;AAED,OAAO,IAAM6B,qBAAqB,GAAGA,CAA2BR,IAAO,EAAES,SAAyB,KAChGzC,cAAc,CAAC,CAAC,CAACY,eAAe,CAACS,IAAI,CAAC,CAACW,IAAI,EAAES,SAAS,CAAC,CAAC;AAE1D,OAAO,IAAMC,kBAAkB,GAAGA,CAAA,KAAM1C,cAAc,CAAC,CAAC,CAACY,eAAe;AAExE,OAAO,IAAM+B,oBAAoB,GAAGA,CAAA,KAAM;EACxC,IAAM1C,KAAK,GAAGD,cAAc,CAAC,CAAC;EAC9BC,KAAK,CAACW,eAAe,GAAG,EAAE;AAC5B,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"state.js","names":["DEFAULT_RUNTIME_CONFIG","last","toReversed","getAllureState","state","Cypress","env","config","initialized","messages","testPlan","undefined","currentTest","projectDir","projectName","stepStack","stepsToFinalize","nextApiStepId","isAllureInitialized","setAllureInitialized","getRuntimeMessages","setRuntimeMessages","value","enqueueRuntimeMessage","message","push","getAllureTestPlan","getProjectDir","getProjectName","getCurrentTest","setCurrentTest","test","dropCurrentTest","getConfig","getStepStack","getCurrentStep","pushStep","step","popStep","pop","popSteps","index","splice","popAllSteps","clearStepStack","setupStepFinalization","finalizer","getStepsToFinalize","clearStepsToFinalize"],"sources":["../../../src/browser/state.ts"],"sourcesContent":["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 projectName: 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 getProjectName = () => getAllureState().projectName;\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"],"mappings":"AACA,SAASA,sBAAsB,EAAEC,IAAI,EAAEC,UAAU,QAAQ,aAAa;AAEtE,OAAO,IAAMC,cAAc,GAAGA,CAAA,KAAM;EAClC,IAAIC,KAAK,GAAGC,OAAO,CAACC,GAAG,CAAC,QAAQ,CAAoB;EAEpD,IAAI,CAACF,KAAK,EAAE;IACVA,KAAK,GAAG;MACNG,MAAM,EAAEP,sBAAsB;MAC9BQ,WAAW,EAAE,KAAK;MAClBC,QAAQ,EAAE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
  import { LabelName } from "allure-js-commons";
2
- import { getAllureTestPlan } from "./state.js";
2
+ import { getAllureTestPlan, getProjectName } from "./state.js";
3
3
  import { getTestMetadata, resolveSpecRelativePath } from "./utils.js";
4
4
  export var applyTestPlan = (spec, root) => {
5
5
  var testPlan = getAllureTestPlan();
@@ -25,13 +25,15 @@ var iterateSuites = function* iterateSuites(parent) {
25
25
  };
26
26
  var getIndicesOfDeselectedTests = (testPlan, spec, specPath, tests) => {
27
27
  var indicesToRemove = [];
28
+ var projectName = getProjectName();
29
+ var fullNameBase = projectName ? "".concat(projectName, ":").concat(specPath) : specPath;
28
30
  tests.forEach((test, index) => {
29
31
  var _labels$find;
30
32
  var {
31
33
  fullNameSuffix,
32
34
  labels
33
35
  } = getTestMetadata(test);
34
- var fullName = "".concat(specPath, "#").concat(fullNameSuffix);
36
+ var fullName = "".concat(fullNameBase, "#").concat(fullNameSuffix);
35
37
  var allureId = (_labels$find = labels.find(_ref => {
36
38
  var {
37
39
  name
@@ -1 +1 @@
1
- {"version":3,"file":"testplan.js","names":["LabelName","getAllureTestPlan","getTestMetadata","resolveSpecRelativePath","applyTestPlan","spec","root","testPlan","specPath","suite","iterateSuites","indicesToRemove","getIndicesOfDeselectedTests","tests","removeSortedIndices","parent","suiteStack","s","pop","i","suites","length","push","forEach","test","index","_labels$find","fullNameSuffix","labels","fullName","concat","allureId","find","_ref","name","ALLURE_ID","value","includedInTestPlan","arr","indices","splice","some","_test$id","id","toString","selector"],"sources":["../../../src/browser/testplan.ts"],"sourcesContent":["import { LabelName } from \"allure-js-commons\";\nimport type { TestPlanV1 } from \"allure-js-commons/sdk\";\n\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"],"mappings":"AAAA,SAASA,SAAS,QAAQ,mBAAmB;AAI7C,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,eAAe,EAAEC,uBAAuB,QAAQ,YAAY;AAErE,OAAO,IAAMC,aAAa,GAAGA,CAACC,IAAkB,EAAEC,IAAkB,KAAK;EACvE,IAAMC,QAAQ,GAAGN,iBAAiB,CAAC,CAAC;EACpC,IAAIM,QAAQ,EAAE;IACZ,IAAMC,QAAQ,GAAGL,uBAAuB,CAACE,IAAI,CAAC;IAC9C,KAAK,IAAMI,KAAK,IAAIC,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BAAvDA,YAAA,CAAyDU,KAAK;IAE/E,IAAI,CAACC,kBAAkB,CAAC9B,QAAQ,EAAEsB,QAAQ,EAAEE,QAAQ,CAAC,EAAE;MACrDpB,eAAe,CAACW,IAAI,CAACG,KAAK,CAAC;IAC7B;EACF,CAAC,CAAC;EACF,OAAOd,eAAe;AACxB,CAAC;AAED,IAAMG,mBAAmB,GAAGA,CAAIwB,GAAQ,EAAEC,OAA0B,KAAK;EACvE,KAAK,IAAIpB,CAAC,GAAGoB,OAAO,CAAClB,MAAM,GAAG,CAAC,EAAEF,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC5CmB,GAAG,CAACE,MAAM,CAACD,OAAO,CAACpB,CAAC,CAAC,EAAE,CAAC,CAAC;EAC3B;AACF,CAAC;AAED,IAAMkB,kBAAkB,GAAGA,CAAC9B,QAAoB,EAAEsB,QAAgB,EAAEE,QAA4B,KAC9FxB,QAAQ,CAACM,KAAK,CAAC4B,IAAI,CAAEjB,IAAI;EAAA,IAAAkB,QAAA;EAAA,OAAMX,QAAQ,IAAI,EAAAW,QAAA,GAAAlB,IAAI,CAACmB,EAAE,cAAAD,QAAA,uBAAPA,QAAA,CAASE,QAAQ,CAAC,CAAC,MAAKb,QAAQ,IAAKP,IAAI,CAACqB,QAAQ,KAAKhB,QAAQ;AAAA,EAAC","ignoreList":[]}
1
+ {"version":3,"file":"testplan.js","names":["LabelName","getAllureTestPlan","getProjectName","getTestMetadata","resolveSpecRelativePath","applyTestPlan","spec","root","testPlan","specPath","suite","iterateSuites","indicesToRemove","getIndicesOfDeselectedTests","tests","removeSortedIndices","parent","suiteStack","s","pop","i","suites","length","push","projectName","fullNameBase","concat","forEach","test","index","_labels$find","fullNameSuffix","labels","fullName","allureId","find","_ref","name","ALLURE_ID","value","includedInTestPlan","arr","indices","splice","some","_test$id","id","toString","selector"],"sources":["../../../src/browser/testplan.ts"],"sourcesContent":["import { LabelName } from \"allure-js-commons\";\nimport type { TestPlanV1 } from \"allure-js-commons/sdk\";\n\nimport type { CypressSuite, CypressTest } from \"../types.js\";\nimport { getAllureTestPlan, getProjectName } 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 const projectName = getProjectName();\n const fullNameBase = projectName ? `${projectName}:${specPath}` : specPath;\n tests.forEach((test, index) => {\n const { fullNameSuffix, labels } = getTestMetadata(test);\n const fullName = `${fullNameBase}#${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"],"mappings":"AAAA,SAASA,SAAS,QAAQ,mBAAmB;AAI7C,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QAAQ,IAAKN,IAAI,CAACoB,QAAQ,KAAKf,QAAQ;AAAA,EAAC","ignoreList":[]}
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var K=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var l=(function(t){return t.FAILED="failed",t.BROKEN="broken",t.PASSED="passed",t.SKIPPED="skipped",t})({}),je=[l.FAILED,l.BROKEN,l.PASSED,l.SKIPPED],Ne=(function(t){return t.SCHEDULED="scheduled",t.RUNNING="running",t.FINISHED="finished",t.PENDING="pending",t.INTERRUPTED="interrupted",t})({}),m=(function(t){return t.ALLURE_ID="ALLURE_ID",t.AS_ID="ALLURE_ID",t.SUITE="suite",t.PARENT_SUITE="parentSuite",t.SUB_SUITE="subSuite",t.EPIC="epic",t.FEATURE="feature",t.STORY="story",t.SEVERITY="severity",t.TAG="tag",t.OWNER="owner",t.LEAD="lead",t.HOST="host",t.THREAD="thread",t.TEST_METHOD="testMethod",t.TEST_CLASS="testClass",t.PACKAGE="package",t.FRAMEWORK="framework",t.LANGUAGE="language",t.LAYER="layer",t})({}),He=(function(t){return t.BLOCKER="blocker",t.CRITICAL="critical",t.NORMAL="normal",t.MINOR="minor",t.TRIVIAL="trivial",t})({}),R=(function(t){return t.TEXT="text/plain",t.XML="application/xml",t.HTML="text/html",t.CSV="text/csv",t.TSV="text/tab-separated-values",t.CSS="text/css",t.URI="text/uri-list",t.SVG="image/svg+xml",t.PNG="image/png",t.JSON="application/json",t.ZIP="application/zip",t.WEBM="video/webm",t.JPEG="image/jpeg",t.MP4="video/mp4",t.IMAGEDIFF="application/vnd.allure.image.diff",t.PLAYWRIGHT_TRACE="application/vnd.allure.playwright-trace",t})({}),F=(function(t){return t.DEFAULT="link",t.ISSUE="issue",t.TMS="tms",t})({});function $(){$=function(o,a){return new r(o,void 0,a)};var t=RegExp.prototype,e=new WeakMap;function r(s,o,a){var u=RegExp(s,o);return e.set(u,a||e.get(s)),O(u,r.prototype)}function n(s,o){var a=e.get(o);return Object.keys(a).reduce(function(u,p){var y=a[p];if(typeof y=="number")u[p]=s[y];else{for(var S=0;s[y[S]]===void 0&&S+1<y.length;)S++;u[p]=s[y[S]]}return u},Object.create(null))}return Ue(r,RegExp),r.prototype.exec=function(s){var o=t.exec.call(this,s);if(o){o.groups=n(o,this);var a=o.indices;a&&(a.groups=n(a,this))}return o},r.prototype[Symbol.replace]=function(s,o){if(typeof o=="string"){var a=e.get(this);return t[Symbol.replace].call(this,s,o.replace(/\$<([^>]+)(>|$)/g,function(p,y,S){if(S==="")return p;var x=a[y];return Array.isArray(x)?"$"+x.join("$"):typeof x=="number"?"$"+x:""}))}if(typeof o=="function"){var u=this;return t[Symbol.replace].call(this,s,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(n(p,u)),o.apply(this,p)})}return t[Symbol.replace].call(this,s,o)},$.apply(this,arguments)}function Ue(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},O(t,e)}function Et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function q(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Et(Object(r),!0).forEach(function(n){Ge(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Et(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ge(t,e,r){return(e=Be(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Be(t){var e=ze(t,"string");return typeof e=="symbol"?e:e+""}function ze(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var v=t=>{switch(!0){case/assert/gi.test(t.constructor.name):case/expectation/gi.test(t.constructor.name):case(t.name&&/assert/gi.test(t.name)):case(t.message&&/assert/gi.test(t.message)):case(t.stack&&/@vitest\/expect/gi.test(t.stack)):case(t.stack&&/playwright\/lib\/matchers\/expect\.js/gi.test(t.stack)):case(t.stack&&/codeceptjs-expect/gi.test(t.stack)):case"matcherResult"in t:case("inspect"in t&&typeof t.inspect=="function"):case"actual"in t:case"expected"in t:return l.FAILED;default:return l.BROKEN}},We=function(){var{onlyFirst:e=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")},Y=t=>{var e=We();return t.replace(e,"")},Ke=t=>{if(!t||typeof t!="object")return{};if("matcherResult"in t&&t.matcherResult!==void 0&&typeof t.matcherResult=="object")return{actual:E(t.matcherResult.actual),expected:E(t.matcherResult.expected)};var e="actual"in t&&t.actual!==void 0?{actual:E(t.actual)}:{},r="expected"in t&&t.expected!==void 0?{expected:E(t.expected)}:{};return q(q({},e),r)},g=t=>{var{message:e,stack:r}=t;return q({message:e?Y(e):void 0,trace:r?Y(r):void 0},Ke(t))};var $e=$(/(?:^|\s)@?allure\.([^:=\s]+)[:=]("[^"]+"|'[^']+'|`[^`]+`|\S+)/,{type:1}),At=new RegExp($e,"g");var qe=t=>t?.[1],Ye=t=>{var e,r=/['"`]/,n=new RegExp("^".concat(r.source)),s=new RegExp("".concat(r.source,"$")),o=(e=t?.[2])!==null&&e!==void 0?e:"";return n.test(o)&&s.test(o)?o.slice(1,-1):o};var V=t=>{var e=[],r=[],n=t.matchAll(At),s=t.replaceAll(At,"").split(" ").filter(Boolean).reduce((x,W)=>/^[\n\r]/.test(W)?x+W:"".concat(x," ").concat(W),"").trim();for(var o of n){var a=o,u=qe(a),p=Ye(a);if(!(!u||!p)){var[y,S]=u.split(".");switch(y){case"id":e.push({name:m.ALLURE_ID,value:p});break;case"label":e.push({name:S,value:p});break;case"link":r.push({type:S,url:p});break}}}return{labels:e,links:r,cleanTitle:s}};var b=t=>!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function",E=function(e){var{maxDepth:r=0,maxLength:n=0,replacer:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Qe(typeof e=="object"?JSON.stringify(e,Ve(r,s)):String(e),n)},Ve=(t,e)=>{var r=[],n=function(o,a){if(typeof a!="object"||a===null)return a;for(;r.length>0&&!Object.is(r.at(-1),this);)r.pop();if(!(t&&r.length>=t||r.includes(a)))return r.push(a),a instanceof Map?Ze(r,a):a instanceof Set?Xe(r,a):a};return e?Je(e,n):n},Je=(t,e)=>function(r,n){return e.call(this,r,t.call(this,r,n))},Ze=(t,e)=>Array.from(e).filter(r=>{var[n]=r;return!t.includes(n)}).map(r=>{var[n,s]=r;return[n,t.includes(s)?void 0:s]}),Xe=(t,e)=>Array.from(e).map(r=>t.includes(r)?void 0:r),Qe=(t,e)=>e&&t.length>e?"".concat(t.substring(0,e),"..."):t;function _t(t,e,r,n,s,o,a){try{var u=t[o](a),p=u.value}catch(y){return void r(y)}u.done?e(p):Promise.resolve(p).then(n,s)}function d(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var o=t.apply(e,r);function a(p){_t(o,n,s,a,u,"next",p)}function u(p){_t(o,n,s,a,u,"throw",p)}a(void 0)})}}function tr(t,e,r){return(e=er(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function er(t){var e=rr(t,"string");return typeof e=="symbol"?e:e+""}function rr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var nr="no test runtime is found. Please check test framework configuration",sr="no sync test runtime is found. Please check test framework configuration and adapter sync support",J="allure-js-commons/sync step body must be synchronous and must not return a Promise",Z=class{attachment(e,r,n){this.warning()}attachmentFromPath(e,r,n){this.warning()}globalAttachment(e,r,n){this.warning()}globalAttachmentFromPath(e,r,n){this.warning()}globalError(e){this.warning()}description(e){this.warning()}descriptionHtml(e){this.warning()}displayName(e){this.warning()}historyId(e){this.warning()}labels(){this.warning()}links(){this.warning()}parameter(e,r,n){this.warning()}logStep(e,r,n){this.warning()}step(e,r){this.warning();var n=r();if(b(n)){var s=new Error(J);throw this.warnAboutPromiseStep(),s}return n}stepDisplayName(e){this.warning()}stepParameter(e,r,n){this.warning()}testCaseId(e){this.warning()}warning(){console.warn(sr)}warnAboutPromiseStep(){console.warn(J)}},Q=new Z,X=class{constructor(){tr(this,"sync",Q)}attachment(){var e=this;return d(function*(){yield e.warning()})()}attachmentFromPath(){var e=this;return d(function*(){yield e.warning()})()}globalAttachment(){var e=this;return d(function*(){yield e.warning()})()}globalAttachmentFromPath(){var e=this;return d(function*(){yield e.warning()})()}globalError(){var e=this;return d(function*(){yield e.warning()})()}description(){var e=this;return d(function*(){yield e.warning()})()}descriptionHtml(){var e=this;return d(function*(){yield e.warning()})()}displayName(){var e=this;return d(function*(){yield e.warning()})()}historyId(){var e=this;return d(function*(){yield e.warning()})()}labels(){var e=this;return d(function*(){yield e.warning()})()}links(){var e=this;return d(function*(){yield e.warning()})()}parameter(){var e=this;return d(function*(){yield e.warning()})()}logStep(){var e=this;return d(function*(){yield e.warning()})()}step(e,r){var n=this;return d(function*(){return yield n.warning(),r()})()}stepDisplayName(){var e=this;return d(function*(){yield e.warning()})()}stepParameter(){var e=this;return d(function*(){yield e.warning()})()}testCaseId(){var e=this;return d(function*(){yield e.warning()})()}warning(){return d(function*(){console.log(nr)})()}},_=new X;function or(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i,function(r,n,s,o,a){return n?e?".jsx":".js":!s||o&&a?s+o+"."+a.toLowerCase()+"js":r}):t}var Ct="allureTestRuntime",ar="allure-playwright/autoconfig",ir=()=>{var t,e,r,n=globalThis.process;return(t=n==null||(e=n.getBuiltinModule)===null||e===void 0||(e=e.call(n,"node:module"))===null||e===void 0?void 0:e.createRequire)!==null&&t!==void 0?t:n==null||(r=n.getBuiltinModule)===null||r===void 0||(r=r.call(n,"module"))===null||r===void 0?void 0:r.createRequire},pr=()=>{var t,e=globalThis.process,r=e==null||(t=e.cwd)===null||t===void 0?void 0:t.call(e),n=ir();return r&&n?n("".concat(r,"/package.json")):void 0},Qn=typeof K=="function"?K:pr(),et=t=>{globalThis[Ct]=()=>t},tt=()=>globalThis?.[Ct],rt=()=>{var t=tt();if(t){var e;return(e=t())!==null&&e!==void 0?e:_}return _};var nt=()=>{var t=tt();if(t){var e;return(e=t())!==null&&e!==void 0?e:_}return import(or(ar)).then(()=>{var r,n;return(r=(n=tt())===null||n===void 0?void 0:n())!==null&&r!==void 0?r:_}).catch(()=>_)};var c=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];var o=nt();return b(o)?o.then(a=>a[e](...n)):o[e](...n)},h=(t,e)=>c("labels",{name:t,value:e}),ur=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c("labels",...r)},st=(t,e,r)=>c("links",{url:t,type:r,name:e}),cr=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c("links",...r)},lr=(t,e,r)=>c("parameter",t,e,r),mr=t=>c("description",t),dr=t=>c("descriptionHtml",t),fr=t=>c("displayName",t),gr=t=>c("historyId",t),yr=t=>c("testCaseId",t),hr=(t,e,r)=>{var n=typeof r=="string"?{contentType:r}:r;return c("attachment",t,e,n)},Sr=(t,e,r)=>{var n=typeof r=="string"?{contentType:r}:r;return c("globalAttachment",t,e,n)},vr=(t,e,r)=>{var n=typeof r=="string"?{contentType:r}:r;return c("globalAttachmentFromPath",t,e,n)},br=t=>c("globalError",t),xr=(t,e)=>c("attachmentFromPath",t,e,{contentType:R.PLAYWRIGHT_TRACE}),Tr=(t,e,r)=>{var n=typeof r=="string"?{contentType:r}:r;return c("attachmentFromPath",t,e,n)},Er=()=>({displayName:t=>c("stepDisplayName",t),parameter:(t,e,r)=>c("stepParameter",t,e,r)}),Ar=(t,e,r)=>c("logStep",t,e,r),_r=(t,e)=>c("step",t,()=>e(Er())),Cr=(t,e)=>st(t,e,F.ISSUE),Pr=(t,e)=>st(t,e,F.TMS),wr=t=>h(m.ALLURE_ID,t),Rr=t=>h(m.EPIC,t),Dr=t=>h(m.FEATURE,t),kr=t=>h(m.STORY,t),Mr=t=>h(m.SUITE,t),Ir=t=>h(m.PARENT_SUITE,t),Fr=t=>h(m.SUB_SUITE,t),Or=t=>h(m.OWNER,t),Lr=t=>h(m.SEVERITY,t),jr=t=>h(m.LAYER,t),Nr=t=>h(m.TAG,t),Hr=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c("labels",...r.map(s=>({name:m.TAG,value:s})))};var Pt={stepsFromCommands:{maxArgumentLength:128,maxArgumentDepth:3}},wt=(t,e)=>{let r=t.findLastIndex(e);return r!==-1?ot(t.splice(r)):[]},ot=t=>{let e=t.length,r=new Array(e);for(let n=0;n<e;n++)r[e-n-1]=t[n];return r},Rt=t=>t[t.length-1],Dt=t=>typeof t<"u";var f=()=>{let t=Cypress.env("allure");return t||(t={config:Pt,initialized:!1,messages:[],testPlan:void 0,currentTest:void 0,projectDir:void 0,stepStack:[],stepsToFinalize:[],nextApiStepId:0},Cypress.env("allure",t)),t},kt=()=>f().initialized,Mt=()=>{f().initialized=!0},at=()=>f().messages,It=t=>{f().messages=t},i=t=>{at().push(t)},Ft=()=>f().testPlan,Ot=()=>f().projectDir,Lt=()=>f().currentTest,jt=t=>{f().currentTest=t},Nt=()=>{f().currentTest=void 0},Ht=()=>f().config,T=()=>f().stepStack,Ut=()=>Rt(T()),L=t=>T().push(t);var Gr=t=>ot(T().splice(t)),Gt=()=>Gr(0);var j=(t,e)=>f().stepsToFinalize.push([t,e]),Bt=()=>f().stepsToFinalize,zt=()=>{let t=f();t.stepsToFinalize=[]};var Wt=(t,e)=>{let r=Ft();if(r){let n=Kt(t);for(let s of Br(e)){let o=zr(r,t,n,s.tests);Wr(s.tests,o)}}},Br=function*(t){let e=[];for(let r=t;r;r=e.pop()){yield r;for(let n=r.suites.length-1;n>=0;n--)e.push(r.suites[n])}},zr=(t,e,r,n)=>{let s=[];return n.forEach((o,a)=>{let{fullNameSuffix:u,labels:p}=it(o),y=`${r}#${u}`,S=p.find(({name:x})=>x===m.ALLURE_ID)?.value;Kr(t,y,S)||s.push(a)}),s},Wr=(t,e)=>{for(let r=e.length-1;r>=0;r--)t.splice(e[r],1)},Kr=(t,e,r)=>t.tests.some(n=>r&&n.id?.toString()===r||n.selector===e);var N="__allure_report_system_hook__",$t=()=>{Cypress.mocha.getRunner().on("start",$r).on("suite",qr).on("suite end",Xt).on("hook",Yr).on("hook end",Vr).on("test",Jr).on("pass",Qt).on("fail",Zr).on("pending",te).on("test end",mt)},qt=()=>{afterEach(N,dt),after(N,Xr)},$r=()=>{Vt(),Jt()},qr=t=>{t.root&&Wt(Cypress.spec,t),Zt(t)},Yr=t=>{C(t)||pt(t)},Vr=t=>{C(t)||H(t)},Jr=t=>{D(t)||ut(t)},Zr=(t,e)=>{let r="hookName"in t;if(r&&Yt(t))return;r&&C(t)&&pt(t,Date.now()-(t.duration??0)),ct(e),r&&lt(t,e)},Xr=function(){dt(),P(this)};var ee=Cypress.platform==="win32",re=t=>t.substring(t.lastIndexOf(ee?"\\":"/")+1),Kt=t=>{let e=Ot(),r=e?t.absolute.substring(e.length+1):t.relative;return ee?r.replaceAll("\\","/"):r},ne=t=>Array.isArray(t)||t.buffer?btoa(String.fromCharCode.apply(null,t)):t,ft=t=>({...it(t),start:typeof t.wallClockStartedAt=="string"?Date.parse(t.wallClockStartedAt):t.wallClockStartedAt?.getTime?.()||Date.now()}),se=t=>({duration:t.duration??0,retries:t._retries??0}),gt=()=>({statusDetails:{message:"This is a pending test"}}),oe=(t,e,r)=>{let n={id:t.id,stop:Date.now(),status:e??de(t)};return r&&(n.statusDetails=r),n},ae=Symbol("The test has been reported to Allure"),yt=t=>{t[ae]=!0},D=t=>t[ae]===!0,Qr=function*(t){let e=[];for(let r=t;r;r=e.pop()){yield r;for(let n=r.suites.length-1;n>=0;n--)e.push(r.suites[n])}},ie=function*(t){for(let e of Qr(t))yield*e.tests},pe=t=>{let e=[];for(let r=t.parent;r;r=r.parent)e.push(r);return e.reverse(),e};var ue=()=>(f().nextApiStepId++).toString(),it=t=>{let e=t.title,{cleanTitle:r,labels:n,links:s}=V(e),a=`${[...t.titlePath().slice(0,-1),r].join(" ")}`;return{name:r,labels:n,links:s,fullNameSuffix:a}},C=t=>t.title.includes(N),Yt=t=>t.parent.root&&t.hookName==="after all",ce=t=>{let e=t.test;return t.test.parent.hooks.findLast(o=>o.hookName==="after all")?.hookId===e.hookId},le=(t,e,r,n)=>{let s=e?l.SKIPPED:v(r),{message:o,trace:a}=g(r);return{status:s,statusDetails:{message:e?tn(t,n):o,trace:a}}},tn=(t,e)=>{let r=e.title?`'${e.title}'`:"root";return`'${t}' defined in the ${r} suite has failed`},k=t=>typeof t.attributes.consoleProps=="function"?t.attributes.consoleProps():t.attributes.consoleProps,me=t=>typeof t?.attributes?.renderProps=="function"?t.attributes.renderProps():t.attributes?.renderProps;var M={},fe=t=>t.type==="api",I=t=>t.type==="log",w=t=>B(en(),t),en=()=>{let t=ue();return L({id:t,type:"api"}),t},ge=t=>{let e=v(t),r=g(t);nn(e,r),he(t)},A=(t,e)=>U(r=>fe(r),t,e),U=(t,e,r)=>ye(wt(T(),t),e,r),G=(t,e)=>ye(Gt(),t,e),ht=()=>{G(),Bt().forEach(rn),zt()},de=t=>t.error?v(t.error):l.PASSED,rn=([t,e])=>{let{id:r,error:n}=t,s={id:r};n&&(s.statusDetails=g(n)),e?.(s),i({type:"cypress_step_finalize",data:s})},nn=(t,e)=>{let r=T(),n=r.at(r.findLastIndex(I)+1);n&&U(s=>Object.is(s,n),t,e)},sn=(t,e)=>{if(I(t)){let r=t.log.attributes.error;if(r)return t.error=r}return e&&(t.error=e),t.error},ye=(t,e,r)=>{let n;for(let s of t)n=sn(s,n),on(s,e,r);n&&he(n)},he=t=>T().forEach(e=>e.error=t),on=(t,e,r)=>{Se(t,e,r),fe(t)&&t.error&&j(t)};var ve="allure-js-commons/sync step body must be synchronous and must not return a Promise",Vt=()=>et(new St),vt=()=>rt(),St=class{constructor(){this.#r()}get sync(){return this.#i()}labels(...e){return this.#t({type:"metadata",data:{labels:e}})}links(...e){return this.#t({type:"metadata",data:{links:e}})}parameter(e,r,n){return this.#t({type:"metadata",data:{parameters:[{name:e,value:r,...n}]}})}description(e){return this.#t({type:"metadata",data:{description:e}})}descriptionHtml(e){return this.#t({type:"metadata",data:{descriptionHtml:e}})}displayName(e){return this.#t({type:"metadata",data:{displayName:e}})}historyId(e){return this.#t({type:"metadata",data:{historyId:e}})}testCaseId(e){return this.#t({type:"metadata",data:{testCaseId:e}})}attachment(e,r,n){let[s,o]=this.#e(r);return this.#t({type:"attachment_content",data:{name:e,content:s,encoding:o,contentType:n.contentType,fileExtension:n.fileExtension}})}attachmentFromPath(e,r,n){return this.#t({type:"attachment_path",data:{name:e,path:r,contentType:n.contentType,fileExtension:n.fileExtension}})}globalAttachment(e,r,n){let[s,o]=this.#e(r);return this.#t({type:"global_attachment_content",data:{name:e,content:s,encoding:o,contentType:n.contentType,fileExtension:n.fileExtension}})}globalAttachmentFromPath(e,r,n){return this.#t({type:"global_attachment_path",data:{name:e,path:r,contentType:n.contentType,fileExtension:n.fileExtension}})}globalError(e){return this.#t({type:"global_error",data:e})}logStep(e,r=l.PASSED,n){return this.#a()?(w(e),A(r,n?g(n):void 0),Cypress.Promise.resolve()):cy.wrap(M,{log:!1}).then(()=>(w(e),Cypress.Promise.resolve())).then(()=>(A(r,n?g(n):void 0),Cypress.Promise.resolve()))}step(e,r){return cy.wrap(M,{log:!1}).then(()=>(w(e),Cypress.Promise.resolve(r()))).then(n=>(A(),n))}stepDisplayName(e){return this.#t({type:"step_metadata",data:{name:e}})}stepParameter(e,r,n){return this.#t({type:"step_metadata",data:{parameters:[{name:e,value:r,mode:n}]}})}flushAllureMessagesToTask(e){let r=this.#n();r.length&&cy.task(e,{absolutePath:Cypress.spec.absolute,messages:r},{log:!1})}flushAllureMessagesToTaskAsync(e){let r=this.#n();if(r.length){let n={absolutePath:Cypress.spec.absolute,messages:r,isInteractive:Cypress.config("isInteractive")};return cy.task(e,n,{log:!1})}}#r(){It([])}#t(e){return i(e),Cypress.Promise.resolve()}#n(){let e=at();return this.#r(),e}#e(e){let r=this.#s(e),n=typeof r=="string"?"utf8":"base64";return[ne(r),n]}#s(e){return e instanceof Uint8Array||typeof e=="string"?e:this.#o(e)?new Uint8Array(e.data):e}#o(e){if(!e||typeof e!="object")return!1;let r=e;return r.type==="Buffer"&&Array.isArray(r.data)}#a(){try{let e=!!window.cypressOriginContext,r=!!window.cypressOriginWindow;if(e||r)return!0;let n=Cypress.config("baseUrl"),s=window.location.origin;if(n&&s!==n)return!0;let o=window.Cypress;if(o&&o.state&&o.state("origin"))return!0;try{let a=typeof cy<"u",u=typeof cy.task<"u";if(!a||!u)return!0}catch{return!0}return!1}catch{return!0}}#i(){return{labels:(...e)=>i({type:"metadata",data:{labels:e}}),links:(...e)=>i({type:"metadata",data:{links:e}}),parameter:(e,r,n)=>i({type:"metadata",data:{parameters:[{name:e,value:r,...n}]}}),description:e=>i({type:"metadata",data:{description:e}}),descriptionHtml:e=>i({type:"metadata",data:{descriptionHtml:e}}),displayName:e=>i({type:"metadata",data:{displayName:e}}),historyId:e=>i({type:"metadata",data:{historyId:e}}),testCaseId:e=>i({type:"metadata",data:{testCaseId:e}}),attachment:(e,r,n)=>{let[s,o]=this.#e(r);i({type:"attachment_content",data:{name:e,content:s,encoding:o,contentType:n.contentType,fileExtension:n.fileExtension}})},attachmentFromPath:(e,r,n)=>i({type:"attachment_path",data:{name:e,path:r,contentType:n.contentType,fileExtension:n.fileExtension}}),globalAttachment:(e,r,n)=>{let[s,o]=this.#e(r);i({type:"global_attachment_content",data:{name:e,content:s,encoding:o,contentType:n.contentType,fileExtension:n.fileExtension}})},globalAttachmentFromPath:(e,r,n)=>i({type:"global_attachment_path",data:{name:e,path:r,contentType:n.contentType,fileExtension:n.fileExtension}}),globalError:e=>i({type:"global_error",data:e}),logStep:(e,r=l.PASSED,n)=>{w(e),A(r,n?g(n):void 0)},step:(e,r)=>{w(e);try{let n=r();if(b(n))throw console.warn(ve),new Error(ve);return A(),n}catch(n){let s=n;throw A(v(s),g(s)),n}},stepDisplayName:e=>i({type:"step_metadata",data:{name:e}}),stepParameter:(e,r,n)=>i({type:"step_metadata",data:{parameters:[{name:e,value:r,mode:n}]}})}}};var Jt=()=>{i({type:"cypress_run_start",data:{}})},Zt=t=>{i({type:"cypress_suite_start",data:{id:t.id,name:t.title,root:t.root,start:Date.now()}})},Xt=t=>{i({type:"cypress_suite_end",data:{root:t.root,stop:Date.now()}})},pt=(t,e)=>{i({type:"cypress_hook_start",data:{name:t.title,scopeType:t.hookName.includes("each")?"each":"all",position:t.hookName.includes("before")?"before":"after",start:e??Date.now()}})},H=t=>{ht(),i({type:"cypress_hook_end",data:{duration:t.duration??0}})},ut=t=>{jt(t),i({type:"cypress_test_start",data:ft(t)}),yt(t)},B=(t,e)=>{i({type:"cypress_step_start",data:{id:t,name:e,start:Date.now()}})},Se=(t,e,r)=>{i({type:"cypress_step_stop",data:oe(t,e,r)})},Qt=()=>{i({type:"cypress_test_pass",data:{}})},ct=t=>{let e=v(t),r=g(t);G(e,r),i({type:"cypress_fail",data:{status:e,statusDetails:r}})},lt=(t,e)=>{let r=t.hookName.includes("each"),n=t.parent,s=le(t.title,r,e,n);H(t),an(),pn(n,s)},te=t=>{D(t)?G(l.SKIPPED,{message:"The test was skipped before the command was completed"}):ut(t),i({type:"cypress_test_skip",data:gt()})},mt=t=>{ht(),i({type:"cypress_test_end",data:{duration:t.duration??0,retries:t._retries??0}}),Nt()},be=(t,e)=>{i({type:"attachment_path",data:{path:t,name:e,contentType:R.PNG}})},P=t=>{if(ce(t)){let e=t.test;return C(e)||H(e),xe()}},bt=(t,e)=>{try{return ct(e),lt(t.test,e),xe()}catch(r){cn(t,r)}},xt=(t,e)=>{if(!bt(t,e)?.then(()=>{throw e}))throw e},dt=()=>vt().flushAllureMessagesToTask("reportAllureCypressSpecMessages"),xe=()=>vt().flushAllureMessagesToTaskAsync("reportFinalAllureCypressSpecMessages"),an=()=>{let t=Lt();t&&mt(t)},pn=(t,e)=>{for(let r of ie(t))D(r)||un(r,r.pending?{...gt(),status:l.SKIPPED}:e)},un=(t,e)=>{i({type:"cypress_skipped_test",data:{...ft(t),...e,...se(t),suites:pe(t).map(r=>r.id)}}),yt(t)},cn=(t,e)=>{try{console.error(`Unexpected error when reporting the failure of ${t.test?.title??"'after all'"}`),console.error(e)}catch{}};var Ee=()=>{let t=ln();mn(t),dn(t)},ln=()=>{let t=0;return{getSuiteDepth:()=>t,incrementSuiteDepth:()=>{t++},decrementSuiteDepth:()=>{t--}}},mn=({incrementSuiteDepth:t,decrementSuiteDepth:e})=>{let r=o=>(a,u,p)=>{t();try{return fn(o,a,u,p)}finally{e()}},n=globalThis.describe,s=r(n);s.only=r(n.only),s.skip=r(n.skip),globalThis.describe=s},dn=({getSuiteDepth:t})=>{let e=globalThis.after,r=(n,s)=>typeof n=="string"?e(n,Te(t,s)):e(Te(t,n));globalThis.after=r},fn=(t,...e)=>{let[r,n,s]=e;return typeof s>"u"&&typeof n>"u"?t(r):typeof n=="function"?t(r,n):t(r,n,s)},Te=(t,e)=>{if(t()===0&&e){let r=e.length?gn(e):yn(e);return Object.defineProperty(r,"name",{value:e.name}),r}return e},gn=t=>function(e){let r=n=>{if(n){bt(this,n)?.then(()=>e(n))||e(n);return}try{if(P(this)?.then(()=>e()))return}catch(s){e(s);return}e()};return t.bind(this)(r)},yn=t=>function(){let e,r;try{e=t.bind(this)()}catch(n){r=n}if(r)xt(this,r);else return b(e)?e.then(()=>P(this),n=>xt(this,n)):(P(this),e)};var _e=t=>Sn(t)?we(t):hn(t),Ce=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Pe=(t,e=[])=>{if(!Ce(t))return t;let r={};e.push(t);for(let[n,s]of Object.entries(t))if(typeof s=="object"&&s!==null){if(e.includes(s))continue;r[n]=Pe(s,e)}else r[n]=s;return e.pop(),r},hn=t=>{if(Ce(t)){let e=Pe(t);return E({...e},Ae())}return E(t,Ae())},Ae=()=>{let{stepsFromCommands:{maxArgumentDepth:t,maxArgumentLength:e}}=Ht();return{maxDepth:t,maxLength:e,nonNullReplacerWithDomSupport:vn}},Sn=t=>typeof t=="object"&&t!==null&&Cypress.dom.isDom(t),we=t=>Cypress.dom.stringify(t,"long"),vn=(t,e)=>{if(typeof e=="object"){if(e===null)return;if(Cypress.dom.isDom(e))return we(e)}return e};var Re=t=>{let{event:e,instrument:r}=t.attributes;return!(r!=="command"||e||Tn(t))},De=(t,e)=>{let r=Ut();if(r&&I(r)){let{name:n,props:{name:s}}=k(r.log);n==="screenshot"&&s===t&&(r.attachmentName=e)}},ke=t=>{let e=Rn();typeof e<"u"&&Dn(e.log,t)&&z(e.log.attributes.id),bn(t),B(t.attributes.id,En(t)),xn(t)},z=t=>U(({id:e})=>e===t),bn=t=>{let r={id:t.attributes.id,type:"log",log:t};L(r),j(r,n=>{n.parameters=An(t),r.attachmentName&&(n.name=r.attachmentName)})},xn=t=>{let{groupStart:e,end:r,id:n}=t.attributes;if(r)z(n);else if(e){let s=t.endGroup;t.endGroup=function(){return z(n),s.call(this)}}else{let s=t.end;t.end=function(){return z(n),s.call(this)}}},Tn=t=>{let{name:e}=t.attributes;return e==="then"&&Object.is(k(t).props["Applied To"],M)},En=t=>{let{name:e,message:r,displayName:n}=t.attributes,s=(n??e).trim(),o=(Me(t)??Cn(t)??me(t).message??r).trim();return[s,o].filter(Boolean).join(" ")},An=t=>Pn(t).map(([e,r])=>({name:e.toString(),value:_e(r)})).filter(kn(t)),_n=["Given","When","Then","And"],Cn=t=>{let{attributes:{name:e,message:r}}=t;if(_n.includes(e.trim())&&r.startsWith("**")&&r.endsWith("**"))return r.substring(2,r.length-2)},Pn=t=>{let e=!!Me(t),{props:r,name:n}=k(t);return["clearLocalStorage"].includes(n)?[]:Object.entries(r).filter(([s,o])=>Dt(o)&&!(e&&s==="Message"))},Me=t=>{if(wn(t)){let e=k(t).props.Message;if(e&&typeof e=="string")return e}},wn=({attributes:{name:t}})=>t==="assert",Rn=()=>T().findLast(I),Dn=(t,e)=>{let{groupStart:r,type:n}=t.attributes,{type:s}=e.attributes;return!r&&(n==="child"||s!=="child")},kn=t=>t.attributes.name==="wrap"?()=>!0:({name:e,value:r})=>e!=="Yielded"||r!=="{}";var Ie=()=>Cypress.on("fail",Fe).on("log:added",In),Tt=()=>Cypress.Screenshot.defaults({onAfterScreenshot:Mn}),Mn=(...[,{name:t,path:e}])=>{let r=t??re(e);be(e,r),De(t,r)},In=(t,e)=>{Re(e)&&ke(e)},Fe=t=>{if(ge(t),Fn())throw t},Fn=()=>Object.is(Cypress.listeners("fail").at(-1),Fe);var Oe=()=>{$t(),Ie(),qt(),Ee()};var Le=()=>{kt()||(Mt(),Oe(),Tt())};Le();export{R as ContentType,m as LabelName,F as LinkType,He as Severity,Ne as Stage,l as Status,je as StatusByPriority,wr as allureId,xr as attachTrace,hr as attachment,Tr as attachmentPath,mr as description,dr as descriptionHtml,fr as displayName,Rr as epic,Dr as feature,Sr as globalAttachment,vr as globalAttachmentPath,br as globalError,gr as historyId,Cr as issue,h as label,ur as labels,jr as layer,st as link,cr as links,Ar as logStep,Or as owner,lr as parameter,Ir as parentSuite,Lr as severity,_r as step,kr as story,Fr as subSuite,Mr as suite,Nr as tag,Hr as tags,yr as testCaseId,Pr as tms};
1
+ var K=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var l=(function(t){return t.FAILED="failed",t.BROKEN="broken",t.PASSED="passed",t.SKIPPED="skipped",t})({}),He=[l.FAILED,l.BROKEN,l.PASSED,l.SKIPPED],Ue=(function(t){return t.SCHEDULED="scheduled",t.RUNNING="running",t.FINISHED="finished",t.PENDING="pending",t.INTERRUPTED="interrupted",t})({}),m=(function(t){return t.ALLURE_ID="ALLURE_ID",t.AS_ID="ALLURE_ID",t.SUITE="suite",t.PARENT_SUITE="parentSuite",t.SUB_SUITE="subSuite",t.EPIC="epic",t.FEATURE="feature",t.STORY="story",t.SEVERITY="severity",t.TAG="tag",t.OWNER="owner",t.LEAD="lead",t.HOST="host",t.THREAD="thread",t.TEST_METHOD="testMethod",t.TEST_CLASS="testClass",t.PACKAGE="package",t.FRAMEWORK="framework",t.LANGUAGE="language",t.LAYER="layer",t})({}),Ge=(function(t){return t.BLOCKER="blocker",t.CRITICAL="critical",t.NORMAL="normal",t.MINOR="minor",t.TRIVIAL="trivial",t})({}),D=(function(t){return t.TEXT="text/plain",t.XML="application/xml",t.HTML="text/html",t.CSV="text/csv",t.TSV="text/tab-separated-values",t.CSS="text/css",t.URI="text/uri-list",t.SVG="image/svg+xml",t.PNG="image/png",t.JSON="application/json",t.ZIP="application/zip",t.WEBM="video/webm",t.JPEG="image/jpeg",t.MP4="video/mp4",t.IMAGEDIFF="application/vnd.allure.image.diff",t.PLAYWRIGHT_TRACE="application/vnd.allure.playwright-trace",t.HTTP_EXCHANGE="application/vnd.allure.http+json",t})({}),F=(function(t){return t.DEFAULT="link",t.ISSUE="issue",t.TMS="tms",t})({});function $(){$=function(o,a){return new r(o,void 0,a)};var t=RegExp.prototype,e=new WeakMap;function r(s,o,a){var u=RegExp(s,o);return e.set(u,a||e.get(s)),O(u,r.prototype)}function n(s,o){var a=e.get(o);return Object.keys(a).reduce(function(u,p){var y=a[p];if(typeof y=="number")u[p]=s[y];else{for(var S=0;s[y[S]]===void 0&&S+1<y.length;)S++;u[p]=s[y[S]]}return u},Object.create(null))}return Be(r,RegExp),r.prototype.exec=function(s){var o=t.exec.call(this,s);if(o){o.groups=n(o,this);var a=o.indices;a&&(a.groups=n(a,this))}return o},r.prototype[Symbol.replace]=function(s,o){if(typeof o=="string"){var a=e.get(this);return t[Symbol.replace].call(this,s,o.replace(/\$<([^>]+)(>|$)/g,function(p,y,S){if(S==="")return p;var x=a[y];return Array.isArray(x)?"$"+x.join("$"):typeof x=="number"?"$"+x:""}))}if(typeof o=="function"){var u=this;return t[Symbol.replace].call(this,s,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(n(p,u)),o.apply(this,p)})}return t[Symbol.replace].call(this,s,o)},$.apply(this,arguments)}function Be(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},O(t,e)}function bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function q(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bt(Object(r),!0).forEach(function(n){ze(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ze(t,e,r){return(e=We(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function We(t){var e=Ke(t,"string");return typeof e=="symbol"?e:e+""}function Ke(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var v=t=>{switch(!0){case/assert/gi.test(t.constructor.name):case/expectation/gi.test(t.constructor.name):case(t.name&&/assert/gi.test(t.name)):case(t.message&&/assert/gi.test(t.message)):case(t.stack&&/@vitest\/expect/gi.test(t.stack)):case(t.stack&&/playwright\/lib\/matchers\/expect\.js/gi.test(t.stack)):case(t.stack&&/codeceptjs-expect/gi.test(t.stack)):case"matcherResult"in t:case("inspect"in t&&typeof t.inspect=="function"):case"actual"in t:case"expected"in t:return l.FAILED;default:return l.BROKEN}},$e=function(){var{onlyFirst:e=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")},Y=t=>{var e=$e();return t.replace(e,"")},qe=t=>{if(!t||typeof t!="object")return{};if("matcherResult"in t&&t.matcherResult!==void 0&&typeof t.matcherResult=="object")return{actual:b(t.matcherResult.actual),expected:b(t.matcherResult.expected)};var e="actual"in t&&t.actual!==void 0?{actual:b(t.actual)}:{},r="expected"in t&&t.expected!==void 0?{expected:b(t.expected)}:{};return q(q({},e),r)},g=t=>{var{message:e,stack:r}=t;return q({message:e?Y(e):void 0,trace:r?Y(r):void 0},qe(t))};var Ye=$(/(?:^|\s)@?allure\.([^:=\s]+)[:=]("[^"]+"|'[^']+'|`[^`]+`|\S+)/,{type:1}),At=new RegExp(Ye,"g");var Ve=t=>t?.[1],Xe=t=>{var e,r=/['"`]/,n=new RegExp("^".concat(r.source)),s=new RegExp("".concat(r.source,"$")),o=(e=t?.[2])!==null&&e!==void 0?e:"";return n.test(o)&&s.test(o)?o.slice(1,-1):o};var V=t=>{var e=[],r=[],n=t.matchAll(At),s=t.replaceAll(At,"").split(" ").filter(Boolean).reduce((x,w)=>/^[\n\r]/.test(w)?x+w:"".concat(x," ").concat(w),"").trim();for(var o of n){var a=o,u=Ve(a),p=Xe(a);if(!(!u||!p)){var[y,S]=u.split(".");switch(y){case"id":e.push({name:m.ALLURE_ID,value:p});break;case"label":e.push({name:S,value:p});break;case"link":r.push({type:S,url:p});break}}}return{labels:e,links:r,cleanTitle:s}};var E=t=>!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function",b=function(e){var{maxDepth:r=0,maxLength:n=0,replacer:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return er(typeof e=="object"?JSON.stringify(e,Je(r,s)):String(e),n)},Je=(t,e)=>{var r=[],n=function(o,a){if(typeof a!="object"||a===null)return a;for(;r.length>0&&!Object.is(r.at(-1),this);)r.pop();if(!(t&&r.length>=t||r.includes(a)))return r.push(a),a instanceof Map?Qe(r,a):a instanceof Set?tr(r,a):a};return e?Ze(e,n):n},Ze=(t,e)=>function(r,n){return e.call(this,r,t.call(this,r,n))},Qe=(t,e)=>Array.from(e).filter(r=>{var[n]=r;return!t.includes(n)}).map(r=>{var[n,s]=r;return[n,t.includes(s)?void 0:s]}),tr=(t,e)=>Array.from(e).map(r=>t.includes(r)?void 0:r),er=(t,e)=>e&&t.length>e?"".concat(t.substring(0,e),"..."):t;function _t(t,e,r,n,s,o,a){try{var u=t[o](a),p=u.value}catch(y){return void r(y)}u.done?e(p):Promise.resolve(p).then(n,s)}function d(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var o=t.apply(e,r);function a(p){_t(o,n,s,a,u,"next",p)}function u(p){_t(o,n,s,a,u,"throw",p)}a(void 0)})}}function rr(t,e,r){return(e=nr(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nr(t){var e=sr(t,"string");return typeof e=="symbol"?e:e+""}function sr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var or="no test runtime is found. Please check test framework configuration",ar="no sync test runtime is found. Please check test framework configuration and adapter sync support",X="allure-js-commons/sync step body must be synchronous and must not return a Promise",J=class{attachment(e,r,n){this.warning()}attachmentFromPath(e,r,n){this.warning()}globalAttachment(e,r,n){this.warning()}globalAttachmentFromPath(e,r,n){this.warning()}globalError(e){this.warning()}description(e){this.warning()}descriptionHtml(e){this.warning()}displayName(e){this.warning()}historyId(e){this.warning()}labels(){this.warning()}links(){this.warning()}parameter(e,r,n){this.warning()}logStep(e,r,n){this.warning()}step(e,r){this.warning();var n=r();if(E(n)){var s=new Error(X);throw this.warnAboutPromiseStep(),s}return n}stepDisplayName(e){this.warning()}stepParameter(e,r,n){this.warning()}testCaseId(e){this.warning()}warning(){console.warn(ar)}warnAboutPromiseStep(){console.warn(X)}},Q=new J,Z=class{constructor(){rr(this,"sync",Q)}attachment(){var e=this;return d(function*(){yield e.warning()})()}attachmentFromPath(){var e=this;return d(function*(){yield e.warning()})()}globalAttachment(){var e=this;return d(function*(){yield e.warning()})()}globalAttachmentFromPath(){var e=this;return d(function*(){yield e.warning()})()}globalError(){var e=this;return d(function*(){yield e.warning()})()}description(){var e=this;return d(function*(){yield e.warning()})()}descriptionHtml(){var e=this;return d(function*(){yield e.warning()})()}displayName(){var e=this;return d(function*(){yield e.warning()})()}historyId(){var e=this;return d(function*(){yield e.warning()})()}labels(){var e=this;return d(function*(){yield e.warning()})()}links(){var e=this;return d(function*(){yield e.warning()})()}parameter(){var e=this;return d(function*(){yield e.warning()})()}logStep(){var e=this;return d(function*(){yield e.warning()})()}step(e,r){var n=this;return d(function*(){return yield n.warning(),r()})()}stepDisplayName(){var e=this;return d(function*(){yield e.warning()})()}stepParameter(){var e=this;return d(function*(){yield e.warning()})()}testCaseId(){var e=this;return d(function*(){yield e.warning()})()}warning(){return d(function*(){console.log(or)})()}},_=new Z;function ir(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i,function(r,n,s,o,a){return n?e?".jsx":".js":!s||o&&a?s+o+"."+a.toLowerCase()+"js":r}):t}var Ct="allureTestRuntime",pr="allure-playwright/autoconfig",ur=()=>{var t,e,r,n=globalThis.process;return(t=n==null||(e=n.getBuiltinModule)===null||e===void 0||(e=e.call(n,"node:module"))===null||e===void 0?void 0:e.createRequire)!==null&&t!==void 0?t:n==null||(r=n.getBuiltinModule)===null||r===void 0||(r=r.call(n,"module"))===null||r===void 0?void 0:r.createRequire},cr=()=>{var t,e=globalThis.process,r=e==null||(t=e.cwd)===null||t===void 0?void 0:t.call(e),n=ur();return r&&n?n("".concat(r,"/package.json")):void 0},os=typeof K=="function"?K:cr(),et=t=>{globalThis[Ct]=()=>t},tt=()=>globalThis?.[Ct],rt=()=>{var t=tt();if(t){var e;return(e=t())!==null&&e!==void 0?e:_}return _};var nt=()=>{var t=tt();if(t){var e;return(e=t())!==null&&e!==void 0?e:_}return import(ir(pr)).then(()=>{var r,n;return(r=(n=tt())===null||n===void 0?void 0:n())!==null&&r!==void 0?r:_}).catch(()=>_)};var c=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];var o=nt();return E(o)?o.then(a=>a[e](...n)):o[e](...n)},h=(t,e)=>c("labels",{name:t,value:e}),lr=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c("labels",...r)},st=(t,e,r)=>c("links",{url:t,type:r,name:e}),mr=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c("links",...r)},dr=(t,e,r)=>c("parameter",t,e,r),fr=t=>c("description",t),gr=t=>c("descriptionHtml",t),yr=t=>c("displayName",t),hr=t=>c("historyId",t),Sr=t=>c("testCaseId",t),vr=(t,e,r)=>{var n=typeof r=="string"?{contentType:r}:r;return c("attachment",t,e,n)},Er=(t,e,r)=>{var n=typeof r=="string"?{contentType:r}:r;return c("globalAttachment",t,e,n)},xr=(t,e,r)=>{var n=typeof r=="string"?{contentType:r}:r;return c("globalAttachmentFromPath",t,e,n)},Tr=t=>c("globalError",t),br=(t,e)=>c("attachmentFromPath",t,e,{contentType:D.PLAYWRIGHT_TRACE}),Ar=(t,e,r)=>{var n=typeof r=="string"?{contentType:r}:r;return c("attachmentFromPath",t,e,n)},_r=()=>({displayName:t=>c("stepDisplayName",t),parameter:(t,e,r)=>c("stepParameter",t,e,r)}),Cr=(t,e,r)=>c("logStep",t,e,r),Pr=(t,e)=>c("step",t,()=>e(_r())),Rr=(t,e)=>st(t,e,F.ISSUE),wr=(t,e)=>st(t,e,F.TMS),Dr=t=>h(m.ALLURE_ID,t),kr=t=>h(m.EPIC,t),Ir=t=>h(m.FEATURE,t),Lr=t=>h(m.STORY,t),Mr=t=>h(m.SUITE,t),Fr=t=>h(m.PARENT_SUITE,t),Or=t=>h(m.SUB_SUITE,t),jr=t=>h(m.OWNER,t),Nr=t=>h(m.SEVERITY,t),Hr=t=>h(m.LAYER,t),Ur=t=>h(m.TAG,t),Gr=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c("labels",...r.map(s=>({name:m.TAG,value:s})))};var Br=1,zr="application/vnd.allure.http+json",Wr=".httpexchange",Kr="__ALLURE_REDACTED__";var Pt={stepsFromCommands:{maxArgumentLength:128,maxArgumentDepth:3}},Rt=(t,e)=>{let r=t.findLastIndex(e);return r!==-1?ot(t.splice(r)):[]},ot=t=>{let e=t.length,r=new Array(e);for(let n=0;n<e;n++)r[e-n-1]=t[n];return r},wt=t=>t[t.length-1],Dt=t=>typeof t<"u";var f=()=>{let t=Cypress.env("allure");return t||(t={config:Pt,initialized:!1,messages:[],testPlan:void 0,currentTest:void 0,projectDir:void 0,projectName:void 0,stepStack:[],stepsToFinalize:[],nextApiStepId:0},Cypress.env("allure",t)),t},kt=()=>f().initialized,It=()=>{f().initialized=!0},at=()=>f().messages,Lt=t=>{f().messages=t},i=t=>{at().push(t)},Mt=()=>f().testPlan,Ft=()=>f().projectDir,Ot=()=>f().projectName,jt=()=>f().currentTest,Nt=t=>{f().currentTest=t},Ht=()=>{f().currentTest=void 0},Ut=()=>f().config,T=()=>f().stepStack,Gt=()=>wt(T()),j=t=>T().push(t);var qr=t=>ot(T().splice(t)),Bt=()=>qr(0);var N=(t,e)=>f().stepsToFinalize.push([t,e]),zt=()=>f().stepsToFinalize,Wt=()=>{let t=f();t.stepsToFinalize=[]};var Kt=(t,e)=>{let r=Mt();if(r){let n=$t(t);for(let s of Yr(e)){let o=Vr(r,t,n,s.tests);Xr(s.tests,o)}}},Yr=function*(t){let e=[];for(let r=t;r;r=e.pop()){yield r;for(let n=r.suites.length-1;n>=0;n--)e.push(r.suites[n])}},Vr=(t,e,r,n)=>{let s=[],o=Ot(),a=o?`${o}:${r}`:r;return n.forEach((u,p)=>{let{fullNameSuffix:y,labels:S}=it(u),x=`${a}#${y}`,w=S.find(({name:Ne})=>Ne===m.ALLURE_ID)?.value;Jr(t,x,w)||s.push(p)}),s},Xr=(t,e)=>{for(let r=e.length-1;r>=0;r--)t.splice(e[r],1)},Jr=(t,e,r)=>t.tests.some(n=>r&&n.id?.toString()===r||n.selector===e);var H="__allure_report_system_hook__",qt=()=>{Cypress.mocha.getRunner().on("start",Zr).on("suite",Qr).on("suite end",Qt).on("hook",tn).on("hook end",en).on("test",rn).on("pass",te).on("fail",nn).on("pending",ee).on("test end",mt)},Yt=()=>{afterEach(H,dt),after(H,sn)},Zr=()=>{Xt(),Jt()},Qr=t=>{t.root&&Kt(Cypress.spec,t),Zt(t)},tn=t=>{C(t)||pt(t)},en=t=>{C(t)||U(t)},rn=t=>{k(t)||ut(t)},nn=(t,e)=>{let r="hookName"in t;if(r&&Vt(t))return;r&&C(t)&&pt(t,Date.now()-(t.duration??0)),ct(e),r&&lt(t,e)},sn=function(){dt(),P(this)};var re=Cypress.platform==="win32",ne=t=>t.substring(t.lastIndexOf(re?"\\":"/")+1),$t=t=>{let e=Ft(),r=e?t.absolute.substring(e.length+1):t.relative;return re?r.replaceAll("\\","/"):r},se=t=>Array.isArray(t)||t.buffer?btoa(String.fromCharCode.apply(null,t)):t,ft=t=>({...it(t),start:typeof t.wallClockStartedAt=="string"?Date.parse(t.wallClockStartedAt):t.wallClockStartedAt?.getTime?.()||Date.now()}),oe=t=>({duration:t.duration??0,retries:t._retries??0}),gt=()=>({statusDetails:{message:"This is a pending test"}}),ae=(t,e,r)=>{let n={id:t.id,stop:Date.now(),status:e??fe(t)};return r&&(n.statusDetails=r),n},ie=Symbol("The test has been reported to Allure"),yt=t=>{t[ie]=!0},k=t=>t[ie]===!0,on=function*(t){let e=[];for(let r=t;r;r=e.pop()){yield r;for(let n=r.suites.length-1;n>=0;n--)e.push(r.suites[n])}},pe=function*(t){for(let e of on(t))yield*e.tests},ue=t=>{let e=[];for(let r=t.parent;r;r=r.parent)e.push(r);return e.reverse(),e};var ce=()=>(f().nextApiStepId++).toString(),it=t=>{let e=t.title,{cleanTitle:r,labels:n,links:s}=V(e),a=`${[...t.titlePath().slice(0,-1),r].join(" ")}`;return{name:r,labels:n,links:s,fullNameSuffix:a}},C=t=>t.title.includes(H),Vt=t=>t.parent.root&&t.hookName==="after all",le=t=>{let e=t.test;return t.test.parent.hooks.findLast(o=>o.hookName==="after all")?.hookId===e.hookId},me=(t,e,r,n)=>{let s=e?l.SKIPPED:v(r),{message:o,trace:a}=g(r);return{status:s,statusDetails:{message:e?an(t,n):o,trace:a}}},an=(t,e)=>{let r=e.title?`'${e.title}'`:"root";return`'${t}' defined in the ${r} suite has failed`},I=t=>typeof t.attributes.consoleProps=="function"?t.attributes.consoleProps():t.attributes.consoleProps,de=t=>typeof t?.attributes?.renderProps=="function"?t.attributes.renderProps():t.attributes?.renderProps;var L={},ge=t=>t.type==="api",M=t=>t.type==="log",R=t=>z(pn(),t),pn=()=>{let t=ce();return j({id:t,type:"api"}),t},ye=t=>{let e=v(t),r=g(t);cn(e,r),Se(t)},A=(t,e)=>G(r=>ge(r),t,e),G=(t,e,r)=>he(Rt(T(),t),e,r),B=(t,e)=>he(Bt(),t,e),ht=()=>{B(),zt().forEach(un),Wt()},fe=t=>t.error?v(t.error):l.PASSED,un=([t,e])=>{let{id:r,error:n}=t,s={id:r};n&&(s.statusDetails=g(n)),e?.(s),i({type:"cypress_step_finalize",data:s})},cn=(t,e)=>{let r=T(),n=r.at(r.findLastIndex(M)+1);n&&G(s=>Object.is(s,n),t,e)},ln=(t,e)=>{if(M(t)){let r=t.log.attributes.error;if(r)return t.error=r}return e&&(t.error=e),t.error},he=(t,e,r)=>{let n;for(let s of t)n=ln(s,n),mn(s,e,r);n&&Se(n)},Se=t=>T().forEach(e=>e.error=t),mn=(t,e,r)=>{ve(t,e,r),ge(t)&&t.error&&N(t)};var Ee="allure-js-commons/sync step body must be synchronous and must not return a Promise",Xt=()=>et(new St),vt=()=>rt(),St=class{constructor(){this.#r()}get sync(){return this.#i()}labels(...e){return this.#t({type:"metadata",data:{labels:e}})}links(...e){return this.#t({type:"metadata",data:{links:e}})}parameter(e,r,n){return this.#t({type:"metadata",data:{parameters:[{name:e,value:r,...n}]}})}description(e){return this.#t({type:"metadata",data:{description:e}})}descriptionHtml(e){return this.#t({type:"metadata",data:{descriptionHtml:e}})}displayName(e){return this.#t({type:"metadata",data:{displayName:e}})}historyId(e){return this.#t({type:"metadata",data:{historyId:e}})}testCaseId(e){return this.#t({type:"metadata",data:{testCaseId:e}})}attachment(e,r,n){let[s,o]=this.#e(r);return this.#t({type:"attachment_content",data:{name:e,content:s,encoding:o,contentType:n.contentType,fileExtension:n.fileExtension}})}attachmentFromPath(e,r,n){return this.#t({type:"attachment_path",data:{name:e,path:r,contentType:n.contentType,fileExtension:n.fileExtension}})}globalAttachment(e,r,n){let[s,o]=this.#e(r);return this.#t({type:"global_attachment_content",data:{name:e,content:s,encoding:o,contentType:n.contentType,fileExtension:n.fileExtension}})}globalAttachmentFromPath(e,r,n){return this.#t({type:"global_attachment_path",data:{name:e,path:r,contentType:n.contentType,fileExtension:n.fileExtension}})}globalError(e){return this.#t({type:"global_error",data:e})}logStep(e,r=l.PASSED,n){return this.#a()?(R(e),A(r,n?g(n):void 0),Cypress.Promise.resolve()):cy.wrap(L,{log:!1}).then(()=>(R(e),Cypress.Promise.resolve())).then(()=>(A(r,n?g(n):void 0),Cypress.Promise.resolve()))}step(e,r){return cy.wrap(L,{log:!1}).then(()=>(R(e),Cypress.Promise.resolve(r()))).then(n=>(A(),n))}stepDisplayName(e){return this.#t({type:"step_metadata",data:{name:e}})}stepParameter(e,r,n){return this.#t({type:"step_metadata",data:{parameters:[{name:e,value:r,mode:n}]}})}flushAllureMessagesToTask(e){let r=this.#n();r.length&&cy.task(e,{absolutePath:Cypress.spec.absolute,messages:r},{log:!1})}flushAllureMessagesToTaskAsync(e){let r=this.#n();if(r.length){let n={absolutePath:Cypress.spec.absolute,messages:r,isInteractive:Cypress.config("isInteractive")};return cy.task(e,n,{log:!1})}}#r(){Lt([])}#t(e){return i(e),Cypress.Promise.resolve()}#n(){let e=at();return this.#r(),e}#e(e){let r=this.#s(e),n=typeof r=="string"?"utf8":"base64";return[se(r),n]}#s(e){return e instanceof Uint8Array||typeof e=="string"?e:this.#o(e)?new Uint8Array(e.data):e}#o(e){if(!e||typeof e!="object")return!1;let r=e;return r.type==="Buffer"&&Array.isArray(r.data)}#a(){try{let e=!!window.cypressOriginContext,r=!!window.cypressOriginWindow;if(e||r)return!0;let n=Cypress.config("baseUrl"),s=window.location.origin;if(n&&s!==n)return!0;let o=window.Cypress;if(o&&o.state&&o.state("origin"))return!0;try{let a=typeof cy<"u",u=typeof cy.task<"u";if(!a||!u)return!0}catch{return!0}return!1}catch{return!0}}#i(){return{labels:(...e)=>i({type:"metadata",data:{labels:e}}),links:(...e)=>i({type:"metadata",data:{links:e}}),parameter:(e,r,n)=>i({type:"metadata",data:{parameters:[{name:e,value:r,...n}]}}),description:e=>i({type:"metadata",data:{description:e}}),descriptionHtml:e=>i({type:"metadata",data:{descriptionHtml:e}}),displayName:e=>i({type:"metadata",data:{displayName:e}}),historyId:e=>i({type:"metadata",data:{historyId:e}}),testCaseId:e=>i({type:"metadata",data:{testCaseId:e}}),attachment:(e,r,n)=>{let[s,o]=this.#e(r);i({type:"attachment_content",data:{name:e,content:s,encoding:o,contentType:n.contentType,fileExtension:n.fileExtension}})},attachmentFromPath:(e,r,n)=>i({type:"attachment_path",data:{name:e,path:r,contentType:n.contentType,fileExtension:n.fileExtension}}),globalAttachment:(e,r,n)=>{let[s,o]=this.#e(r);i({type:"global_attachment_content",data:{name:e,content:s,encoding:o,contentType:n.contentType,fileExtension:n.fileExtension}})},globalAttachmentFromPath:(e,r,n)=>i({type:"global_attachment_path",data:{name:e,path:r,contentType:n.contentType,fileExtension:n.fileExtension}}),globalError:e=>i({type:"global_error",data:e}),logStep:(e,r=l.PASSED,n)=>{R(e),A(r,n?g(n):void 0)},step:(e,r)=>{R(e);try{let n=r();if(E(n))throw console.warn(Ee),new Error(Ee);return A(),n}catch(n){let s=n;throw A(v(s),g(s)),n}},stepDisplayName:e=>i({type:"step_metadata",data:{name:e}}),stepParameter:(e,r,n)=>i({type:"step_metadata",data:{parameters:[{name:e,value:r,mode:n}]}})}}};var Jt=()=>{i({type:"cypress_run_start",data:{}})},Zt=t=>{i({type:"cypress_suite_start",data:{id:t.id,name:t.title,root:t.root,start:Date.now()}})},Qt=t=>{i({type:"cypress_suite_end",data:{root:t.root,stop:Date.now()}})},pt=(t,e)=>{i({type:"cypress_hook_start",data:{name:t.title,scopeType:t.hookName.includes("each")?"each":"all",position:t.hookName.includes("before")?"before":"after",start:e??Date.now()}})},U=t=>{ht(),i({type:"cypress_hook_end",data:{duration:t.duration??0}})},ut=t=>{Nt(t),i({type:"cypress_test_start",data:ft(t)}),yt(t)},z=(t,e)=>{i({type:"cypress_step_start",data:{id:t,name:e,start:Date.now()}})},ve=(t,e,r)=>{i({type:"cypress_step_stop",data:ae(t,e,r)})},te=()=>{i({type:"cypress_test_pass",data:{}})},ct=t=>{let e=v(t),r=g(t);B(e,r),i({type:"cypress_fail",data:{status:e,statusDetails:r}})},lt=(t,e)=>{let r=t.hookName.includes("each"),n=t.parent,s=me(t.title,r,e,n);U(t),dn(),fn(n,s)},ee=t=>{k(t)?B(l.SKIPPED,{message:"The test was skipped before the command was completed"}):ut(t),i({type:"cypress_test_skip",data:gt()})},mt=t=>{ht(),i({type:"cypress_test_end",data:{duration:t.duration??0,retries:t._retries??0}}),Ht()},xe=(t,e)=>{i({type:"attachment_path",data:{path:t,name:e,contentType:D.PNG}})},P=t=>{if(le(t)){let e=t.test;return C(e)||U(e),Te()}},Et=(t,e)=>{try{return ct(e),lt(t.test,e),Te()}catch(r){yn(t,r)}},xt=(t,e)=>{if(!Et(t,e)?.then(()=>{throw e}))throw e},dt=()=>vt().flushAllureMessagesToTask("reportAllureCypressSpecMessages"),Te=()=>vt().flushAllureMessagesToTaskAsync("reportFinalAllureCypressSpecMessages"),dn=()=>{let t=jt();t&&mt(t)},fn=(t,e)=>{for(let r of pe(t))k(r)||gn(r,r.pending?{...gt(),status:l.SKIPPED}:e)},gn=(t,e)=>{i({type:"cypress_skipped_test",data:{...ft(t),...e,...oe(t),suites:ue(t).map(r=>r.id)}}),yt(t)},yn=(t,e)=>{try{console.error(`Unexpected error when reporting the failure of ${t.test?.title??"'after all'"}`),console.error(e)}catch{}};var Ae=()=>{let t=hn();Sn(t),vn(t)},hn=()=>{let t=0;return{getSuiteDepth:()=>t,incrementSuiteDepth:()=>{t++},decrementSuiteDepth:()=>{t--}}},Sn=({incrementSuiteDepth:t,decrementSuiteDepth:e})=>{let r=o=>(a,u,p)=>{t();try{return En(o,a,u,p)}finally{e()}},n=globalThis.describe,s=r(n);s.only=r(n.only),s.skip=r(n.skip),globalThis.describe=s},vn=({getSuiteDepth:t})=>{let e=globalThis.after,r=(n,s)=>typeof n=="string"?e(n,be(t,s)):e(be(t,n));globalThis.after=r},En=(t,...e)=>{let[r,n,s]=e;return typeof s>"u"&&typeof n>"u"?t(r):typeof n=="function"?t(r,n):t(r,n,s)},be=(t,e)=>{if(t()===0&&e){let r=e.length?xn(e):Tn(e);return Object.defineProperty(r,"name",{value:e.name}),r}return e},xn=t=>function(e){let r=n=>{if(n){Et(this,n)?.then(()=>e(n))||e(n);return}try{if(P(this)?.then(()=>e()))return}catch(s){e(s);return}e()};return t.bind(this)(r)},Tn=t=>function(){let e,r;try{e=t.bind(this)()}catch(n){r=n}if(r)xt(this,r);else return E(e)?e.then(()=>P(this),n=>xt(this,n)):(P(this),e)};var Ce=t=>An(t)?we(t):bn(t),Pe=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Re=(t,e=[])=>{if(!Pe(t))return t;let r={};e.push(t);for(let[n,s]of Object.entries(t))if(typeof s=="object"&&s!==null){if(e.includes(s))continue;r[n]=Re(s,e)}else r[n]=s;return e.pop(),r},bn=t=>{if(Pe(t)){let e=Re(t);return b({...e},_e())}return b(t,_e())},_e=()=>{let{stepsFromCommands:{maxArgumentDepth:t,maxArgumentLength:e}}=Ut();return{maxDepth:t,maxLength:e,nonNullReplacerWithDomSupport:_n}},An=t=>typeof t=="object"&&t!==null&&Cypress.dom.isDom(t),we=t=>Cypress.dom.stringify(t,"long"),_n=(t,e)=>{if(typeof e=="object"){if(e===null)return;if(Cypress.dom.isDom(e))return we(e)}return e};var De=t=>{let{event:e,instrument:r}=t.attributes;return!(r!=="command"||e||Rn(t))},ke=(t,e)=>{let r=Gt();if(r&&M(r)){let{name:n,props:{name:s}}=I(r.log);n==="screenshot"&&s===t&&(r.attachmentName=e)}},Ie=t=>{let e=Fn();typeof e<"u"&&On(e.log,t)&&W(e.log.attributes.id),Cn(t),z(t.attributes.id,wn(t)),Pn(t)},W=t=>G(({id:e})=>e===t),Cn=t=>{let r={id:t.attributes.id,type:"log",log:t};j(r),N(r,n=>{n.parameters=Dn(t),r.attachmentName&&(n.name=r.attachmentName)})},Pn=t=>{let{groupStart:e,end:r,id:n}=t.attributes;if(r)W(n);else if(e){let s=t.endGroup;t.endGroup=function(){return W(n),s.call(this)}}else{let s=t.end;t.end=function(){return W(n),s.call(this)}}},Rn=t=>{let{name:e}=t.attributes;return e==="then"&&Object.is(I(t).props["Applied To"],L)},wn=t=>{let{name:e,message:r,displayName:n}=t.attributes,s=(n??e).trim(),o=(Le(t)??In(t)??de(t).message??r).trim();return[s,o].filter(Boolean).join(" ")},Dn=t=>Ln(t).map(([e,r])=>({name:e.toString(),value:Ce(r)})).filter(jn(t)),kn=["Given","When","Then","And"],In=t=>{let{attributes:{name:e,message:r}}=t;if(kn.includes(e.trim())&&r.startsWith("**")&&r.endsWith("**"))return r.substring(2,r.length-2)},Ln=t=>{let e=!!Le(t),{props:r,name:n}=I(t);return["clearLocalStorage"].includes(n)?[]:Object.entries(r).filter(([s,o])=>Dt(o)&&!(e&&s==="Message"))},Le=t=>{if(Mn(t)){let e=I(t).props.Message;if(e&&typeof e=="string")return e}},Mn=({attributes:{name:t}})=>t==="assert",Fn=()=>T().findLast(M),On=(t,e)=>{let{groupStart:r,type:n}=t.attributes,{type:s}=e.attributes;return!r&&(n==="child"||s!=="child")},jn=t=>t.attributes.name==="wrap"?()=>!0:({name:e,value:r})=>e!=="Yielded"||r!=="{}";var Me=()=>Cypress.on("fail",Fe).on("log:added",Hn),Tt=()=>Cypress.Screenshot.defaults({onAfterScreenshot:Nn}),Nn=(...[,{name:t,path:e}])=>{let r=t??ne(e);xe(e,r),ke(t,r)},Hn=(t,e)=>{De(e)&&Ie(e)},Fe=t=>{if(ye(t),Un())throw t},Un=()=>Object.is(Cypress.listeners("fail").at(-1),Fe);var Oe=()=>{qt(),Me(),Yt(),Ae()};var je=()=>{kt()||(It(),Oe(),Tt())};je();export{zr as ALLURE_HTTP_EXCHANGE_CONTENT_TYPE,Wr as ALLURE_HTTP_EXCHANGE_FILE_EXTENSION,Br as ALLURE_HTTP_EXCHANGE_SCHEMA_VERSION,Kr as ALLURE_HTTP_REDACTED_VALUE,D as ContentType,m as LabelName,F as LinkType,Ge as Severity,Ue as Stage,l as Status,He as StatusByPriority,Dr as allureId,br as attachTrace,vr as attachment,Ar as attachmentPath,fr as description,gr as descriptionHtml,yr as displayName,kr as epic,Ir as feature,Er as globalAttachment,xr as globalAttachmentPath,Tr as globalError,hr as historyId,Rr as issue,h as label,lr as labels,Hr as layer,st as link,mr as links,Cr as logStep,jr as owner,dr as parameter,Fr as parentSuite,Nr as severity,Pr as step,Lr as story,Or as subSuite,Mr as suite,Ur as tag,Gr as tags,Sr as testCaseId,wr as tms};
2
2
  //# sourceMappingURL=index.js.map