allure-cypress 3.2.2 → 3.3.1
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 +18 -25
- package/dist/cjs/browser/commandLog.js.map +1 -1
- package/dist/cjs/browser/events/mocha.js +1 -1
- package/dist/cjs/browser/events/mocha.js.map +1 -1
- package/dist/cjs/browser/utils.js +12 -1
- package/dist/cjs/browser/utils.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/reporter.js +23 -21
- package/dist/cjs/reporter.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/browser/commandLog.js +18 -25
- package/dist/esm/browser/commandLog.js.map +1 -1
- package/dist/esm/browser/events/mocha.js +1 -1
- package/dist/esm/browser/events/mocha.js.map +1 -1
- package/dist/esm/browser/serialize.js +1 -1
- package/dist/esm/browser/serialize.js.map +1 -1
- package/dist/esm/browser/utils.js +9 -0
- package/dist/esm/browser/utils.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/reporter.js +23 -21
- package/dist/esm/reporter.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/types/browser/utils.d.ts +3 -1
- package/dist/types/types.d.ts +9 -7
- package/package.json +10 -10
package/dist/esm/reporter.js
CHANGED
|
@@ -7,8 +7,8 @@ var _excluded = ["fullNameSuffix"],
|
|
|
7
7
|
_excluded7 = ["resultsDir", "videoOnFailOnly"];
|
|
8
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o)
|
|
11
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n)
|
|
10
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
11
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
12
12
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
13
13
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
14
14
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -320,10 +320,12 @@ export class AllureCypress {
|
|
|
320
320
|
labels: metadataLabels = []
|
|
321
321
|
} = _ref7,
|
|
322
322
|
otherTestData = _objectWithoutProperties(_ref7, _excluded2);
|
|
323
|
+
var posixPath = getPosixPath(context.specPath);
|
|
323
324
|
return this.allureRuntime.startTest(_objectSpread({
|
|
324
325
|
stage: Stage.RUNNING,
|
|
325
326
|
labels: [getLanguageLabel(), getFrameworkLabel("cypress"), ...getSuiteLabels(context.suiteNames), ...metadataLabels, ...getEnvironmentLabels(), getHostLabel(), getThreadLabel(), getPackageLabel(context.specPath)],
|
|
326
|
-
fullName: "".concat(
|
|
327
|
+
fullName: "".concat(posixPath, "#").concat(fullNameSuffix),
|
|
328
|
+
titlePath: posixPath.split("/").concat(context.suiteNames)
|
|
327
329
|
}, otherTestData), scopes);
|
|
328
330
|
});
|
|
329
331
|
_classPrivateFieldInitSpec(this, _failHookAndTest, (context, _ref8) => {
|
|
@@ -371,7 +373,7 @@ export class AllureCypress {
|
|
|
371
373
|
});
|
|
372
374
|
}
|
|
373
375
|
});
|
|
374
|
-
_classPrivateFieldInitSpec(this, _addSkippedTest, (context,
|
|
376
|
+
_classPrivateFieldInitSpec(this, _addSkippedTest, (context, _ref0) => {
|
|
375
377
|
var {
|
|
376
378
|
data: {
|
|
377
379
|
fullNameSuffix,
|
|
@@ -379,8 +381,8 @@ export class AllureCypress {
|
|
|
379
381
|
duration,
|
|
380
382
|
retries
|
|
381
383
|
}
|
|
382
|
-
} =
|
|
383
|
-
testResultData = _objectWithoutProperties(
|
|
384
|
+
} = _ref0,
|
|
385
|
+
testResultData = _objectWithoutProperties(_ref0.data, _excluded3);
|
|
384
386
|
// Tests skipped because of a hook error may share all suites of the current context
|
|
385
387
|
// or just a part thereof (if it's from a sibling suite).
|
|
386
388
|
var scopes = suites.map(s => context.suiteIdToScope.get(s)).filter(s => Boolean(s));
|
|
@@ -391,10 +393,10 @@ export class AllureCypress {
|
|
|
391
393
|
});
|
|
392
394
|
this.allureRuntime.writeTest(testUuid);
|
|
393
395
|
});
|
|
394
|
-
_classPrivateFieldInitSpec(this, _stopTest, (context,
|
|
396
|
+
_classPrivateFieldInitSpec(this, _stopTest, (context, _ref1) => {
|
|
395
397
|
var {
|
|
396
398
|
data
|
|
397
|
-
} =
|
|
399
|
+
} = _ref1;
|
|
398
400
|
var testUuid = context.test;
|
|
399
401
|
if (testUuid) {
|
|
400
402
|
_classPrivateFieldGet(_stopExistingTestResult, this).call(this, testUuid, data);
|
|
@@ -402,11 +404,11 @@ export class AllureCypress {
|
|
|
402
404
|
context.test = undefined;
|
|
403
405
|
}
|
|
404
406
|
});
|
|
405
|
-
_classPrivateFieldInitSpec(this, _stopExistingTestResult, (testUuid,
|
|
407
|
+
_classPrivateFieldInitSpec(this, _stopExistingTestResult, (testUuid, _ref10) => {
|
|
406
408
|
var {
|
|
407
409
|
retries,
|
|
408
410
|
duration
|
|
409
|
-
} =
|
|
411
|
+
} = _ref10;
|
|
410
412
|
this.allureRuntime.updateTest(testUuid, testResult => {
|
|
411
413
|
if (retries > 0) {
|
|
412
414
|
testResult.parameters.push({
|
|
@@ -428,11 +430,11 @@ export class AllureCypress {
|
|
|
428
430
|
_classPrivateFieldInitSpec(this, _fixFixtureStepStops, fixtureUuid => {
|
|
429
431
|
this.allureRuntime.updateFixture(fixtureUuid, _classPrivateFieldGet(_fixStepStops, this));
|
|
430
432
|
});
|
|
431
|
-
_classPrivateFieldInitSpec(this, _fixStepStops,
|
|
433
|
+
_classPrivateFieldInitSpec(this, _fixStepStops, _ref11 => {
|
|
432
434
|
var {
|
|
433
435
|
stop,
|
|
434
436
|
steps = []
|
|
435
|
-
} =
|
|
437
|
+
} = _ref11;
|
|
436
438
|
if (stop) {
|
|
437
439
|
// In some circumstances, steps becomes dangling and are stopped at the test end/hook end events, which happen
|
|
438
440
|
// chronologically after the test or fixture ends. This leads to the steps' stop time being greater than the one
|
|
@@ -448,11 +450,11 @@ export class AllureCypress {
|
|
|
448
450
|
}
|
|
449
451
|
}
|
|
450
452
|
});
|
|
451
|
-
_classPrivateFieldInitSpec(this, _startStep, (context,
|
|
453
|
+
_classPrivateFieldInitSpec(this, _startStep, (context, _ref12) => {
|
|
452
454
|
var {
|
|
453
455
|
id
|
|
454
|
-
} =
|
|
455
|
-
properties = _objectWithoutProperties(
|
|
456
|
+
} = _ref12,
|
|
457
|
+
properties = _objectWithoutProperties(_ref12, _excluded4);
|
|
456
458
|
var rootUuid = _classPrivateFieldGet(_resolveRootUuid, this).call(this, context);
|
|
457
459
|
if (rootUuid) {
|
|
458
460
|
var stepUuid = this.allureRuntime.startStep(rootUuid, undefined, properties);
|
|
@@ -461,12 +463,12 @@ export class AllureCypress {
|
|
|
461
463
|
}
|
|
462
464
|
}
|
|
463
465
|
});
|
|
464
|
-
_classPrivateFieldInitSpec(this, _stopStep, (context,
|
|
466
|
+
_classPrivateFieldInitSpec(this, _stopStep, (context, _ref13) => {
|
|
465
467
|
var {
|
|
466
468
|
id,
|
|
467
469
|
stop
|
|
468
|
-
} =
|
|
469
|
-
properties = _objectWithoutProperties(
|
|
470
|
+
} = _ref13,
|
|
471
|
+
properties = _objectWithoutProperties(_ref13, _excluded5);
|
|
470
472
|
var stepUuid = context.stepsByFrontEndId.get(id);
|
|
471
473
|
if (stepUuid) {
|
|
472
474
|
this.allureRuntime.updateStep(stepUuid, r => {
|
|
@@ -477,11 +479,11 @@ export class AllureCypress {
|
|
|
477
479
|
});
|
|
478
480
|
}
|
|
479
481
|
});
|
|
480
|
-
_classPrivateFieldInitSpec(this, _finalizeStep, (context,
|
|
482
|
+
_classPrivateFieldInitSpec(this, _finalizeStep, (context, _ref14) => {
|
|
481
483
|
var {
|
|
482
484
|
id
|
|
483
|
-
} =
|
|
484
|
-
properties = _objectWithoutProperties(
|
|
485
|
+
} = _ref14,
|
|
486
|
+
properties = _objectWithoutProperties(_ref14, _excluded6);
|
|
485
487
|
var stepUuid = context.stepsByFrontEndId.get(id);
|
|
486
488
|
if (stepUuid) {
|
|
487
489
|
this.allureRuntime.updateStep(stepUuid, r => {
|
package/dist/esm/reporter.js.map
CHANGED
|
@@ -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","startTest","_objectSpread","stage","RUNNING","specPath","fullName","concat","_ref8","statusDetails","setError","result","Object","assign","testUuid","updateTest","failed","testResult","_ref9","SKIPPED","_ref10","suites","retries","_excluded3","map","s","filter","Boolean","writeTest","_ref11","_ref12","parameters","value","toString","excluded","FINISHED","stopTest","_ref13","stop","steps","step","at","_ref14","properties","_excluded4","rootUuid","stepUuid","startStep","stepsByFrontEndId","_ref15","_excluded5","updateStep","r","stopStep","_ref16","_excluded6","applyRuntimeMessages","_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 type Cypress from \"cypress\";\nimport { 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 {\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 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: `${getPosixPath(context.specPath)}#${fullNameSuffix}`,\n ...otherTestData,\n },\n scopes,\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 }\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":";;;;;;;;;;;;;;;;;;AACA,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,cAAc,EACdC,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,aAAa,QACR,gCAAgC;AAmBvC,SAASC,sBAAsB,EAAEC,I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AAC,GAAAjK,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGnC,sBAAsB;EAAA,OAAiC;IAC9EoM,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,CAC3BnK,EAAwB,EACxBgK,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,IAAI7K,aAAa,CAAC4J,YAAY,CAAC;EAC7DiB,qBAAqB,CAACC,eAAe,CAACtK,EAAE,CAAC;EAEzC,IAAIoK,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","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","_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 type Cypress from \"cypress\";\nimport { 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 {\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 }\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":";;;;;;;;;;;;;;;;;;AACA,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,cAAc,EACdC,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,aAAa,QACR,gCAAgC;AAmBvC,SAASC,sBAAsB,EAAEC,IAAI,QAAQ,YAAY;AAAC,IAAAC,YAAA,oBAAAC,OAAA;AAAA,IAAAC,2BAAA,oBAAAD,OAAA;AAAA,IAAAE,SAAA,oBAAAF,O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;EACR,CAAC,GAAApK,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGnC,sBAAsB;EAAA,OAAiC;IAC9EuM,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,CAC3BtK,EAAwB,EACxBmK,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,IAAIhL,aAAa,CAAC+J,YAAY,CAAC;EAC7DiB,qBAAqB,CAACC,eAAe,CAACzK,EAAE,CAAC;EAEzC,IAAIuK,gBAAgB,EAAE;IACpBL,sBAAsB,CAACC,aAAa,EAAEZ,YAAY,CAAC;EACrD;EAEA,OAAOiB,qBAAqB;AAC9B,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 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: () =>
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import { Status } from "allure-js-commons";
|
|
2
2
|
import type { StatusDetails } from "allure-js-commons";
|
|
3
|
-
import type { CypressHook, CypressSuite, CypressTest, StepDescriptor } from "../types.js";
|
|
3
|
+
import type { CypressConsoleProps, CypressHook, CypressLogEntry, CypressRenderProps, CypressSuite, CypressTest, StepDescriptor } from "../types.js";
|
|
4
4
|
export declare const getFileNameFromPath: (path: string) => string;
|
|
5
5
|
export declare const resolveSpecRelativePath: (spec: Cypress.Spec) => string;
|
|
6
6
|
export declare const uint8ArrayToBase64: (data: unknown) => string;
|
|
@@ -52,3 +52,5 @@ export declare const getStatusDataOfTestSkippedByHookError: (hookTitle: string,
|
|
|
52
52
|
trace: string | undefined;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
+
export declare const resolveConsoleProps: (entry: CypressLogEntry) => CypressConsoleProps;
|
|
56
|
+
export declare const resolveRenderProps: (entry: CypressLogEntry) => CypressRenderProps;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -28,6 +28,13 @@ export type CypressCommand = {
|
|
|
28
28
|
};
|
|
29
29
|
state: "passed" | "failed" | "queued";
|
|
30
30
|
};
|
|
31
|
+
export type CypressRenderProps = {
|
|
32
|
+
message?: string;
|
|
33
|
+
};
|
|
34
|
+
export type CypressConsoleProps = {
|
|
35
|
+
name: string;
|
|
36
|
+
props: Record<string, unknown>;
|
|
37
|
+
};
|
|
31
38
|
export type CypressLogEntry = ReturnType<typeof Cypress.log> & {
|
|
32
39
|
attributes: {
|
|
33
40
|
id: string;
|
|
@@ -42,13 +49,8 @@ export type CypressLogEntry = ReturnType<typeof Cypress.log> & {
|
|
|
42
49
|
createdAtTimestamp: number;
|
|
43
50
|
updatedAtTimestamp: number;
|
|
44
51
|
end?: boolean;
|
|
45
|
-
renderProps: () =>
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
consoleProps: () => {
|
|
49
|
-
name: string;
|
|
50
|
-
props: Record<string, unknown>;
|
|
51
|
-
};
|
|
52
|
+
renderProps: (() => CypressRenderProps) | CypressRenderProps;
|
|
53
|
+
consoleProps: (() => CypressConsoleProps) | CypressConsoleProps;
|
|
52
54
|
};
|
|
53
55
|
endGroup: () => unknown;
|
|
54
56
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allure-cypress",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Allure Cypress integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -60,23 +60,23 @@
|
|
|
60
60
|
"test": "vitest run"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"allure-js-commons": "3.
|
|
63
|
+
"allure-js-commons": "3.3.1"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@babel/cli": "^7.
|
|
67
|
-
"@babel/core": "^7.
|
|
68
|
-
"@babel/plugin-transform-modules-commonjs": "^7.
|
|
69
|
-
"@babel/preset-env": "^7.
|
|
70
|
-
"@babel/preset-typescript": "^7.
|
|
66
|
+
"@babel/cli": "^7.28.0",
|
|
67
|
+
"@babel/core": "^7.28.0",
|
|
68
|
+
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
|
|
69
|
+
"@babel/preset-env": "^7.28.0",
|
|
70
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
71
71
|
"@stylistic/eslint-plugin": "^2.6.1",
|
|
72
|
-
"@types/babel__core": "^7",
|
|
73
|
-
"@types/babel__preset-env": "^7",
|
|
72
|
+
"@types/babel__core": "^7.20.5",
|
|
73
|
+
"@types/babel__preset-env": "^7.10.0",
|
|
74
74
|
"@types/eslint": "^8.56.11",
|
|
75
75
|
"@types/node": "^20.14.2",
|
|
76
76
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
77
77
|
"@typescript-eslint/parser": "^8.0.0",
|
|
78
78
|
"allure-commandline": "^2.29.0",
|
|
79
|
-
"allure-vitest": "3.
|
|
79
|
+
"allure-vitest": "3.3.1",
|
|
80
80
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
81
81
|
"cypress": "^14.0.0",
|
|
82
82
|
"esbuild": "^0.25.0",
|