allure-cypress 3.10.2 → 3.11.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.
- package/dist/cjs/browser/commandLog.js +4 -0
- package/dist/cjs/browser/commandLog.js.map +1 -1
- package/dist/cjs/browser/lifecycle.js +4 -0
- package/dist/cjs/browser/lifecycle.js.map +1 -1
- package/dist/cjs/browser/serialize.js +3 -38
- package/dist/cjs/browser/serialize.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/reporter.js +16 -0
- package/dist/cjs/reporter.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/utils.js +1 -0
- package/dist/cjs/utils.js.map +1 -1
- package/dist/esm/browser/commandLog.js +5 -1
- package/dist/esm/browser/commandLog.js.map +1 -1
- package/dist/esm/browser/lifecycle.js +4 -0
- package/dist/esm/browser/lifecycle.js.map +1 -1
- package/dist/esm/browser/serialize.js +1 -36
- package/dist/esm/browser/serialize.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/reporter.js +16 -0
- package/dist/esm/reporter.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils.js +1 -0
- package/dist/esm/utils.js.map +1 -1
- package/dist/types/browser/serialize.d.ts +0 -1
- package/dist/types/browser/state.d.ts +1 -0
- package/dist/types/types.d.ts +5 -0
- package/dist/types/utils.d.ts +1 -0
- package/package.json +6 -6
package/dist/esm/reporter.js
CHANGED
|
@@ -19,6 +19,7 @@ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.h
|
|
|
19
19
|
import { ContentType, Stage, Status } from "allure-js-commons";
|
|
20
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
|
+
var _fixtureNames = /*#__PURE__*/new WeakMap();
|
|
22
23
|
var _endAllSpecs = /*#__PURE__*/new WeakMap();
|
|
23
24
|
var _applyAllureCypressMessages = /*#__PURE__*/new WeakMap();
|
|
24
25
|
var _startRun = /*#__PURE__*/new WeakMap();
|
|
@@ -53,6 +54,7 @@ export class AllureCypress {
|
|
|
53
54
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
54
55
|
_defineProperty(this, "allureRuntime", void 0);
|
|
55
56
|
_defineProperty(this, "specContextByAbsolutePath", new Map());
|
|
57
|
+
_classPrivateFieldInitSpec(this, _fixtureNames, new Map());
|
|
56
58
|
_defineProperty(this, "videoOnFailOnly", false);
|
|
57
59
|
_defineProperty(this, "attachToCypress", on => {
|
|
58
60
|
on("task", {
|
|
@@ -279,6 +281,9 @@ export class AllureCypress {
|
|
|
279
281
|
start,
|
|
280
282
|
status: undefined
|
|
281
283
|
});
|
|
284
|
+
if (context.fixture) {
|
|
285
|
+
_classPrivateFieldGet(_fixtureNames, this).set(context.fixture, name);
|
|
286
|
+
}
|
|
282
287
|
}
|
|
283
288
|
});
|
|
284
289
|
_classPrivateFieldInitSpec(this, _stopHook, (context, _ref5) => {
|
|
@@ -297,6 +302,7 @@ export class AllureCypress {
|
|
|
297
302
|
duration
|
|
298
303
|
});
|
|
299
304
|
_classPrivateFieldGet(_fixFixtureStepStops, this).call(this, fixtureUuid);
|
|
305
|
+
_classPrivateFieldGet(_fixtureNames, this).delete(fixtureUuid);
|
|
300
306
|
context.fixture = undefined;
|
|
301
307
|
}
|
|
302
308
|
});
|
|
@@ -342,7 +348,9 @@ export class AllureCypress {
|
|
|
342
348
|
});
|
|
343
349
|
var fixtureUuid = context.fixture;
|
|
344
350
|
if (fixtureUuid) {
|
|
351
|
+
var _classPrivateFieldGet2;
|
|
345
352
|
this.allureRuntime.updateFixture(fixtureUuid, setError);
|
|
353
|
+
this.allureRuntime.applyGlobalRuntimeMessages([toGlobalErrorMessage((_classPrivateFieldGet2 = _classPrivateFieldGet(_fixtureNames, this).get(fixtureUuid)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : "hook", statusDetails)]);
|
|
346
354
|
}
|
|
347
355
|
var testUuid = context.test;
|
|
348
356
|
if (testUuid) {
|
|
@@ -591,12 +599,14 @@ var createRuntimeState = allureConfig => ({
|
|
|
591
599
|
var getRuntimeConfigDefaults = function getRuntimeConfigDefaults() {
|
|
592
600
|
var {
|
|
593
601
|
stepsFromCommands: {
|
|
602
|
+
enabled = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.enabled,
|
|
594
603
|
maxArgumentLength = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength,
|
|
595
604
|
maxArgumentDepth = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth
|
|
596
605
|
} = DEFAULT_RUNTIME_CONFIG.stepsFromCommands
|
|
597
606
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_RUNTIME_CONFIG;
|
|
598
607
|
return {
|
|
599
608
|
stepsFromCommands: {
|
|
609
|
+
enabled,
|
|
600
610
|
maxArgumentDepth,
|
|
601
611
|
maxArgumentLength
|
|
602
612
|
}
|
|
@@ -641,4 +651,10 @@ export var allureCypress = (on, cypressConfig, allureConfig) => {
|
|
|
641
651
|
}
|
|
642
652
|
return allureCypressReporter;
|
|
643
653
|
};
|
|
654
|
+
var toGlobalErrorMessage = (name, details) => ({
|
|
655
|
+
type: "global_error",
|
|
656
|
+
data: _objectSpread(_objectSpread({}, details), {}, {
|
|
657
|
+
message: details.message ? "".concat(name, " failed: ").concat(details.message) : "".concat(name, " failed")
|
|
658
|
+
})
|
|
659
|
+
});
|
|
644
660
|
//# sourceMappingURL=reporter.js.map
|
package/dist/esm/reporter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,IAAAqB,S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A,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
|
+
{"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","_fixtureNames","WeakMap","_endAllSpecs","_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","_classPrivateFieldInitSpec","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","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","_classPrivateFieldGet2","applyGlobalRuntimeMessages","toGlobalErrorMessage","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","_context$fixture","shouldVideoBeAttached","videoOnFailOnly","writeAttachment","contentType","MP4","resultsDir","rest","_excluded7","writer","createRuntimeState","allureConfig","getRuntimeConfigDefaults","initialized","testPlan","projectDir","stepStack","stepsToFinalize","nextApiStepId","stepsFromCommands","enabled","maxArgumentLength","maxArgumentDepth","initializeRuntimeState","cypressConfig","env","allure","allureCypress","hasCypressConfig","allureCypressReporter","attachToCypress","details"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { ContentType, Stage, Status } from \"allure-js-commons\";\nimport type { FixtureResult, StatusDetails, 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 #fixtureNames = new Map<string, string>();\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 if (context.fixture) {\n this.#fixtureNames.set(context.fixture, name);\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 this.#fixtureNames.delete(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 this.allureRuntime.applyGlobalRuntimeMessages([\n toGlobalErrorMessage(this.#fixtureNames.get(fixtureUuid) ?? \"hook\", statusDetails),\n ]);\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 enabled = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.enabled,\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 enabled,\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\nconst toGlobalErrorMessage = (name: string, details: StatusDetails): RuntimeMessage => ({\n type: \"global_error\",\n data: {\n ...details,\n message: details.message ? `${name} failed: ${details.message}` : `${name} failed`,\n },\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,aAAA,oBAAAC,OAAA;AAAA,IAAAC,YAAA,oBAAAD,OAAA;AAAA,IAAAE,2BAAA,oBAAAF,OAAA;AAAA,IAAAG,SAAA,oBAAAH,OAAA;AAAA,IAAAI,WAAA,oBAAAJ,OAAA;AAAA,IAAAK,kBAAA,oBAAAL,OAAA;AAAA,IAAAM,UAAA,oBAAAN,OAAA;AAAA,IAAAO,oBAAA,oBAAAP,OAAA;AAAA,IAAAQ,UAAA,oBAAAR,OAAA;AAAA,IAAAS,SAAA,oBAAAT,OAAA;AAAA,IAAAU,UAAA,oBAAAV,OAAA;AAAA,IAAAW,iBAAA,oBAAAX,OAAA;AAAA,IAAAY,gBAAA,oBAAAZ,OAAA;AAAA,IAAAa,SAAA,oBAAAb,OAAA;AAAA,IAAAc,SAAA,oBAAAd,OAAA;AAAA,IAAAe,eAAA,oBAAAf,OAAA;AAAA,IAAAgB,SAAA,oBAAAhB,OAAA;AAAA,IAAAiB,uBAAA,oBAAAjB,OAAA;AAAA,IAAAkB,iBAAA,oBAAAlB,OAAA;AAAA,IAAAmB,oBA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AAY,IAAIa,aAAa,IAAI,EAAE,KAAK,IAAIA,aAAa,CAAC,EAAE;IAC/Db,YAAY,GAAGa,aAAoC;EACrD;EAEA,IAAMI,gBAAgB,GAAGJ,aAAa,IAAI,KAAK,IAAIA,aAAa;EAEhE,IAAMK,qBAAqB,GAAG,IAAIxL,aAAa,CAACsK,YAAY,CAAC;EAC7DkB,qBAAqB,CAACC,eAAe,CAAChL,EAAE,CAAC;EAEzC,IAAI8K,gBAAgB,EAAE;IACpBL,sBAAsB,CAACC,aAAa,EAAEb,YAAY,CAAC;EACrD;EAEA,OAAOkB,qBAAqB;AAC9B,CAAC;AAED,IAAMzE,oBAAoB,GAAGA,CAACjE,IAAY,EAAE4I,OAAsB,MAAsB;EACtFlJ,IAAI,EAAE,cAAc;EACpBE,IAAI,EAAAyD,aAAA,CAAAA,aAAA,KACCuF,OAAO;IACVnJ,OAAO,EAAEmJ,OAAO,CAACnJ,OAAO,MAAAuD,MAAA,CAAMhD,IAAI,eAAAgD,MAAA,CAAY4F,OAAO,CAACnJ,OAAO,OAAAuD,MAAA,CAAQhD,IAAI;EAAS;AAEtF,CAAC,CAAC","ignoreList":[]}
|
package/dist/esm/types.js.map
CHANGED
|
@@ -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 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
|
+
{"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 /**\n * If `false`, Cypress commands are no longer converted into Allure steps. Only the steps created with the\n * Allure API, e.g., `allure.step`, are reported. Defaults to `true`.\n */\n enabled: boolean;\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":[]}
|
package/dist/esm/utils.js
CHANGED
package/dist/esm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["DEFAULT_RUNTIME_CONFIG","stepsFromCommands","maxArgumentLength","maxArgumentDepth","popUntilFindIncluded","items","pred","index","findLastIndex","toReversed","splice","arr","len","length","result","Array","i","last","isDefined","value"],"sources":["../../src/utils.ts"],"sourcesContent":["export const DEFAULT_RUNTIME_CONFIG = {\n stepsFromCommands: {\n maxArgumentLength: 128,\n maxArgumentDepth: 3,\n },\n};\n\n/**\n * Pops items from an array into a new one. The item that matches the predicate is the last item to pop.\n * If there is no such item in the array, the array is left unmodified.\n * @param items An array to pop the items from.\n * @param pred A predicate that defines the last item to pop.\n * @returns An array of popped items. The first popped item becomes the first element of this array.\n */\nexport const popUntilFindIncluded = <T>(items: T[], pred: (value: T) => boolean) => {\n const index = items.findLastIndex(pred);\n return index !== -1 ? toReversed(items.splice(index)) : [];\n};\n\nexport const toReversed = <T = unknown>(arr: T[]): T[] => {\n const len = arr.length;\n const result: T[] = new Array(len);\n\n for (let i = 0; i < len; i++) {\n result[len - i - 1] = arr[i];\n }\n\n return result;\n};\n\nexport const last = <T = unknown>(arr: T[]): T | undefined => {\n return arr[arr.length - 1];\n};\n\nexport const isDefined = <T>(value: T | undefined): value is T => typeof value !== \"undefined\";\n"],"mappings":"AAAA,OAAO,IAAMA,sBAAsB,GAAG;EACpCC,iBAAiB,EAAE;IACjBC,iBAAiB,EAAE,GAAG;IACtBC,gBAAgB,EAAE;EACpB;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,oBAAoB,GAAGA,CAAIC,KAAU,EAAEC,IAA2B,KAAK;EAClF,IAAMC,KAAK,GAAGF,KAAK,CAACG,aAAa,CAACF,IAAI,CAAC;EACvC,OAAOC,KAAK,KAAK,CAAC,CAAC,GAAGE,UAAU,CAACJ,KAAK,CAACK,MAAM,CAACH,KAAK,CAAC,CAAC,GAAG,EAAE;AAC5D,CAAC;AAED,OAAO,IAAME,UAAU,GAAiBE,GAAQ,IAAU;EACxD,IAAMC,GAAG,GAAGD,GAAG,CAACE,MAAM;EACtB,IAAMC,MAAW,GAAG,IAAIC,KAAK,CAACH,GAAG,CAAC;EAElC,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,GAAG,EAAEI,CAAC,EAAE,EAAE;IAC5BF,MAAM,CAACF,GAAG,GAAGI,CAAC,GAAG,CAAC,CAAC,GAAGL,GAAG,CAACK,CAAC,CAAC;EAC9B;EAEA,OAAOF,MAAM;AACf,CAAC;AAED,OAAO,IAAMG,IAAI,GAAiBN,GAAQ,IAAoB;EAC5D,OAAOA,GAAG,CAACA,GAAG,CAACE,MAAM,GAAG,CAAC,CAAC;AAC5B,CAAC;AAED,OAAO,IAAMK,SAAS,GAAOC,KAAoB,IAAiB,OAAOA,KAAK,KAAK,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"utils.js","names":["DEFAULT_RUNTIME_CONFIG","stepsFromCommands","enabled","maxArgumentLength","maxArgumentDepth","popUntilFindIncluded","items","pred","index","findLastIndex","toReversed","splice","arr","len","length","result","Array","i","last","isDefined","value"],"sources":["../../src/utils.ts"],"sourcesContent":["export const DEFAULT_RUNTIME_CONFIG = {\n stepsFromCommands: {\n enabled: true,\n maxArgumentLength: 128,\n maxArgumentDepth: 3,\n },\n};\n\n/**\n * Pops items from an array into a new one. The item that matches the predicate is the last item to pop.\n * If there is no such item in the array, the array is left unmodified.\n * @param items An array to pop the items from.\n * @param pred A predicate that defines the last item to pop.\n * @returns An array of popped items. The first popped item becomes the first element of this array.\n */\nexport const popUntilFindIncluded = <T>(items: T[], pred: (value: T) => boolean) => {\n const index = items.findLastIndex(pred);\n return index !== -1 ? toReversed(items.splice(index)) : [];\n};\n\nexport const toReversed = <T = unknown>(arr: T[]): T[] => {\n const len = arr.length;\n const result: T[] = new Array(len);\n\n for (let i = 0; i < len; i++) {\n result[len - i - 1] = arr[i];\n }\n\n return result;\n};\n\nexport const last = <T = unknown>(arr: T[]): T | undefined => {\n return arr[arr.length - 1];\n};\n\nexport const isDefined = <T>(value: T | undefined): value is T => typeof value !== \"undefined\";\n"],"mappings":"AAAA,OAAO,IAAMA,sBAAsB,GAAG;EACpCC,iBAAiB,EAAE;IACjBC,OAAO,EAAE,IAAI;IACbC,iBAAiB,EAAE,GAAG;IACtBC,gBAAgB,EAAE;EACpB;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,oBAAoB,GAAGA,CAAIC,KAAU,EAAEC,IAA2B,KAAK;EAClF,IAAMC,KAAK,GAAGF,KAAK,CAACG,aAAa,CAACF,IAAI,CAAC;EACvC,OAAOC,KAAK,KAAK,CAAC,CAAC,GAAGE,UAAU,CAACJ,KAAK,CAACK,MAAM,CAACH,KAAK,CAAC,CAAC,GAAG,EAAE;AAC5D,CAAC;AAED,OAAO,IAAME,UAAU,GAAiBE,GAAQ,IAAU;EACxD,IAAMC,GAAG,GAAGD,GAAG,CAACE,MAAM;EACtB,IAAMC,MAAW,GAAG,IAAIC,KAAK,CAACH,GAAG,CAAC;EAElC,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,GAAG,EAAEI,CAAC,EAAE,EAAE;IAC5BF,MAAM,CAACF,GAAG,GAAGI,CAAC,GAAG,CAAC,CAAC,GAAGL,GAAG,CAACK,CAAC,CAAC;EAC9B;EAEA,OAAOF,MAAM;AACf,CAAC;AAED,OAAO,IAAMG,IAAI,GAAiBN,GAAQ,IAAoB;EAC5D,OAAOA,GAAG,CAACA,GAAG,CAACE,MAAM,GAAG,CAAC,CAAC;AAC5B,CAAC;AAED,OAAO,IAAMK,SAAS,GAAOC,KAAoB,IAAiB,OAAOA,KAAK,KAAK,WAAW","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@ export declare const setCurrentTest: (test: CypressTest) => void;
|
|
|
13
13
|
export declare const dropCurrentTest: () => void;
|
|
14
14
|
export declare const getConfig: () => {
|
|
15
15
|
stepsFromCommands: {
|
|
16
|
+
enabled: boolean;
|
|
16
17
|
maxArgumentLength: number;
|
|
17
18
|
maxArgumentDepth: number;
|
|
18
19
|
};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -185,6 +185,11 @@ export type StepFinalizer = (message: CypressStepFinalizeMessage["data"]) => voi
|
|
|
185
185
|
export type AllureSpecState = {
|
|
186
186
|
config: {
|
|
187
187
|
stepsFromCommands: {
|
|
188
|
+
/**
|
|
189
|
+
* If `false`, Cypress commands are no longer converted into Allure steps. Only the steps created with the
|
|
190
|
+
* Allure API, e.g., `allure.step`, are reported. Defaults to `true`.
|
|
191
|
+
*/
|
|
192
|
+
enabled: boolean;
|
|
188
193
|
maxArgumentLength: number;
|
|
189
194
|
maxArgumentDepth: number;
|
|
190
195
|
};
|
package/dist/types/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allure-cypress",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "Allure Cypress integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -60,26 +60,26 @@
|
|
|
60
60
|
"test": "vitest run"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"allure-js-commons": "3.
|
|
63
|
+
"allure-js-commons": "3.11.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@babel/cli": "^
|
|
66
|
+
"@babel/cli": "^8.0.1",
|
|
67
67
|
"@babel/core": "^7.28.0",
|
|
68
68
|
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
|
|
69
69
|
"@babel/preset-env": "^7.28.0",
|
|
70
70
|
"@babel/preset-typescript": "^7.27.1",
|
|
71
71
|
"@types/babel__core": "^7.20.5",
|
|
72
72
|
"@types/babel__preset-env": "^7.10.0",
|
|
73
|
-
"@types/node": "^
|
|
73
|
+
"@types/node": "^26.0.1",
|
|
74
74
|
"allure-commandline": "^2.29.0",
|
|
75
|
-
"allure-vitest": "3.
|
|
75
|
+
"allure-vitest": "3.11.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": "^9.0.2",
|
|
80
80
|
"rimraf": "^6.0.0",
|
|
81
81
|
"typescript": "^6.0.3",
|
|
82
|
-
"vitest": "^4.1.
|
|
82
|
+
"vitest": "^4.1.10"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"cypress": ">=12.17.4"
|