allure-cypress 3.7.2 → 3.9.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.
@@ -326,12 +326,16 @@ class AllureCypress {
326
326
  labels: metadataLabels = []
327
327
  } = _ref7,
328
328
  otherTestData = _objectWithoutProperties(_ref7, _excluded2);
329
+ var projectName = (0, _reporter.getProjectName)();
329
330
  var posixPath = (0, _reporter.getPosixPath)(context.specPath);
331
+ var fullNameBase = projectName ? "".concat(projectName, ":").concat(posixPath) : posixPath;
332
+ var legacyFullName = "".concat(posixPath, "#").concat(fullNameSuffix);
333
+ var titlePath = posixPath.split("/").concat(context.suiteNames);
330
334
  return this.allureRuntime.startTest(_objectSpread({
331
335
  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)
336
+ 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))],
337
+ fullName: "".concat(fullNameBase, "#").concat(fullNameSuffix),
338
+ titlePath: projectName ? [projectName, ...titlePath] : titlePath
335
339
  }, otherTestData), scopes);
336
340
  });
337
341
  _classPrivateFieldInitSpec(this, _failHookAndTest, (context, _ref8) => {
@@ -589,6 +593,7 @@ var createRuntimeState = allureConfig => ({
589
593
  messages: [],
590
594
  testPlan: (0, _reporter.parseTestPlan)(),
591
595
  projectDir: (0, _reporter.getProjectRoot)(),
596
+ projectName: (0, _reporter.getProjectName)(),
592
597
  stepStack: [],
593
598
  stepsToFinalize: [],
594
599
  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,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAhB,CAAA,EAAAC,CAAA,EAAAC,C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;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 // 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 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,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAA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C,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":[]}
@@ -7,11 +7,12 @@ function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a
7
7
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
8
8
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
9
9
  import { Status } from "allure-js-commons";
10
- import { getMessageAndTraceFromError } from "allure-js-commons/sdk";
10
+ import { getMessageAndTraceFromError, getStatusFromError, isPromise } from "allure-js-commons/sdk";
11
11
  import { getGlobalTestRuntime, setGlobalTestRuntime } from "allure-js-commons/sdk/runtime";
12
12
  import { enqueueRuntimeMessage, getRuntimeMessages, setRuntimeMessages } from "./state.js";
13
13
  import { ALLURE_STEP_CMD_SUBJECT, startAllureApiStep, stopCurrentAllureApiStep } from "./steps.js";
14
14
  import { uint8ArrayToBase64 } from "./utils.js";
15
+ var SYNC_STEP_PURE_FUNCTION_ERROR = "allure-js-commons/sync step body must be synchronous and must not return a Promise";
15
16
  export var initTestRuntime = () => setGlobalTestRuntime(new AllureCypressTestRuntime());
16
17
  export var getTestRuntime = () => getGlobalTestRuntime();
17
18
  var _AllureCypressTestRuntime_brand = /*#__PURE__*/new WeakSet();
@@ -20,6 +21,9 @@ class AllureCypressTestRuntime {
20
21
  _classPrivateMethodInitSpec(this, _AllureCypressTestRuntime_brand);
21
22
  _assertClassBrand(_AllureCypressTestRuntime_brand, this, _resetMessages).call(this);
22
23
  }
24
+ get sync() {
25
+ return _assertClassBrand(_AllureCypressTestRuntime_brand, this, _createSyncRuntime).call(this);
26
+ }
23
27
  labels() {
24
28
  for (var _len = arguments.length, labels = new Array(_len), _key = 0; _key < _len; _key++) {
25
29
  labels[_key] = arguments[_key];
@@ -286,4 +290,156 @@ function _isInOriginContext() {
286
290
  return true;
287
291
  }
288
292
  }
293
+ function _createSyncRuntime() {
294
+ return {
295
+ labels: function labels() {
296
+ for (var _len3 = arguments.length, _labels = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
297
+ _labels[_key3] = arguments[_key3];
298
+ }
299
+ return enqueueRuntimeMessage({
300
+ type: "metadata",
301
+ data: {
302
+ labels: _labels
303
+ }
304
+ });
305
+ },
306
+ links: function links() {
307
+ for (var _len4 = arguments.length, _links = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
308
+ _links[_key4] = arguments[_key4];
309
+ }
310
+ return enqueueRuntimeMessage({
311
+ type: "metadata",
312
+ data: {
313
+ links: _links
314
+ }
315
+ });
316
+ },
317
+ parameter: (name, value, options) => enqueueRuntimeMessage({
318
+ type: "metadata",
319
+ data: {
320
+ parameters: [_objectSpread({
321
+ name,
322
+ value
323
+ }, options)]
324
+ }
325
+ }),
326
+ description: markdown => enqueueRuntimeMessage({
327
+ type: "metadata",
328
+ data: {
329
+ description: markdown
330
+ }
331
+ }),
332
+ descriptionHtml: html => enqueueRuntimeMessage({
333
+ type: "metadata",
334
+ data: {
335
+ descriptionHtml: html
336
+ }
337
+ }),
338
+ displayName: name => enqueueRuntimeMessage({
339
+ type: "metadata",
340
+ data: {
341
+ displayName: name
342
+ }
343
+ }),
344
+ historyId: value => enqueueRuntimeMessage({
345
+ type: "metadata",
346
+ data: {
347
+ historyId: value
348
+ }
349
+ }),
350
+ testCaseId: value => enqueueRuntimeMessage({
351
+ type: "metadata",
352
+ data: {
353
+ testCaseId: value
354
+ }
355
+ }),
356
+ attachment: (name, content, options) => {
357
+ var [attachmentContent, actualEncoding] = _assertClassBrand(_AllureCypressTestRuntime_brand, this, _buildAttachmentContent).call(this, content);
358
+ enqueueRuntimeMessage({
359
+ type: "attachment_content",
360
+ data: {
361
+ name,
362
+ content: attachmentContent,
363
+ encoding: actualEncoding,
364
+ contentType: options.contentType,
365
+ fileExtension: options.fileExtension
366
+ }
367
+ });
368
+ },
369
+ attachmentFromPath: (name, path, options) => enqueueRuntimeMessage({
370
+ type: "attachment_path",
371
+ data: {
372
+ name,
373
+ path,
374
+ contentType: options.contentType,
375
+ fileExtension: options.fileExtension
376
+ }
377
+ }),
378
+ globalAttachment: (name, content, options) => {
379
+ var [attachmentContent, actualEncoding] = _assertClassBrand(_AllureCypressTestRuntime_brand, this, _buildAttachmentContent).call(this, content);
380
+ enqueueRuntimeMessage({
381
+ type: "global_attachment_content",
382
+ data: {
383
+ name,
384
+ content: attachmentContent,
385
+ encoding: actualEncoding,
386
+ contentType: options.contentType,
387
+ fileExtension: options.fileExtension
388
+ }
389
+ });
390
+ },
391
+ globalAttachmentFromPath: (name, path, options) => enqueueRuntimeMessage({
392
+ type: "global_attachment_path",
393
+ data: {
394
+ name,
395
+ path,
396
+ contentType: options.contentType,
397
+ fileExtension: options.fileExtension
398
+ }
399
+ }),
400
+ globalError: details => enqueueRuntimeMessage({
401
+ type: "global_error",
402
+ data: details
403
+ }),
404
+ logStep: function logStep(name) {
405
+ var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Status.PASSED;
406
+ var error = arguments.length > 2 ? arguments[2] : undefined;
407
+ startAllureApiStep(name);
408
+ stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);
409
+ },
410
+ step: (name, body) => {
411
+ startAllureApiStep(name);
412
+ try {
413
+ var result = body();
414
+ if (isPromise(result)) {
415
+ // eslint-disable-next-line no-console
416
+ console.warn(SYNC_STEP_PURE_FUNCTION_ERROR);
417
+ throw new Error(SYNC_STEP_PURE_FUNCTION_ERROR);
418
+ }
419
+ stopCurrentAllureApiStep();
420
+ return result;
421
+ } catch (err) {
422
+ var error = err;
423
+ stopCurrentAllureApiStep(getStatusFromError(error), getMessageAndTraceFromError(error));
424
+ throw err;
425
+ }
426
+ },
427
+ stepDisplayName: name => enqueueRuntimeMessage({
428
+ type: "step_metadata",
429
+ data: {
430
+ name
431
+ }
432
+ }),
433
+ stepParameter: (name, value, mode) => enqueueRuntimeMessage({
434
+ type: "step_metadata",
435
+ data: {
436
+ parameters: [{
437
+ name,
438
+ value,
439
+ mode
440
+ }]
441
+ }
442
+ })
443
+ };
444
+ }
289
445
  //# sourceMappingURL=runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","names":["Status","getMessageAndTraceFromError","getGlobalTestRuntime","setGlobalTestRuntime","enqueueRuntimeMessage","getRuntimeMessages","setRuntimeMessages","ALLURE_STEP_CMD_SUBJECT","startAllureApiStep","stopCurrentAllureApiStep","uint8ArrayToBase64","initTestRuntime","AllureCypressTestRuntime","getTestRuntime","_AllureCypressTestRuntime_brand","WeakSet","constructor","_classPrivateMethodInitSpec","_assertClassBrand","_resetMessages","call","labels","_len","arguments","length","Array","_key","_enqueueMessageAsync","type","data","links","_len2","_key2","parameter","name","value","options","parameters","_objectSpread","description","markdown","descriptionHtml","html","displayName","historyId","testCaseId","attachment","content","attachmentContent","actualEncoding","_buildAttachmentContent","encoding","contentType","fileExtension","attachmentFromPath","path","globalAttachment","globalAttachmentFromPath","globalError","details","logStep","status","undefined","PASSED","error","_isInOriginContext","Cypress","Promise","resolve","cy","wrap","log","then","step","body","result","stepDisplayName","stepParameter","mode","flushAllureMessagesToTask","taskName","messages","_dequeueAllMessages","task","absolutePath","spec","absolute","flushAllureMessagesToTaskAsync","args","isInteractive","config","message","rawContent","_normalizeAttachmentContent","Uint8Array","_isSerializedBuffer","candidate","isArray","hasOriginContext","window","cypressOriginContext","hasOriginWindow","cypressOriginWindow","baseUrl","currentOrigin","location","origin","cypressInstance","state","cyExists","cyTaskExists","_unused","_unused2"],"sources":["../../../src/browser/runtime.ts"],"sourcesContent":["import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, StatusDetails } from \"allure-js-commons\";\nimport { Status } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError } from \"allure-js-commons/sdk\";\nimport type { TestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport { getGlobalTestRuntime, setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\n\nimport type { AllureCypressTaskArgs, CypressMessage } from \"../types.js\";\nimport { enqueueRuntimeMessage, getRuntimeMessages, setRuntimeMessages } from \"./state.js\";\nimport { ALLURE_STEP_CMD_SUBJECT, startAllureApiStep, stopCurrentAllureApiStep } from \"./steps.js\";\nimport { uint8ArrayToBase64 } from \"./utils.js\";\n\nexport const initTestRuntime = () => setGlobalTestRuntime(new AllureCypressTestRuntime() as TestRuntime);\n\nexport const getTestRuntime = () => getGlobalTestRuntime() as AllureCypressTestRuntime;\n\ntype SerializedBuffer = {\n type: \"Buffer\";\n data: number[];\n};\n\nclass AllureCypressTestRuntime implements TestRuntime {\n constructor() {\n this.#resetMessages();\n }\n\n labels(...labels: Label[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n links(...links: Link[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n parameter(name: string, value: string, options?: ParameterOptions) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n description(markdown: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n descriptionHtml(html: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n displayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n historyId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n testCaseId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n attachment(name: string, content: Uint8Array | Buffer | string, options: AttachmentOptions) {\n const [attachmentContent, actualEncoding] = this.#buildAttachmentContent(\n content as Buffer | string | SerializedBuffer,\n );\n\n return this.#enqueueMessageAsync({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n globalAttachment(name: string, content: Uint8Array | Buffer | string, options: AttachmentOptions) {\n const [attachmentContent, actualEncoding] = this.#buildAttachmentContent(\n content as Buffer | string | SerializedBuffer,\n );\n\n return this.#enqueueMessageAsync({\n type: \"global_attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n globalAttachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"global_attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n globalError(details: StatusDetails) {\n return this.#enqueueMessageAsync({\n type: \"global_error\",\n data: details,\n });\n }\n\n logStep(name: string, status: Status = Status.PASSED, error?: Error): PromiseLike<void> {\n if (this.#isInOriginContext()) {\n startAllureApiStep(name);\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n }\n\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve();\n })\n .then(() => {\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n });\n }\n\n step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve(body());\n })\n .then((result) => {\n stopCurrentAllureApiStep();\n return result;\n });\n }\n\n stepDisplayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n name,\n },\n });\n }\n\n stepParameter(name: string, value: string, mode?: ParameterMode) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n flushAllureMessagesToTask(taskName: string) {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n cy.task(taskName, { absolutePath: Cypress.spec.absolute, messages }, { log: false });\n }\n }\n\n flushAllureMessagesToTaskAsync(taskName: string): Cypress.Chainable<unknown> | undefined {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n const args: AllureCypressTaskArgs = {\n absolutePath: Cypress.spec.absolute,\n messages,\n isInteractive: Cypress.config(\"isInteractive\"),\n };\n return cy.task(taskName, args, { log: false });\n }\n }\n\n #resetMessages() {\n setRuntimeMessages([]);\n }\n\n #enqueueMessageAsync(message: CypressMessage): PromiseLike<void> {\n enqueueRuntimeMessage(message);\n return Cypress.Promise.resolve();\n }\n\n #dequeueAllMessages() {\n const messages = getRuntimeMessages();\n this.#resetMessages();\n return messages;\n }\n\n #buildAttachmentContent(content: Buffer | string | SerializedBuffer): [string, BufferEncoding] {\n const rawContent = this.#normalizeAttachmentContent(content);\n const encoding: BufferEncoding = typeof rawContent === \"string\" ? \"utf8\" : \"base64\";\n\n return [uint8ArrayToBase64(rawContent), encoding];\n }\n\n #normalizeAttachmentContent(content: Uint8Array | Buffer | string | SerializedBuffer): string | Uint8Array {\n if (content instanceof Uint8Array || typeof content === \"string\") {\n return content;\n }\n\n if (this.#isSerializedBuffer(content)) {\n return new Uint8Array(content.data);\n }\n\n return content;\n }\n\n #isSerializedBuffer(content: unknown): content is SerializedBuffer {\n if (!content || typeof content !== \"object\") {\n return false;\n }\n\n const candidate = content as Partial<SerializedBuffer>;\n return candidate.type === \"Buffer\" && Array.isArray(candidate.data);\n }\n\n #isInOriginContext(): boolean {\n try {\n const hasOriginContext = !!(window as any).cypressOriginContext;\n const hasOriginWindow = !!(window as any).cypressOriginWindow;\n\n if (hasOriginContext || hasOriginWindow) {\n return true;\n }\n\n const baseUrl = Cypress.config(\"baseUrl\");\n const currentOrigin = window.location.origin;\n\n if (baseUrl && currentOrigin !== baseUrl) {\n return true;\n }\n\n const cypressInstance = (window as any).Cypress;\n\n if (cypressInstance && cypressInstance.state && cypressInstance.state(\"origin\")) {\n return true;\n }\n\n try {\n const cyExists = typeof cy !== \"undefined\";\n const cyTaskExists = typeof cy.task !== \"undefined\";\n\n // In cy.origin context, cy.task may not be available or may throw\n if (!cyExists || !cyTaskExists) {\n return true;\n }\n } catch {\n return true;\n }\n\n return false;\n } catch {\n return true;\n }\n }\n}\n"],"mappings":";;;;;;;;AACA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,2BAA2B,QAAQ,uBAAuB;AAEnE,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,+BAA+B;AAG1F,SAASC,qBAAqB,EAAEC,kBAAkB,EAAEC,kBAAkB,QAAQ,YAAY;AAC1F,SAASC,uBAAuB,EAAEC,kBAAkB,EAAEC,wBAAwB,QAAQ,YAAY;AAClG,SAASC,kBAAkB,QAAQ,YAAY;AAE/C,OAAO,IAAMC,eAAe,GAAGA,CAAA,KAAMR,oBAAoB,CAAC,IAAIS,wBAAwB,CAAC,CAAgB,CAAC;AAExG,OAAO,IAAMC,cAAc,GAAGA,CAAA,KAAMX,oBAAoB,CAAC,CAA6B;AAAC,IAAAY,+BAAA,oBAAAC,OAAA;AAOvF,MAAMH,wBAAwB,CAAwB;EACpDI,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CAACC,MAAM;IAE5C,IAAIH,OAAO,IAAIC,aAAa,KAAKD,OAAO,EAAE;MACxC,OAAO,IAAI;IACb;IAEA,IAAMI,eAAe,GAAIR,MAAM,CAASjC,OAAO;IAE/C,IAAIyC,eAAe,IAAIA,eAAe,CAACC,KAAK,IAAID,eAAe,CAACC,KAAK,CAAC,QAAQ,CAAC,EAAE;MAC/E,OAAO,IAAI;IACb;IAEA,IAAI;MACF,IAAMC,QAAQ,GAAG,OAAOxC,EAAE,KAAK,WAAW;MAC1C,IAAMyC,YAAY,GAAG,OAAOzC,EAAE,CAACc,IAAI,KAAK,WAAW;;MAEnD;MACA,IAAI,CAAC0B,QAAQ,IAAI,CAACC,YAAY,EAAE;QAC9B,OAAO,IAAI;MACb;IACF,CAAC,CAAC,OAAAC,OAAA,EAAM;MACN,OAAO,IAAI;IACb;IAEA,OAAO,KAAK;EACd,CAAC,CAAC,OAAAC,QAAA,EAAM;IACN,OAAO,IAAI;EACb;AACF","ignoreList":[]}
1
+ {"version":3,"file":"runtime.js","names":["Status","getMessageAndTraceFromError","getStatusFromError","isPromise","getGlobalTestRuntime","setGlobalTestRuntime","enqueueRuntimeMessage","getRuntimeMessages","setRuntimeMessages","ALLURE_STEP_CMD_SUBJECT","startAllureApiStep","stopCurrentAllureApiStep","uint8ArrayToBase64","SYNC_STEP_PURE_FUNCTION_ERROR","initTestRuntime","AllureCypressTestRuntime","getTestRuntime","_AllureCypressTestRuntime_brand","WeakSet","constructor","_classPrivateMethodInitSpec","_assertClassBrand","_resetMessages","call","sync","_createSyncRuntime","labels","_len","arguments","length","Array","_key","_enqueueMessageAsync","type","data","links","_len2","_key2","parameter","name","value","options","parameters","_objectSpread","description","markdown","descriptionHtml","html","displayName","historyId","testCaseId","attachment","content","attachmentContent","actualEncoding","_buildAttachmentContent","encoding","contentType","fileExtension","attachmentFromPath","path","globalAttachment","globalAttachmentFromPath","globalError","details","logStep","status","undefined","PASSED","error","_isInOriginContext","Cypress","Promise","resolve","cy","wrap","log","then","step","body","result","stepDisplayName","stepParameter","mode","flushAllureMessagesToTask","taskName","messages","_dequeueAllMessages","task","absolutePath","spec","absolute","flushAllureMessagesToTaskAsync","args","isInteractive","config","message","rawContent","_normalizeAttachmentContent","Uint8Array","_isSerializedBuffer","candidate","isArray","hasOriginContext","window","cypressOriginContext","hasOriginWindow","cypressOriginWindow","baseUrl","currentOrigin","location","origin","cypressInstance","state","cyExists","cyTaskExists","_unused","_unused2","_len3","_key3","_len4","_key4","console","warn","Error","err"],"sources":["../../../src/browser/runtime.ts"],"sourcesContent":["import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, StatusDetails } from \"allure-js-commons\";\nimport { Status } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError, isPromise } from \"allure-js-commons/sdk\";\nimport type { SyncTestRuntime, TestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport { getGlobalTestRuntime, setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\n\nimport type { AllureCypressTaskArgs, CypressMessage } from \"../types.js\";\nimport { enqueueRuntimeMessage, getRuntimeMessages, setRuntimeMessages } from \"./state.js\";\nimport { ALLURE_STEP_CMD_SUBJECT, startAllureApiStep, stopCurrentAllureApiStep } from \"./steps.js\";\nimport { uint8ArrayToBase64 } from \"./utils.js\";\n\nconst SYNC_STEP_PURE_FUNCTION_ERROR =\n \"allure-js-commons/sync step body must be synchronous and must not return a Promise\";\n\nexport const initTestRuntime = () => setGlobalTestRuntime(new AllureCypressTestRuntime() as TestRuntime);\n\nexport const getTestRuntime = () => getGlobalTestRuntime() as AllureCypressTestRuntime;\n\ntype SerializedBuffer = {\n type: \"Buffer\";\n data: number[];\n};\n\nclass AllureCypressTestRuntime implements TestRuntime {\n constructor() {\n this.#resetMessages();\n }\n\n get sync(): SyncTestRuntime {\n return this.#createSyncRuntime();\n }\n\n labels(...labels: Label[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n links(...links: Link[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n parameter(name: string, value: string, options?: ParameterOptions) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n description(markdown: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n descriptionHtml(html: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n displayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n historyId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n testCaseId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n attachment(name: string, content: Uint8Array | Buffer | string, options: AttachmentOptions) {\n const [attachmentContent, actualEncoding] = this.#buildAttachmentContent(\n content as Buffer | string | SerializedBuffer,\n );\n\n return this.#enqueueMessageAsync({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n globalAttachment(name: string, content: Uint8Array | Buffer | string, options: AttachmentOptions) {\n const [attachmentContent, actualEncoding] = this.#buildAttachmentContent(\n content as Buffer | string | SerializedBuffer,\n );\n\n return this.#enqueueMessageAsync({\n type: \"global_attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n globalAttachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"global_attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n globalError(details: StatusDetails) {\n return this.#enqueueMessageAsync({\n type: \"global_error\",\n data: details,\n });\n }\n\n logStep(name: string, status: Status = Status.PASSED, error?: Error): PromiseLike<void> {\n if (this.#isInOriginContext()) {\n startAllureApiStep(name);\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n }\n\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve();\n })\n .then(() => {\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n });\n }\n\n step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve(body());\n })\n .then((result) => {\n stopCurrentAllureApiStep();\n return result;\n });\n }\n\n stepDisplayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n name,\n },\n });\n }\n\n stepParameter(name: string, value: string, mode?: ParameterMode) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n flushAllureMessagesToTask(taskName: string) {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n cy.task(taskName, { absolutePath: Cypress.spec.absolute, messages }, { log: false });\n }\n }\n\n flushAllureMessagesToTaskAsync(taskName: string): Cypress.Chainable<unknown> | undefined {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n const args: AllureCypressTaskArgs = {\n absolutePath: Cypress.spec.absolute,\n messages,\n isInteractive: Cypress.config(\"isInteractive\"),\n };\n return cy.task(taskName, args, { log: false });\n }\n }\n\n #resetMessages() {\n setRuntimeMessages([]);\n }\n\n #enqueueMessageAsync(message: CypressMessage): PromiseLike<void> {\n enqueueRuntimeMessage(message);\n return Cypress.Promise.resolve();\n }\n\n #dequeueAllMessages() {\n const messages = getRuntimeMessages();\n this.#resetMessages();\n return messages;\n }\n\n #buildAttachmentContent(content: Uint8Array | Buffer | string | SerializedBuffer): [string, BufferEncoding] {\n const rawContent = this.#normalizeAttachmentContent(content);\n const encoding: BufferEncoding = typeof rawContent === \"string\" ? \"utf8\" : \"base64\";\n\n return [uint8ArrayToBase64(rawContent), encoding];\n }\n\n #normalizeAttachmentContent(content: Uint8Array | Buffer | string | SerializedBuffer): string | Uint8Array {\n if (content instanceof Uint8Array || typeof content === \"string\") {\n return content;\n }\n\n if (this.#isSerializedBuffer(content)) {\n return new Uint8Array(content.data);\n }\n\n return content;\n }\n\n #isSerializedBuffer(content: unknown): content is SerializedBuffer {\n if (!content || typeof content !== \"object\") {\n return false;\n }\n\n const candidate = content as Partial<SerializedBuffer>;\n return candidate.type === \"Buffer\" && Array.isArray(candidate.data);\n }\n\n #isInOriginContext(): boolean {\n try {\n const hasOriginContext = !!(window as any).cypressOriginContext;\n const hasOriginWindow = !!(window as any).cypressOriginWindow;\n\n if (hasOriginContext || hasOriginWindow) {\n return true;\n }\n\n const baseUrl = Cypress.config(\"baseUrl\");\n const currentOrigin = window.location.origin;\n\n if (baseUrl && currentOrigin !== baseUrl) {\n return true;\n }\n\n const cypressInstance = (window as any).Cypress;\n\n if (cypressInstance && cypressInstance.state && cypressInstance.state(\"origin\")) {\n return true;\n }\n\n try {\n const cyExists = typeof cy !== \"undefined\";\n const cyTaskExists = typeof cy.task !== \"undefined\";\n\n // In cy.origin context, cy.task may not be available or may throw\n if (!cyExists || !cyTaskExists) {\n return true;\n }\n } catch {\n return true;\n }\n\n return false;\n } catch {\n return true;\n }\n }\n\n #createSyncRuntime(): SyncTestRuntime {\n return {\n labels: (...labels) =>\n enqueueRuntimeMessage({\n type: \"metadata\",\n data: {\n labels,\n },\n }),\n links: (...links) =>\n enqueueRuntimeMessage({\n type: \"metadata\",\n data: {\n links,\n },\n }),\n parameter: (name, value, options) =>\n enqueueRuntimeMessage({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n }),\n description: (markdown) =>\n enqueueRuntimeMessage({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n }),\n descriptionHtml: (html) =>\n enqueueRuntimeMessage({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n }),\n displayName: (name) =>\n enqueueRuntimeMessage({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n }),\n historyId: (value) =>\n enqueueRuntimeMessage({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n }),\n testCaseId: (value) =>\n enqueueRuntimeMessage({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n }),\n attachment: (name, content, options) => {\n const [attachmentContent, actualEncoding] = this.#buildAttachmentContent(\n content as Uint8Array | Buffer | string | SerializedBuffer,\n );\n\n enqueueRuntimeMessage({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n },\n attachmentFromPath: (name, path, options) =>\n enqueueRuntimeMessage({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n }),\n globalAttachment: (name, content, options) => {\n const [attachmentContent, actualEncoding] = this.#buildAttachmentContent(\n content as Uint8Array | Buffer | string | SerializedBuffer,\n );\n\n enqueueRuntimeMessage({\n type: \"global_attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n },\n globalAttachmentFromPath: (name, path, options) =>\n enqueueRuntimeMessage({\n type: \"global_attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n }),\n globalError: (details) =>\n enqueueRuntimeMessage({\n type: \"global_error\",\n data: details,\n }),\n logStep: (name, status = Status.PASSED, error) => {\n startAllureApiStep(name);\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n },\n step: (name, body) => {\n startAllureApiStep(name);\n\n try {\n const result = body();\n\n if (isPromise(result)) {\n // eslint-disable-next-line no-console\n console.warn(SYNC_STEP_PURE_FUNCTION_ERROR);\n throw new Error(SYNC_STEP_PURE_FUNCTION_ERROR);\n }\n\n stopCurrentAllureApiStep();\n\n return result;\n } catch (err) {\n const error = err as Error;\n\n stopCurrentAllureApiStep(getStatusFromError(error), getMessageAndTraceFromError(error));\n throw err;\n }\n },\n stepDisplayName: (name) =>\n enqueueRuntimeMessage({\n type: \"step_metadata\",\n data: {\n name,\n },\n }),\n stepParameter: (name, value, mode) =>\n enqueueRuntimeMessage({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n }),\n };\n }\n}\n"],"mappings":";;;;;;;;AACA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,2BAA2B,EAAEC,kBAAkB,EAAEC,SAAS,QAAQ,uBAAuB;AAElG,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,+BAA+B;AAG1F,SAASC,qBAAqB,EAAEC,kBAAkB,EAAEC,kBAAkB,QAAQ,YAAY;AAC1F,SAASC,uBAAuB,EAAEC,kBAAkB,EAAEC,wBAAwB,QAAQ,YAAY;AAClG,SAASC,kBAAkB,QAAQ,YAAY;AAE/C,IAAMC,6BAA6B,GACjC,oFAAoF;AAEtF,OAAO,IAAMC,eAAe,GAAGA,CAAA,KAAMT,oBAAoB,CAAC,IAAIU,wBAAwB,CAAC,CAAgB,CAAC;AAExG,OAAO,IAAMC,cAAc,GAAGA,CAAA,KAAMZ,oBAAoB,CAAC,CAA6B;AAAC,IAAAa,+BAAA,oBAAAC,OAAA;AAOvF,MAAMH,wBAAwB,CAAwB;EACpDI,WAAWA,CAAA,EAAG;IAAA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B,IAAI,EAAE,eAAe;MACrBC,IAAI,EAAE;QACJK;MACF;IACF,CAAC,CAAC;IACJ2C,aAAa,EAAEA,CAAC3C,IAAI,EAAEC,KAAK,EAAE2C,IAAI,KAC/B7E,qBAAqB,CAAC;MACpB2B,IAAI,EAAE,eAAe;MACrBC,IAAI,EAAE;QACJQ,UAAU,EAAE,CAAC;UAAEH,IAAI;UAAEC,KAAK;UAAE2C;QAAK,CAAC;MACpC;IACF,CAAC;EACL,CAAC;AACH","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;