allure-cypress 3.8.0 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
17
17
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
18
18
  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"); }
19
19
  import { ContentType, Stage, Status } from "allure-js-commons";
20
- import { ReporterRuntime, createDefaultWriter, getEnvironmentLabels, getFrameworkLabel, getHostLabel, getLanguageLabel, getPackageLabel, getPosixPath, getProjectRoot, getRelativePath, getSuiteLabels, getThreadLabel, parseTestPlan } from "allure-js-commons/sdk/reporter";
20
+ import { ReporterRuntime, createDefaultWriter, getEnvironmentLabels, getFallbackTestCaseIdLabel, getFrameworkLabel, getHostLabel, getLanguageLabel, getPackageLabel, getPosixPath, getProjectName, getProjectRoot, getRelativePath, getSuiteLabels, getThreadLabel, md5, parseTestPlan } from "allure-js-commons/sdk/reporter";
21
21
  import { DEFAULT_RUNTIME_CONFIG, last } from "./utils.js";
22
22
  var _endAllSpecs = /*#__PURE__*/new WeakMap();
23
23
  var _applyAllureCypressMessages = /*#__PURE__*/new WeakMap();
@@ -210,12 +210,9 @@ export class AllureCypress {
210
210
  });
211
211
  });
212
212
  _classPrivateFieldInitSpec(this, _startRun, absolutePath => {
213
- // This function is executed once on `cypress run`, but it can be executed
214
- // multiple times during an interactive session (`cypress open`). Ideally,
215
- // in that case, we should remove previous result objects that haven't been
216
- // written yet, but it would've required support in ReporterRuntime.
217
- // Currently, we're discarding the entire spec context.
218
- _classPrivateFieldGet(_initializeSpecContext, this).call(this, absolutePath);
213
+ if (!this.specContextByAbsolutePath.has(absolutePath)) {
214
+ _classPrivateFieldGet(_initializeSpecContext, this).call(this, absolutePath);
215
+ }
219
216
  });
220
217
  _classPrivateFieldInitSpec(this, _startSuite, (context, _ref2) => {
221
218
  var {
@@ -320,12 +317,16 @@ export class AllureCypress {
320
317
  labels: metadataLabels = []
321
318
  } = _ref7,
322
319
  otherTestData = _objectWithoutProperties(_ref7, _excluded2);
320
+ var projectName = getProjectName();
323
321
  var posixPath = getPosixPath(context.specPath);
322
+ var fullNameBase = projectName ? "".concat(projectName, ":").concat(posixPath) : posixPath;
323
+ var legacyFullName = "".concat(posixPath, "#").concat(fullNameSuffix);
324
+ var titlePath = posixPath.split("/").concat(context.suiteNames);
324
325
  return this.allureRuntime.startTest(_objectSpread({
325
326
  stage: Stage.RUNNING,
326
- labels: [getLanguageLabel(), getFrameworkLabel("cypress"), ...getSuiteLabels(context.suiteNames), ...metadataLabels, ...getEnvironmentLabels(), getHostLabel(), getThreadLabel(), getPackageLabel(context.specPath)],
327
- fullName: "".concat(posixPath, "#").concat(fullNameSuffix),
328
- titlePath: posixPath.split("/").concat(context.suiteNames)
327
+ labels: [getLanguageLabel(), getFrameworkLabel("cypress"), ...getSuiteLabels(context.suiteNames), ...metadataLabels, ...getEnvironmentLabels(), getHostLabel(), getThreadLabel(), getPackageLabel(context.specPath), getFallbackTestCaseIdLabel(md5(legacyFullName))],
328
+ fullName: "".concat(fullNameBase, "#").concat(fullNameSuffix),
329
+ titlePath: projectName ? [projectName, ...titlePath] : titlePath
329
330
  }, otherTestData), scopes);
330
331
  });
331
332
  _classPrivateFieldInitSpec(this, _failHookAndTest, (context, _ref8) => {
@@ -582,6 +583,7 @@ var createRuntimeState = allureConfig => ({
582
583
  messages: [],
583
584
  testPlan: parseTestPlan(),
584
585
  projectDir: getProjectRoot(),
586
+ projectName: getProjectName(),
585
587
  stepStack: [],
586
588
  stepsToFinalize: [],
587
589
  nextApiStepId: 0
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.js","names":["ContentType","Stage","Status","ReporterRuntime","createDefaultWriter","getEnvironmentLabels","getFrameworkLabel","getHostLabel","getLanguageLabel","getPackageLabel","getPosixPath","getProjectRoot","getRelativePath","getSuiteLabels","getThreadLabel","parseTestPlan","DEFAULT_RUNTIME_CONFIG","last","_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","arguments","length","undefined","_defineProperty","Map","on","reportAllureCypressSpecMessages","args","_classPrivateFieldGet","call","reportFinalAllureCypressSpecMessages","isInteractive","endSpec","absolutePath","onAfterSpec","onAfterRun","spec","results","_results$video","absolute","video","endRun","allureRuntime","writeEnvironmentInfo","writeCategoriesDefinitions","specAbsolutePath","cypressVideoPath","specContext","specContextByAbsolutePath","get","delete","_classPrivateFieldInitSpec","keys","_ref","messages","forEach","message","type","context","data","_ref2","id","name","root","suiteNames","push","suiteId","scope","startScope","suiteScopes","suiteIdToScope","set","suiteScopeToId","_ref3","pop","writeScope","_ref4","scopeType","position","start","isEach","isAfterEach","testScope","fixture","startFixture","status","_ref5","duration","fixtureUuid","updateFixture","_fixture$status","PASSED","stopFixture","_ref6","fullNameSuffix","testResultData","_objectWithoutProperties","_excluded","test","videoScope","_ref7","scopes","labels","metadataLabels","otherTestData","_excluded2","posixPath","specPath","startTest","_objectSpread","stage","RUNNING","fullName","concat","titlePath","split","_ref8","statusDetails","setError","result","Object","assign","testUuid","updateTest","failed","testResult","_ref9","SKIPPED","_ref0","suites","retries","_excluded3","map","s","filter","Boolean","writeTest","_ref1","_ref10","parameters","value","toString","excluded","FINISHED","stopTest","_ref11","stop","steps","step","at","_ref12","properties","_excluded4","rootUuid","stepUuid","startStep","stepsByFrontEndId","_ref13","_excluded5","updateStep","r","stopStep","_ref14","_excluded6","applyRuntimeMessages","applyGlobalRuntimeMessages","_context$fixture","shouldVideoBeAttached","videoOnFailOnly","writeAttachment","contentType","MP4","resultsDir","rest","_excluded7","writer","createRuntimeState","allureConfig","getRuntimeConfigDefaults","initialized","testPlan","projectDir","stepStack","stepsToFinalize","nextApiStepId","stepsFromCommands","maxArgumentLength","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,SAASA,WAAW,EAAEC,KAAK,EAAEC,MAAM,QAAQ,mBAAmB;AAG9D,SACEC,eAAe,EACfC,mBAAmB,EACnBC,oBAAoB,EACpBC,iBAAiB,EACjBC,YAAY,EACZC,gBAAgB,EAChBC,eAAe,EACfC,YAAY,EACZC,cAA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OiB,qBAAqB;AAC9B,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"reporter.js","names":["ContentType","Stage","Status","ReporterRuntime","createDefaultWriter","getEnvironmentLabels","getFallbackTestCaseIdLabel","getFrameworkLabel","getHostLabel","getLanguageLabel","getPackageLabel","getPosixPath","getProjectName","getProjectRoot","getRelativePath","getSuiteLabels","getThreadLabel","md5","parseTestPlan","DEFAULT_RUNTIME_CONFIG","last","_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","arguments","length","undefined","_defineProperty","Map","on","reportAllureCypressSpecMessages","args","_classPrivateFieldGet","call","reportFinalAllureCypressSpecMessages","isInteractive","endSpec","absolutePath","onAfterSpec","onAfterRun","spec","results","_results$video","absolute","video","endRun","allureRuntime","writeEnvironmentInfo","writeCategoriesDefinitions","specAbsolutePath","cypressVideoPath","specContext","specContextByAbsolutePath","get","delete","_classPrivateFieldInitSpec","keys","_ref","messages","forEach","message","type","context","data","has","_ref2","id","name","root","suiteNames","push","suiteId","scope","startScope","suiteScopes","suiteIdToScope","set","suiteScopeToId","_ref3","pop","writeScope","_ref4","scopeType","position","start","isEach","isAfterEach","testScope","fixture","startFixture","status","_ref5","duration","fixtureUuid","updateFixture","_fixture$status","PASSED","stopFixture","_ref6","fullNameSuffix","testResultData","_objectWithoutProperties","_excluded","test","videoScope","_ref7","scopes","labels","metadataLabels","otherTestData","_excluded2","projectName","posixPath","specPath","fullNameBase","concat","legacyFullName","titlePath","split","startTest","_objectSpread","stage","RUNNING","fullName","_ref8","statusDetails","setError","result","Object","assign","testUuid","updateTest","failed","testResult","_ref9","SKIPPED","_ref0","suites","retries","_excluded3","map","s","filter","Boolean","writeTest","_ref1","_ref10","parameters","value","toString","excluded","FINISHED","stopTest","_ref11","stop","steps","step","at","_ref12","properties","_excluded4","rootUuid","stepUuid","startStep","stepsByFrontEndId","_ref13","_excluded5","updateStep","r","stopStep","_ref14","_excluded6","applyRuntimeMessages","applyGlobalRuntimeMessages","_context$fixture","shouldVideoBeAttached","videoOnFailOnly","writeAttachment","contentType","MP4","resultsDir","rest","_excluded7","writer","createRuntimeState","allureConfig","getRuntimeConfigDefaults","initialized","testPlan","projectDir","stepStack","stepsToFinalize","nextApiStepId","stepsFromCommands","maxArgumentLength","maxArgumentDepth","initializeRuntimeState","cypressConfig","env","allure","allureCypress","hasCypressConfig","allureCypressReporter","attachToCypress"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { ContentType, Stage, Status } from \"allure-js-commons\";\nimport type { FixtureResult, TestResult } from \"allure-js-commons\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFallbackTestCaseIdLabel,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getPackageLabel,\n getPosixPath,\n getProjectName,\n getProjectRoot,\n getRelativePath,\n getSuiteLabels,\n getThreadLabel,\n md5,\n parseTestPlan,\n} from \"allure-js-commons/sdk/reporter\";\nimport type Cypress from \"cypress\";\n\nimport type {\n AllureCypressConfig,\n AllureCypressTaskArgs,\n AllureSpecState,\n CypressFailMessage,\n CypressHookEndMessage,\n CypressHookStartMessage,\n CypressSkippedTestMessage,\n CypressStepFinalizeMessage,\n CypressStepStartMessage,\n CypressStepStopMessage,\n CypressSuiteEndMessage,\n CypressSuiteStartMessage,\n CypressTestEndMessage,\n CypressTestSkipMessage,\n CypressTestStartMessage,\n SpecContext,\n} from \"./types.js\";\nimport { DEFAULT_RUNTIME_CONFIG, last } from \"./utils.js\";\n\nexport class AllureCypress {\n allureRuntime: ReporterRuntime;\n specContextByAbsolutePath = new Map<string, SpecContext>();\n videoOnFailOnly: boolean = false;\n\n constructor(config: AllureCypressConfig = {}) {\n const { resultsDir, videoOnFailOnly = false, ...rest } = config;\n\n this.videoOnFailOnly = videoOnFailOnly;\n this.allureRuntime = new ReporterRuntime({\n writer: createDefaultWriter({ resultsDir }),\n ...rest,\n });\n }\n\n attachToCypress = (on: Cypress.PluginEvents) => {\n on(\"task\", {\n reportAllureCypressSpecMessages: (args: AllureCypressTaskArgs) => {\n this.#applyAllureCypressMessages(args);\n return null;\n },\n reportFinalAllureCypressSpecMessages: (args: AllureCypressTaskArgs) => {\n this.#applyAllureCypressMessages(args);\n if (args.isInteractive) {\n // In non-interactive mode the spec is ended via the 'after:spec' event instead\n // to get the spec's video.\n this.endSpec(args.absolutePath);\n }\n return null;\n },\n });\n\n // Emits the remaining fixtures and writes the video of the spec.\n // In interactive mode it's invoked through the `reportFinalAllureCypressSpecMessages` task.\n on(\"after:spec\", this.onAfterSpec);\n\n // Emits the categories and env info. Doesn't work in interactive mode unless\n // `experimentalInteractiveRunEvents` is set.\n on(\"after:run\", this.onAfterRun);\n };\n\n /**\n * Forward the `after:spec` event into Allure Cypress using this function if\n * you need to define your own handler or combine Allure Cypress with other\n * plugins. More info [here](https://github.com/allure-framework/allure-js/blob/main/packages/allure-cypress/README.md#setupnodeevents-limitations).\n * @param spec The first argument of the `after:spec` event.\n * @param results The second argument of the `after:spec` event. It's `undefined` in interactive mode.\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * setupNodeEvents: (on, config) => {\n * const allureReporter = allureCypress(on, config);\n * on(\"after:spec\", (spec, results) => {\n * allureReporter.onAfterSpec(spec, results);\n * });\n * return config;\n * }\n * // ...\n * });\n * ```\n */\n onAfterSpec = (spec: Cypress.Spec, results: CypressCommandLine.RunResult | undefined) => {\n this.endSpec(spec.absolute, results?.video ?? undefined);\n };\n\n /**\n * Forward the `after:run` event into Allure Cypress using this function if\n * you need to define your own handler or combine Allure Cypress with other\n * plugins. More info [here](https://github.com/allure-framework/allure-js/blob/main/packages/allure-cypress/README.md#setupnodeevents-limitations).\n * @param results The argument of the `after:run` event. It's `undefined` in interactive mode.\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * setupNodeEvents: (on, config) => {\n * const allureReporter = allureCypress(on, config);\n * on(\"after:run\", (results) => {\n * allureReporter.onAfterRun(results);\n * });\n * return config;\n * }\n * // ...\n * });\n * ```\n */\n onAfterRun = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n results: CypressCommandLine.CypressFailedRunResult | CypressCommandLine.CypressRunResult | undefined,\n ) => {\n this.endRun();\n };\n\n endRun = () => {\n this.#endAllSpecs();\n this.allureRuntime.writeEnvironmentInfo();\n this.allureRuntime.writeCategoriesDefinitions();\n };\n\n endSpec = (specAbsolutePath: string, cypressVideoPath?: string) => {\n const specContext = this.specContextByAbsolutePath.get(specAbsolutePath);\n if (specContext) {\n this.#attachSpecVideo(specContext, cypressVideoPath);\n this.#emitRemainingScopes(specContext);\n this.specContextByAbsolutePath.delete(specAbsolutePath);\n }\n };\n\n #endAllSpecs = () => {\n for (const specAbsolutePath of this.specContextByAbsolutePath.keys()) {\n this.endSpec(specAbsolutePath);\n }\n };\n\n #applyAllureCypressMessages = ({ messages, absolutePath }: AllureCypressTaskArgs) => {\n messages.forEach((message) => {\n if (message.type === \"cypress_run_start\") {\n this.#startRun(absolutePath);\n return;\n }\n\n const context = this.specContextByAbsolutePath.get(absolutePath);\n if (!context) {\n return;\n }\n\n switch (message.type) {\n case \"cypress_suite_start\":\n this.#startSuite(context, message);\n break;\n case \"cypress_suite_end\":\n this.#stopSuite(context, message);\n break;\n case \"cypress_hook_start\":\n this.#startHook(context, message);\n break;\n case \"cypress_hook_end\":\n this.#stopHook(context, message);\n break;\n case \"cypress_test_start\":\n this.#startTest(context, message);\n break;\n case \"cypress_test_pass\":\n this.#passTest(context);\n break;\n case \"cypress_fail\":\n this.#failHookAndTest(context, message);\n break;\n case \"cypress_test_skip\":\n this.#skipTest(context, message);\n break;\n case \"cypress_skipped_test\":\n this.#addSkippedTest(context, message);\n break;\n case \"cypress_test_end\":\n this.#stopTest(context, message);\n break;\n case \"cypress_step_start\":\n this.#startStep(context, message.data);\n break;\n case \"cypress_step_stop\":\n this.#stopStep(context, message.data);\n break;\n case \"cypress_step_finalize\":\n this.#finalizeStep(context, message.data);\n break;\n default:\n this.#applyRuntimeApiMessages(context, message);\n break;\n }\n });\n };\n\n #startRun = (absolutePath: string) => {\n if (!this.specContextByAbsolutePath.has(absolutePath)) {\n this.#initializeSpecContext(absolutePath);\n }\n };\n\n #startSuite = (context: SpecContext, { data: { id, name, root } }: CypressSuiteStartMessage) => {\n this.#pushNewSuiteScope(context, id);\n if (!root) {\n this.#emitPreviousTestScope(context);\n context.suiteNames.push(name);\n }\n };\n\n #pushNewSuiteScope = (context: SpecContext, suiteId: string) => {\n const scope = this.allureRuntime.startScope();\n context.suiteScopes.push(scope);\n context.suiteIdToScope.set(suiteId, scope);\n context.suiteScopeToId.set(scope, suiteId);\n return scope;\n };\n\n #stopSuite = (context: SpecContext, { data: { root } }: CypressSuiteEndMessage) => {\n this.#emitPreviousTestScope(context);\n if (!root) {\n context.suiteNames.pop();\n }\n this.#writeLastSuiteScope(context);\n };\n\n #writeLastSuiteScope = (context: SpecContext) => {\n const scope = context.suiteScopes.pop();\n if (scope) {\n const suiteId = context.suiteScopeToId.get(scope);\n if (suiteId) {\n context.suiteScopeToId.delete(scope);\n context.suiteIdToScope.delete(suiteId);\n }\n this.allureRuntime.writeScope(scope);\n }\n };\n\n #startHook = (context: SpecContext, { data: { name, scopeType, position, start } }: CypressHookStartMessage) => {\n const isEach = scopeType === \"each\";\n const isAfterEach = position === \"after\" && isEach;\n if (!isAfterEach) {\n this.#emitPreviousTestScope(context);\n }\n\n const scope = isEach ? context.testScope : last(context.suiteScopes);\n if (scope) {\n context.fixture = this.allureRuntime.startFixture(scope, position, {\n name,\n start,\n status: undefined,\n });\n }\n };\n\n #stopHook = (context: SpecContext, { data: { duration } }: CypressHookEndMessage) => {\n const fixtureUuid = context.fixture;\n if (fixtureUuid) {\n this.allureRuntime.updateFixture(fixtureUuid, (fixture) => {\n fixture.status ??= Status.PASSED;\n });\n this.allureRuntime.stopFixture(fixtureUuid, { duration });\n this.#fixFixtureStepStops(fixtureUuid);\n context.fixture = undefined;\n }\n };\n\n #startTest = (context: SpecContext, { data: { fullNameSuffix, ...testResultData } }: CypressTestStartMessage) => {\n this.#emitPreviousTestScope(context);\n const testScope = this.allureRuntime.startScope();\n context.testScope = testScope;\n context.test = this.#addNewTestResult(context, fullNameSuffix, testResultData, [\n context.videoScope,\n ...context.suiteScopes,\n testScope,\n ]);\n };\n\n #addNewTestResult = (\n context: SpecContext,\n fullNameSuffix: string,\n { labels: metadataLabels = [], ...otherTestData }: Partial<TestResult>,\n scopes: string[],\n ) => {\n const projectName = getProjectName();\n const posixPath = getPosixPath(context.specPath);\n const fullNameBase = projectName ? `${projectName}:${posixPath}` : posixPath;\n const legacyFullName = `${posixPath}#${fullNameSuffix}`;\n\n const titlePath = posixPath.split(\"/\").concat(context.suiteNames);\n\n return this.allureRuntime.startTest(\n {\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"cypress\"),\n ...getSuiteLabels(context.suiteNames),\n ...metadataLabels,\n ...getEnvironmentLabels(),\n getHostLabel(),\n getThreadLabel(),\n getPackageLabel(context.specPath),\n getFallbackTestCaseIdLabel(md5(legacyFullName)),\n ],\n fullName: `${fullNameBase}#${fullNameSuffix}`,\n titlePath: projectName ? [projectName, ...titlePath] : titlePath,\n ...otherTestData,\n },\n scopes,\n );\n };\n\n #failHookAndTest = (context: SpecContext, { data: { status, statusDetails } }: CypressFailMessage) => {\n const setError = (result: object) => Object.assign(result, { status, statusDetails });\n\n const fixtureUuid = context.fixture;\n if (fixtureUuid) {\n this.allureRuntime.updateFixture(fixtureUuid, setError);\n }\n\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, setError);\n }\n\n context.failed = true;\n };\n\n #passTest = (context: SpecContext) => {\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.status = Status.PASSED;\n });\n }\n };\n\n #skipTest = (context: SpecContext, { data: { statusDetails } }: CypressTestSkipMessage) => {\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.status = Status.SKIPPED;\n if (statusDetails) {\n testResult.statusDetails = statusDetails;\n }\n });\n }\n };\n\n #addSkippedTest = (\n context: SpecContext,\n { data: { fullNameSuffix, suites, duration, retries, ...testResultData } }: CypressSkippedTestMessage,\n ) => {\n // Tests skipped because of a hook error may share all suites of the current context\n // or just a part thereof (if it's from a sibling suite).\n const scopes = suites.map((s) => context.suiteIdToScope.get(s)).filter((s): s is string => Boolean(s));\n\n const testUuid = this.#addNewTestResult(context, fullNameSuffix, testResultData, [context.videoScope, ...scopes]);\n this.#stopExistingTestResult(testUuid, { duration, retries });\n this.allureRuntime.writeTest(testUuid);\n };\n\n #stopTest = (context: SpecContext, { data }: CypressTestEndMessage) => {\n const testUuid = context.test;\n if (testUuid) {\n this.#stopExistingTestResult(testUuid, data);\n this.allureRuntime.writeTest(testUuid);\n context.test = undefined;\n }\n };\n\n #stopExistingTestResult = (testUuid: string, { retries, duration }: CypressTestEndMessage[\"data\"]) => {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n if (retries > 0) {\n testResult.parameters.push({\n name: \"Retry\",\n value: retries.toString(),\n excluded: true,\n });\n }\n testResult.stage = Stage.FINISHED;\n });\n this.allureRuntime.stopTest(testUuid, { duration });\n this.#fixTestStepStops(testUuid);\n };\n\n #fixTestStepStops = (testUuid: string) => {\n this.allureRuntime.updateTest(testUuid, this.#fixStepStops);\n };\n\n #fixFixtureStepStops = (fixtureUuid: string) => {\n this.allureRuntime.updateFixture(fixtureUuid, this.#fixStepStops);\n };\n\n #fixStepStops = ({ stop, steps = [] }: TestResult | FixtureResult) => {\n if (stop) {\n // In some circumstances, steps becomes dangling and are stopped at the test end/hook end events, which happen\n // chronologically after the test or fixture ends. This leads to the steps' stop time being greater than the one\n // of the test/fixture.\n // The only steps that may be affected are the rightmost descendants of the test/fixture.\n for (let step = steps.at(-1); step; step = step.steps.at(-1)) {\n if (step.stop && step.stop > stop) {\n step.stop = stop;\n } else {\n // Steps are always stopped child-to-parent. If a step's stop time is OK, its substeps are also correct.\n return;\n }\n }\n }\n };\n\n #startStep = (context: SpecContext, { id, ...properties }: CypressStepStartMessage[\"data\"]) => {\n const rootUuid = this.#resolveRootUuid(context);\n if (rootUuid) {\n const stepUuid = this.allureRuntime.startStep(rootUuid, undefined, properties);\n if (stepUuid) {\n context.stepsByFrontEndId.set(id, stepUuid);\n }\n }\n };\n\n #stopStep = (context: SpecContext, { id, stop, ...properties }: CypressStepStopMessage[\"data\"]) => {\n const stepUuid = context.stepsByFrontEndId.get(id);\n if (stepUuid) {\n this.allureRuntime.updateStep(stepUuid, (r) => {\n Object.assign(r, properties);\n });\n this.allureRuntime.stopStep(stepUuid, { stop });\n }\n };\n\n #finalizeStep = (context: SpecContext, { id, ...properties }: CypressStepFinalizeMessage[\"data\"]) => {\n const stepUuid = context.stepsByFrontEndId.get(id);\n if (stepUuid) {\n this.allureRuntime.updateStep(stepUuid, (r) => {\n Object.assign(r, properties);\n });\n context.stepsByFrontEndId.delete(id);\n }\n };\n\n #applyRuntimeApiMessages = (context: SpecContext, message: RuntimeMessage) => {\n const rootUuid = this.#resolveRootUuid(context);\n if (rootUuid) {\n this.allureRuntime.applyRuntimeMessages(rootUuid, [message]);\n } else {\n this.allureRuntime.applyGlobalRuntimeMessages([message]);\n }\n };\n\n /**\n * We must defer emitting a test's scope until we receive all the test's `afterEach` hooks.\n * At the same time, we should report it as early as we can. That means we should call this\n * method in the following cases:\n * - when an `after` hook of the test starts (`after` hooks are called later than `afterEach`)\n * - when a `before` or `beforeEach` hook of the next test starts (in case the next test has `before`/`beforeEach` hooks)\n * - when the next test starts (in case the next test doesn't have `before`/`beforeEach` hooks)\n * - when the test's suite ends (in case the test is the last one in its suite, including the root suite of the spec)\n * - when a nested suite starts\n * - when the spec ends\n */\n #emitPreviousTestScope = (context: SpecContext) => {\n const testScope = context.testScope;\n\n // Checking the test allows us to tell `beforeEach` and `afterEach` apart.\n // Here we're interested in `afterEach` only.\n if (!context.test && testScope) {\n this.allureRuntime.writeScope(testScope);\n context.testScope = undefined;\n }\n };\n\n #resolveRootUuid = (context: SpecContext) => context.fixture ?? context.test;\n\n #attachSpecVideo = (context: SpecContext, cypressVideoPath?: string) => {\n const shouldVideoBeAttached = (!this.videoOnFailOnly || context.failed) && cypressVideoPath;\n if (shouldVideoBeAttached) {\n const fixtureUuid = this.allureRuntime.startFixture(context.videoScope, \"after\", {\n name: \"Cypress video\",\n status: Status.PASSED,\n stage: Stage.FINISHED,\n })!;\n this.allureRuntime.writeAttachment(fixtureUuid, undefined, \"Cypress video\", cypressVideoPath, {\n contentType: ContentType.MP4,\n });\n this.allureRuntime.stopFixture(fixtureUuid);\n this.allureRuntime.writeScope(context.videoScope);\n }\n };\n\n #emitRemainingScopes = (context: SpecContext) => {\n this.#emitPreviousTestScope(context);\n context.suiteScopes.forEach((scope) => {\n this.allureRuntime.writeScope(scope);\n });\n };\n\n #initializeSpecContext = (absolutePath: string) => {\n const specPath = getRelativePath(absolutePath);\n const context: SpecContext = {\n specPath,\n test: undefined,\n fixture: undefined,\n stepsByFrontEndId: new Map(),\n videoScope: this.allureRuntime.startScope(),\n suiteIdToScope: new Map(),\n suiteScopeToId: new Map(),\n suiteScopes: [],\n testScope: undefined,\n suiteNames: [],\n failed: false,\n };\n this.specContextByAbsolutePath.set(absolutePath, context);\n };\n}\n\nconst createRuntimeState = (allureConfig?: AllureCypressConfig): AllureSpecState => ({\n config: getRuntimeConfigDefaults(allureConfig),\n initialized: false,\n messages: [],\n testPlan: parseTestPlan(),\n projectDir: getProjectRoot(),\n projectName: getProjectName(),\n stepStack: [],\n stepsToFinalize: [],\n nextApiStepId: 0,\n});\n\nconst getRuntimeConfigDefaults = ({\n stepsFromCommands: {\n maxArgumentLength = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength,\n maxArgumentDepth = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth,\n } = DEFAULT_RUNTIME_CONFIG.stepsFromCommands,\n}: AllureCypressConfig = DEFAULT_RUNTIME_CONFIG): AllureSpecState[\"config\"] => ({\n stepsFromCommands: {\n maxArgumentDepth,\n maxArgumentLength,\n },\n});\n\nconst initializeRuntimeState = (cypressConfig: Cypress.PluginConfigOptions, allureConfig?: AllureCypressConfig) => {\n cypressConfig.env.allure = createRuntimeState(allureConfig);\n return cypressConfig;\n};\n\n/**\n * Sets up Allure Cypress.\n * @param on The function used to subscribe to Cypress Node events (it's the first argument of `setupNodeEvents`).\n * @param cypressConfig The Cypress configuration (the second argument of `setupNodeEvents`). If provided, the selective run feature will be enabled.\n * @param allureConfig An Allure configuration object (optional).\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * e2e: {\n * setupNodeEvents: (on, config) => {\n * allureCypress(on, config, { videoOnFailOnly: true });\n * return config;\n * },\n * // ...\n * }\n * });\n * ```\n */\nexport const allureCypress = (\n on: Cypress.PluginEvents,\n cypressConfig?: Cypress.PluginConfigOptions,\n allureConfig?: AllureCypressConfig,\n) => {\n // Backward compatibility; mainly for JS users who have no type hints\n if (!allureConfig && cypressConfig && !(\"env\" in cypressConfig)) {\n allureConfig = cypressConfig as AllureCypressConfig;\n }\n\n const hasCypressConfig = cypressConfig && \"env\" in cypressConfig;\n\n const allureCypressReporter = new AllureCypress(allureConfig);\n allureCypressReporter.attachToCypress(on);\n\n if (hasCypressConfig) {\n initializeRuntimeState(cypressConfig, allureConfig);\n }\n\n return allureCypressReporter;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAASA,WAAW,EAAEC,KAAK,EAAEC,MAAM,QAAQ,mBAAmB;AAG9D,SACEC,eAAe,EACfC,mBAAmB,EACnBC,oBAAoB,EACpBC,0BAA0B,EAC1BC,iBAAiB,EACjBC,YAAY,EACZC,gBAAgB,EAChBC,eAAe,EACfC,YAAY,EACZC,cAAc,EACdC,cAAc,EACdC,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,GAAG,EACHC,aAAa,QACR,gCAAgC;AAqBvC,SAASC,sBAAsB,EAAEC,IAAI,QAAQ,YAAY;AAAC,IAAAC,YAAA,oBAAAC,OAAA;AAAA,IAAAC,2BAAA,oBAAAD,OAAA;AAAA,IAAAE,SAAA,oBAAAF,OAAA;AAAA,IAAAG,WAAA,oBAAAH,OAAA;AAAA,IAAAI,kBAAA,oBAAAJ,OAAA;AAAA,IAAAK,UAAA,oBAAAL,OAAA;AAAA,IAAAM,oBAAA,oBAAAN,OAAA;AAAA,IAAAO,UAAA,oBAAAP,OAAA;AAAA,IAAAQ,SAAA,oBAAAR,OAAA;AAAA,IAAAS,UAAA,oBAAAT,OAAA;AAAA,IAAAU,iBAAA,oBAAAV,OAAA;AAAA,IAAAW,gBAAA,oBAAAX,OAAA;AAAA,IAAAY,SAAA,oBAAAZ,OAAA;AAAA,IAAAa,SAAA,oBAAAb,OAAA;AAAA,IAAAc,eAAA,oBAAAd,OAAA;AAAA,IAAAe,SAAA,oBAAAf,OAAA;AAAA,IAAAgB,uBAAA,oBAAAhB,OAAA;AAAA,IAAAiB,iBAAA,oBAAAjB,OAAA;AAAA,IAAAkB,oBAAA,oBAAAlB,OAAA;AAAA,IAAAmB,aAAA,oBAAAnB,OAAA;AAAA,IAAAoB,UAAA,oBAAApB,OAAA;AAAA,IAA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E,SAAA,GAAAF,SAAA,MAAGnC,sBAAsB;EAAA,OAAiC;IAC9E4M,iBAAiB,EAAE;MACjBE,gBAAgB;MAChBD;IACF;EACF,CAAC;AAAA,CAAC;AAEF,IAAME,sBAAsB,GAAGA,CAACC,aAA0C,EAAEZ,YAAkC,KAAK;EACjHY,aAAa,CAACC,GAAG,CAACC,MAAM,GAAGf,kBAAkB,CAACC,YAAY,CAAC;EAC3D,OAAOY,aAAa;AACtB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMG,aAAa,GAAGA,CAC3B3K,EAAwB,EACxBwK,aAA2C,EAC3CZ,YAAkC,KAC/B;EACH;EACA,IAAI,CAACA,YAAY,IAAIY,aAAa,IAAI,EAAE,KAAK,IAAIA,aAAa,CAAC,EAAE;IAC/DZ,YAAY,GAAGY,aAAoC;EACrD;EAEA,IAAMI,gBAAgB,GAAGJ,aAAa,IAAI,KAAK,IAAIA,aAAa;EAEhE,IAAMK,qBAAqB,GAAG,IAAIrL,aAAa,CAACoK,YAAY,CAAC;EAC7DiB,qBAAqB,CAACC,eAAe,CAAC9K,EAAE,CAAC;EAEzC,IAAI4K,gBAAgB,EAAE;IACpBL,sBAAsB,CAACC,aAAa,EAAEZ,YAAY,CAAC;EACrD;EAEA,OAAOiB,qBAAqB;AAC9B,CAAC","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":[]}
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, StatusDetails } from "allure-js-commons";
4
2
  import { Status } from "allure-js-commons";
5
3
  import type { SyncTestRuntime, TestRuntime } from "allure-js-commons/sdk/runtime";
@@ -7,6 +7,7 @@ export declare const setRuntimeMessages: (value: CypressMessage[]) => void;
7
7
  export declare const enqueueRuntimeMessage: (message: CypressMessage) => void;
8
8
  export declare const getAllureTestPlan: () => import("allure-js-commons/sdk").TestPlanV1 | null | undefined;
9
9
  export declare const getProjectDir: () => string | undefined;
10
+ export declare const getProjectName: () => string | undefined;
10
11
  export declare const getCurrentTest: () => CypressTest | undefined;
11
12
  export declare const setCurrentTest: (test: CypressTest) => void;
12
13
  export declare const dropCurrentTest: () => void;
@@ -23,16 +23,16 @@ export declare const getTestSkipData: () => {
23
23
  export declare const getStepStopData: (step: StepDescriptor, status?: Status, statusDetails?: StatusDetails) => {
24
24
  id: string;
25
25
  status: Status;
26
- statusDetails?: StatusDetails | undefined;
26
+ statusDetails?: StatusDetails;
27
27
  stop: number;
28
28
  };
29
29
  export declare const markTestAsReported: (test: CypressTest) => void;
30
30
  export declare const isTestReported: (test: CypressTest) => boolean;
31
31
  export declare const iterateSuites: (parent: CypressSuite) => Generator<CypressSuite, void, unknown>;
32
32
  export declare const iterateTests: (parent: CypressSuite) => Generator<Mocha.Test & {
33
- wallClockStartedAt?: Date | undefined;
33
+ wallClockStartedAt?: Date;
34
34
  parent: CypressSuite | undefined;
35
- }, void, undefined>;
35
+ }, void, unknown>;
36
36
  export declare const getSuitePath: (test: CypressTest) => CypressSuite[];
37
37
  export declare const getSuiteTitlePath: (test: CypressTest) => string[];
38
38
  export declare const generateApiStepId: () => string;
@@ -1,5 +1,4 @@
1
1
  import { ReporterRuntime } from "allure-js-commons/sdk/reporter";
2
- import type Cypress from "cypress";
3
2
  import type { AllureCypressConfig, SpecContext } from "./types.js";
4
3
  export declare class AllureCypress {
5
4
  #private;
@@ -192,6 +192,7 @@ export type AllureSpecState = {
192
192
  initialized: boolean;
193
193
  testPlan: TestPlanV1 | null | undefined;
194
194
  projectDir?: string;
195
+ projectName?: string;
195
196
  messages: CypressMessage[];
196
197
  currentTest?: CypressTest;
197
198
  stepStack: StepDescriptor[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure-cypress",
3
- "version": "3.8.0",
3
+ "version": "3.10.0",
4
4
  "description": "Allure Cypress integration",
5
5
  "keywords": [
6
6
  "allure",
@@ -60,7 +60,7 @@
60
60
  "test": "vitest run"
61
61
  },
62
62
  "dependencies": {
63
- "allure-js-commons": "3.8.0"
63
+ "allure-js-commons": "3.10.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@babel/cli": "^7.28.0",
@@ -72,14 +72,14 @@
72
72
  "@types/babel__preset-env": "^7.10.0",
73
73
  "@types/node": "^20.19.0",
74
74
  "allure-commandline": "^2.29.0",
75
- "allure-vitest": "3.8.0",
75
+ "allure-vitest": "3.10.0",
76
76
  "babel-plugin-add-module-exports": "^1.0.4",
77
77
  "cypress": "^15.0.0",
78
78
  "esbuild": "^0.27.0",
79
79
  "npm-run-all2": "^8.0.0",
80
80
  "rimraf": "^6.0.0",
81
- "typescript": "^5.2.2",
82
- "vitest": "^4.0.18"
81
+ "typescript": "^6.0.3",
82
+ "vitest": "^4.1.0"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "cypress": ">=12.17.4"