allure-cypress 3.4.4 → 3.5.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/runtime.js +52 -6
- package/dist/cjs/browser/runtime.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/reporter.js +2 -0
- package/dist/cjs/reporter.js.map +1 -1
- package/dist/esm/browser/runtime.js +52 -6
- package/dist/esm/browser/runtime.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/reporter.js +2 -0
- package/dist/esm/reporter.js.map +1 -1
- package/dist/types/browser/runtime.d.ts +6 -2
- package/package.json +3 -3
package/dist/cjs/reporter.js
CHANGED
|
@@ -502,6 +502,8 @@ class AllureCypress {
|
|
|
502
502
|
var rootUuid = _classPrivateFieldGet(_resolveRootUuid, this).call(this, context);
|
|
503
503
|
if (rootUuid) {
|
|
504
504
|
this.allureRuntime.applyRuntimeMessages(rootUuid, [message]);
|
|
505
|
+
} else {
|
|
506
|
+
this.allureRuntime.applyGlobalRuntimeMessages([message]);
|
|
505
507
|
}
|
|
506
508
|
});
|
|
507
509
|
/**
|
package/dist/cjs/reporter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporter.js","names":["_allureJsCommons","require","_reporter","_utils","_excluded","_excluded2","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","n","indexOf","propertyIsEnumerable","call","hasOwnProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","_classPrivateFieldGet","s","get","_assertClassBrand","_endAllSpecs","WeakMap","_applyAllureCypressMessages","_startRun","_startSuite","_pushNewSuiteScope","_stopSuite","_writeLastSuiteScope","_startHook","_stopHook","_startTest","_addNewTestResult","_failHookAndTest","_passTest","_skipTest","_addSkippedTest","_stopTest","_stopExistingTestResult","_fixTestStepStops","_fixFixtureStepStops","_fixStepStops","_startStep","_stopStep","_finalizeStep","_applyRuntimeApiMessages","_emitPreviousTestScope","_resolveRootUuid","_attachSpecVideo","_emitRemainingScopes","_initializeSpecContext","AllureCypress","constructor","config","undefined","Map","on","reportAllureCypressSpecMessages","args","reportFinalAllureCypressSpecMessages","isInteractive","endSpec","absolutePath","onAfterSpec","onAfterRun","spec","results","_results$video","absolute","video","endRun","allureRuntime","writeEnvironmentInfo","writeCategoriesDefinitions","specAbsolutePath","cypressVideoPath","specContext","specContextByAbsolutePath","delete","_ref","messages","message","type","context","data","_ref2","id","name","root","suiteNames","suiteId","scope","startScope","suiteScopes","suiteIdToScope","suiteScopeToId","_ref3","pop","writeScope","_ref4","scopeType","position","start","isEach","isAfterEach","testScope","last","fixture","startFixture","status","_ref5","duration","fixtureUuid","updateFixture","_fixture$status","Status","PASSED","stopFixture","_ref6","fullNameSuffix","testResultData","test","videoScope","_ref7","scopes","labels","metadataLabels","otherTestData","posixPath","getPosixPath","specPath","startTest","stage","Stage","RUNNING","getLanguageLabel","getFrameworkLabel","getSuiteLabels","getEnvironmentLabels","getHostLabel","getThreadLabel","getPackageLabel","fullName","concat","titlePath","split","_ref8","statusDetails","setError","result","assign","testUuid","updateTest","failed","testResult","_ref9","SKIPPED","_ref0","suites","retries","map","Boolean","writeTest","_ref1","_ref10","parameters","toString","excluded","FINISHED","stopTest","_ref11","stop","steps","step","at","_ref12","properties","rootUuid","stepUuid","startStep","stepsByFrontEndId","_ref13","updateStep","stopStep","_ref14","applyRuntimeMessages","_context$fixture","shouldVideoBeAttached","videoOnFailOnly","writeAttachment","contentType","ContentType","MP4","getRelativePath","resultsDir","rest","ReporterRuntime","writer","createDefaultWriter","exports","createRuntimeState","allureConfig","getRuntimeConfigDefaults","initialized","testPlan","parseTestPlan","projectDir","getProjectRoot","stepStack","stepsToFinalize","nextApiStepId","stepsFromCommands","maxArgumentLength","DEFAULT_RUNTIME_CONFIG","maxArgumentDepth","initializeRuntimeState","cypressConfig","env","allure","allureCypress","hasCypressConfig","allureCypressReporter","attachToCypress"],"sources":["../../src/reporter.ts"],"sourcesContent":["import 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,IAAAA,gBAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAiCA,IAAAE,MAAA,GAAAF,OAAA;AAA0D,IAAAG,SAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMG,aAAa,GAAGA,CAC3BnK,EAAwB,EACxBgK,aAA2C,EAC3Cf,YAAkC,KAC/B;EACH;EACA,IAAI,CAACA,YAAY,IAAIe,aAAa,IAAI,EAAE,KAAK,IAAIA,aAAa,CAAC,EAAE;IAC/Df,YAAY,GAAGe,aAAoC;EACrD;EAEA,IAAMI,gBAAgB,GAAGJ,aAAa,IAAI,KAAK,IAAIA,aAAa;EAEhE,IAAMK,qBAAqB,GAAG,IAAI1K,aAAa,CAACsJ,YAAY,CAAC;EAC7DoB,qBAAqB,CAACC,eAAe,CAACtK,EAAE,CAAC;EAEzC,IAAIoK,gBAAgB,EAAE;IACpBL,sBAAsB,CAACC,aAAa,EAAEf,YAAY,CAAC;EACrD;EAEA,OAAOoB,qBAAqB;AAC9B,CAAC;AAACtB,OAAA,CAAAoB,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"reporter.js","names":["_allureJsCommons","require","_reporter","_utils","_excluded","_excluded2","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","n","indexOf","propertyIsEnumerable","call","hasOwnProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","_classPrivateFieldGet","s","get","_assertClassBrand","_endAllSpecs","WeakMap","_applyAllureCypressMessages","_startRun","_startSuite","_pushNewSuiteScope","_stopSuite","_writeLastSuiteScope","_startHook","_stopHook","_startTest","_addNewTestResult","_failHookAndTest","_passTest","_skipTest","_addSkippedTest","_stopTest","_stopExistingTestResult","_fixTestStepStops","_fixFixtureStepStops","_fixStepStops","_startStep","_stopStep","_finalizeStep","_applyRuntimeApiMessages","_emitPreviousTestScope","_resolveRootUuid","_attachSpecVideo","_emitRemainingScopes","_initializeSpecContext","AllureCypress","constructor","config","undefined","Map","on","reportAllureCypressSpecMessages","args","reportFinalAllureCypressSpecMessages","isInteractive","endSpec","absolutePath","onAfterSpec","onAfterRun","spec","results","_results$video","absolute","video","endRun","allureRuntime","writeEnvironmentInfo","writeCategoriesDefinitions","specAbsolutePath","cypressVideoPath","specContext","specContextByAbsolutePath","delete","_ref","messages","message","type","context","data","_ref2","id","name","root","suiteNames","suiteId","scope","startScope","suiteScopes","suiteIdToScope","suiteScopeToId","_ref3","pop","writeScope","_ref4","scopeType","position","start","isEach","isAfterEach","testScope","last","fixture","startFixture","status","_ref5","duration","fixtureUuid","updateFixture","_fixture$status","Status","PASSED","stopFixture","_ref6","fullNameSuffix","testResultData","test","videoScope","_ref7","scopes","labels","metadataLabels","otherTestData","posixPath","getPosixPath","specPath","startTest","stage","Stage","RUNNING","getLanguageLabel","getFrameworkLabel","getSuiteLabels","getEnvironmentLabels","getHostLabel","getThreadLabel","getPackageLabel","fullName","concat","titlePath","split","_ref8","statusDetails","setError","result","assign","testUuid","updateTest","failed","testResult","_ref9","SKIPPED","_ref0","suites","retries","map","Boolean","writeTest","_ref1","_ref10","parameters","toString","excluded","FINISHED","stopTest","_ref11","stop","steps","step","at","_ref12","properties","rootUuid","stepUuid","startStep","stepsByFrontEndId","_ref13","updateStep","stopStep","_ref14","applyRuntimeMessages","applyGlobalRuntimeMessages","_context$fixture","shouldVideoBeAttached","videoOnFailOnly","writeAttachment","contentType","ContentType","MP4","getRelativePath","resultsDir","rest","ReporterRuntime","writer","createDefaultWriter","exports","createRuntimeState","allureConfig","getRuntimeConfigDefaults","initialized","testPlan","parseTestPlan","projectDir","getProjectRoot","stepStack","stepsToFinalize","nextApiStepId","stepsFromCommands","maxArgumentLength","DEFAULT_RUNTIME_CONFIG","maxArgumentDepth","initializeRuntimeState","cypressConfig","env","allure","allureCypress","hasCypressConfig","allureCypressReporter","attachToCypress"],"sources":["../../src/reporter.ts"],"sourcesContent":["import 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 } else {\n this.allureRuntime.applyGlobalRuntimeMessages([message]);\n }\n };\n\n /**\n * We must defer emitting a test's scope until we receive all the test's `afterEach` hooks.\n * At the same time, we should report it as early as we can. That means we should call this\n * method in the following cases:\n * - when an `after` hook of the test starts (`after` hooks are called later than `afterEach`)\n * - when a `before` or `beforeEach` hook of the next test starts (in case the next test has `before`/`beforeEach` hooks)\n * - when the next test starts (in case the next test doesn't have `before`/`beforeEach` hooks)\n * - when the test's suite ends (in case the test is the last one in its suite, including the root suite of the spec)\n * - when a nested suite starts\n * - when the spec ends\n */\n #emitPreviousTestScope = (context: SpecContext) => {\n const testScope = context.testScope;\n\n // Checking the test allows us to tell `beforeEach` and `afterEach` apart.\n // Here we're interested in `afterEach` only.\n if (!context.test && testScope) {\n this.allureRuntime.writeScope(testScope);\n context.testScope = undefined;\n }\n };\n\n #resolveRootUuid = (context: SpecContext) => context.fixture ?? context.test;\n\n #attachSpecVideo = (context: SpecContext, cypressVideoPath?: string) => {\n const shouldVideoBeAttached = (!this.videoOnFailOnly || context.failed) && cypressVideoPath;\n if (shouldVideoBeAttached) {\n const fixtureUuid = this.allureRuntime.startFixture(context.videoScope, \"after\", {\n name: \"Cypress video\",\n status: Status.PASSED,\n stage: Stage.FINISHED,\n })!;\n this.allureRuntime.writeAttachment(fixtureUuid, undefined, \"Cypress video\", cypressVideoPath, {\n contentType: ContentType.MP4,\n });\n this.allureRuntime.stopFixture(fixtureUuid);\n this.allureRuntime.writeScope(context.videoScope);\n }\n };\n\n #emitRemainingScopes = (context: SpecContext) => {\n this.#emitPreviousTestScope(context);\n context.suiteScopes.forEach((scope) => {\n this.allureRuntime.writeScope(scope);\n });\n };\n\n #initializeSpecContext = (absolutePath: string) => {\n const specPath = getRelativePath(absolutePath);\n const context: SpecContext = {\n specPath,\n test: undefined,\n fixture: undefined,\n stepsByFrontEndId: new Map(),\n videoScope: this.allureRuntime.startScope(),\n suiteIdToScope: new Map(),\n suiteScopeToId: new Map(),\n suiteScopes: [],\n testScope: undefined,\n suiteNames: [],\n failed: false,\n };\n this.specContextByAbsolutePath.set(absolutePath, context);\n };\n}\n\nconst createRuntimeState = (allureConfig?: AllureCypressConfig): AllureSpecState => ({\n config: getRuntimeConfigDefaults(allureConfig),\n initialized: false,\n messages: [],\n testPlan: parseTestPlan(),\n projectDir: getProjectRoot(),\n stepStack: [],\n stepsToFinalize: [],\n nextApiStepId: 0,\n});\n\nconst getRuntimeConfigDefaults = ({\n stepsFromCommands: {\n maxArgumentLength = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength,\n maxArgumentDepth = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth,\n } = DEFAULT_RUNTIME_CONFIG.stepsFromCommands,\n}: AllureCypressConfig = DEFAULT_RUNTIME_CONFIG): AllureSpecState[\"config\"] => ({\n stepsFromCommands: {\n maxArgumentDepth,\n maxArgumentLength,\n },\n});\n\nconst initializeRuntimeState = (cypressConfig: Cypress.PluginConfigOptions, allureConfig?: AllureCypressConfig) => {\n cypressConfig.env.allure = createRuntimeState(allureConfig);\n return cypressConfig;\n};\n\n/**\n * Sets up Allure Cypress.\n * @param on The function used to subscribe to Cypress Node events (it's the first argument of `setupNodeEvents`).\n * @param cypressConfig The Cypress configuration (the second argument of `setupNodeEvents`). If provided, the selective run feature will be enabled.\n * @param allureConfig An Allure configuration object (optional).\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * e2e: {\n * setupNodeEvents: (on, config) => {\n * allureCypress(on, config, { videoOnFailOnly: true });\n * return config;\n * },\n * // ...\n * }\n * });\n * ```\n */\nexport const allureCypress = (\n on: Cypress.PluginEvents,\n cypressConfig?: Cypress.PluginConfigOptions,\n allureConfig?: AllureCypressConfig,\n) => {\n // Backward compatibility; mainly for JS users who have no type hints\n if (!allureConfig && cypressConfig && !(\"env\" in cypressConfig)) {\n allureConfig = cypressConfig as AllureCypressConfig;\n }\n\n const hasCypressConfig = cypressConfig && \"env\" in cypressConfig;\n\n const allureCypressReporter = new AllureCypress(allureConfig);\n allureCypressReporter.attachToCypress(on);\n\n if (hasCypressConfig) {\n initializeRuntimeState(cypressConfig, allureConfig);\n }\n\n return allureCypressReporter;\n};\n"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAiCA,IAAAE,MAAA,GAAAF,OAAA;AAA0D,IAAAG,SAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,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AwB,EACxBiK,aAA2C,EAC3Cf,YAAkC,KAC/B;EACH;EACA,IAAI,CAACA,YAAY,IAAIe,aAAa,IAAI,EAAE,KAAK,IAAIA,aAAa,CAAC,EAAE;IAC/Df,YAAY,GAAGe,aAAoC;EACrD;EAEA,IAAMI,gBAAgB,GAAGJ,aAAa,IAAI,KAAK,IAAIA,aAAa;EAEhE,IAAMK,qBAAqB,GAAG,IAAI3K,aAAa,CAACuJ,YAAY,CAAC;EAC7DoB,qBAAqB,CAACC,eAAe,CAACvK,EAAE,CAAC;EAEzC,IAAIqK,gBAAgB,EAAE;IACpBL,sBAAsB,CAACC,aAAa,EAAEf,YAAY,CAAC;EACrD;EAEA,OAAOoB,qBAAqB;AAC9B,CAAC;AAACtB,OAAA,CAAAoB,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -93,13 +93,8 @@ class AllureCypressTestRuntime {
|
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
// @ts-ignore
|
|
98
96
|
attachment(name, content, options) {
|
|
99
|
-
|
|
100
|
-
var attachmentRawContent = (content === null || content === void 0 ? void 0 : content.type) === "Buffer" ? content.data : content;
|
|
101
|
-
var actualEncoding = typeof attachmentRawContent === "string" ? "utf8" : "base64";
|
|
102
|
-
var attachmentContent = uint8ArrayToBase64(attachmentRawContent);
|
|
97
|
+
var [attachmentContent, actualEncoding] = _assertClassBrand(_AllureCypressTestRuntime_brand, this, _buildAttachmentContent).call(this, content);
|
|
103
98
|
return _assertClassBrand(_AllureCypressTestRuntime_brand, this, _enqueueMessageAsync).call(this, {
|
|
104
99
|
type: "attachment_content",
|
|
105
100
|
data: {
|
|
@@ -122,6 +117,36 @@ class AllureCypressTestRuntime {
|
|
|
122
117
|
}
|
|
123
118
|
});
|
|
124
119
|
}
|
|
120
|
+
globalAttachment(name, content, options) {
|
|
121
|
+
var [attachmentContent, actualEncoding] = _assertClassBrand(_AllureCypressTestRuntime_brand, this, _buildAttachmentContent).call(this, content);
|
|
122
|
+
return _assertClassBrand(_AllureCypressTestRuntime_brand, this, _enqueueMessageAsync).call(this, {
|
|
123
|
+
type: "global_attachment_content",
|
|
124
|
+
data: {
|
|
125
|
+
name,
|
|
126
|
+
content: attachmentContent,
|
|
127
|
+
encoding: actualEncoding,
|
|
128
|
+
contentType: options.contentType,
|
|
129
|
+
fileExtension: options.fileExtension
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
globalAttachmentFromPath(name, path, options) {
|
|
134
|
+
return _assertClassBrand(_AllureCypressTestRuntime_brand, this, _enqueueMessageAsync).call(this, {
|
|
135
|
+
type: "global_attachment_path",
|
|
136
|
+
data: {
|
|
137
|
+
name,
|
|
138
|
+
path,
|
|
139
|
+
contentType: options.contentType,
|
|
140
|
+
fileExtension: options.fileExtension
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
globalError(details) {
|
|
145
|
+
return _assertClassBrand(_AllureCypressTestRuntime_brand, this, _enqueueMessageAsync).call(this, {
|
|
146
|
+
type: "global_error",
|
|
147
|
+
data: details
|
|
148
|
+
});
|
|
149
|
+
}
|
|
125
150
|
logStep(name) {
|
|
126
151
|
var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Status.PASSED;
|
|
127
152
|
var error = arguments.length > 2 ? arguments[2] : undefined;
|
|
@@ -208,6 +233,27 @@ function _dequeueAllMessages() {
|
|
|
208
233
|
_assertClassBrand(_AllureCypressTestRuntime_brand, this, _resetMessages).call(this);
|
|
209
234
|
return messages;
|
|
210
235
|
}
|
|
236
|
+
function _buildAttachmentContent(content) {
|
|
237
|
+
var rawContent = _assertClassBrand(_AllureCypressTestRuntime_brand, this, _normalizeAttachmentContent).call(this, content);
|
|
238
|
+
var encoding = typeof rawContent === "string" ? "utf8" : "base64";
|
|
239
|
+
return [uint8ArrayToBase64(rawContent), encoding];
|
|
240
|
+
}
|
|
241
|
+
function _normalizeAttachmentContent(content) {
|
|
242
|
+
if (typeof content === "string") {
|
|
243
|
+
return content;
|
|
244
|
+
}
|
|
245
|
+
if (_assertClassBrand(_AllureCypressTestRuntime_brand, this, _isSerializedBuffer).call(this, content)) {
|
|
246
|
+
return new Uint8Array(content.data);
|
|
247
|
+
}
|
|
248
|
+
return content;
|
|
249
|
+
}
|
|
250
|
+
function _isSerializedBuffer(content) {
|
|
251
|
+
if (!content || typeof content !== "object") {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
var candidate = content;
|
|
255
|
+
return candidate.type === "Buffer" && Array.isArray(candidate.data);
|
|
256
|
+
}
|
|
211
257
|
function _isInOriginContext() {
|
|
212
258
|
try {
|
|
213
259
|
var hasOriginContext = !!window.cypressOriginContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["Status","getMessageAndTraceFromError","getGlobalTestRuntime","setGlobalTestRuntime","enqueueRuntimeMessage","getRuntimeMessages","setRuntimeMessages","ALLURE_STEP_CMD_SUBJECT","startAllureApiStep","stopCurrentAllureApiStep","uint8ArrayToBase64","initTestRuntime","AllureCypressTestRuntime","getTestRuntime","_AllureCypressTestRuntime_brand","WeakSet","constructor","_classPrivateMethodInitSpec","_assertClassBrand","_resetMessages","call","labels","_len","arguments","length","Array","_key","_enqueueMessageAsync","type","data","links","_len2","_key2","parameter","name","value","options","parameters","_objectSpread","description","markdown","descriptionHtml","html","displayName","historyId","testCaseId","attachment","content","attachmentRawContent","actualEncoding","attachmentContent","encoding","contentType","fileExtension","attachmentFromPath","path","logStep","status","undefined","PASSED","error","_isInOriginContext","Cypress","Promise","resolve","cy","wrap","log","then","step","body","result","stepDisplayName","stepParameter","mode","flushAllureMessagesToTask","taskName","messages","_dequeueAllMessages","task","absolutePath","spec","absolute","flushAllureMessagesToTaskAsync","args","isInteractive","config","message","hasOriginContext","window","cypressOriginContext","hasOriginWindow","cypressOriginWindow","baseUrl","currentOrigin","location","origin","cypressInstance","state","cyExists","cyTaskExists"],"sources":["../../../src/browser/runtime.ts"],"sourcesContent":["import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions } from \"allure-js-commons\";\nimport { Status } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError } from \"allure-js-commons/sdk\";\nimport type { TestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport { getGlobalTestRuntime, setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type { AllureCypressTaskArgs, CypressMessage } from \"../types.js\";\nimport { enqueueRuntimeMessage, getRuntimeMessages, setRuntimeMessages } from \"./state.js\";\nimport { ALLURE_STEP_CMD_SUBJECT, startAllureApiStep, stopCurrentAllureApiStep } from \"./steps.js\";\nimport { uint8ArrayToBase64 } from \"./utils.js\";\n\nexport const initTestRuntime = () => setGlobalTestRuntime(new AllureCypressTestRuntime() as TestRuntime);\n\nexport const getTestRuntime = () => getGlobalTestRuntime() as AllureCypressTestRuntime;\n\nclass AllureCypressTestRuntime implements TestRuntime {\n constructor() {\n this.#resetMessages();\n }\n\n labels(...labels: Label[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n links(...links: Link[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n parameter(name: string, value: string, options?: ParameterOptions) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n description(markdown: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n descriptionHtml(html: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n displayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n historyId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n testCaseId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n // @ts-ignore\n attachment(name: string, content: string, options: AttachmentOptions) {\n // @ts-ignore\n const attachmentRawContent: string | Uint8Array = content?.type === \"Buffer\" ? content.data : content;\n const actualEncoding = typeof attachmentRawContent === \"string\" ? \"utf8\" : \"base64\";\n const attachmentContent = uint8ArrayToBase64(attachmentRawContent);\n\n return this.#enqueueMessageAsync({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n logStep(name: string, status: Status = Status.PASSED, error?: Error): PromiseLike<void> {\n if (this.#isInOriginContext()) {\n startAllureApiStep(name);\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n }\n\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve();\n })\n .then(() => {\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n });\n }\n\n step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve(body());\n })\n .then((result) => {\n stopCurrentAllureApiStep();\n return result;\n });\n }\n\n stepDisplayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n name,\n },\n });\n }\n\n stepParameter(name: string, value: string, mode?: ParameterMode) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n flushAllureMessagesToTask(taskName: string) {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n cy.task(taskName, { absolutePath: Cypress.spec.absolute, messages }, { log: false });\n }\n }\n\n flushAllureMessagesToTaskAsync(taskName: string): Cypress.Chainable<unknown> | undefined {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n const args: AllureCypressTaskArgs = {\n absolutePath: Cypress.spec.absolute,\n messages,\n isInteractive: Cypress.config(\"isInteractive\"),\n };\n return cy.task(taskName, args, { log: false });\n }\n }\n\n #resetMessages() {\n setRuntimeMessages([]);\n }\n\n #enqueueMessageAsync(message: CypressMessage): PromiseLike<void> {\n enqueueRuntimeMessage(message);\n return Cypress.Promise.resolve();\n }\n\n #dequeueAllMessages() {\n const messages = getRuntimeMessages();\n this.#resetMessages();\n return messages;\n }\n\n #isInOriginContext(): boolean {\n try {\n const hasOriginContext = !!(window as any).cypressOriginContext;\n const hasOriginWindow = !!(window as any).cypressOriginWindow;\n\n if (hasOriginContext || hasOriginWindow) {\n return true;\n }\n\n const baseUrl = Cypress.config(\"baseUrl\");\n const currentOrigin = window.location.origin;\n\n if (baseUrl && currentOrigin !== baseUrl) {\n return true;\n }\n\n const cypressInstance = (window as any).Cypress;\n\n if (cypressInstance && cypressInstance.state && cypressInstance.state(\"origin\")) {\n return true;\n }\n\n try {\n const cyExists = typeof cy !== \"undefined\";\n const cyTaskExists = typeof cy.task !== \"undefined\";\n\n // In cy.origin context, cy.task may not be available or may throw\n if (!cyExists || !cyTaskExists) {\n return true;\n }\n } catch (error) {\n return true;\n }\n\n return false;\n } catch (error) {\n return true;\n }\n }\n}\n"],"mappings":";;;;;;;;AACA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,2BAA2B,QAAQ,uBAAuB;AAEnE,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,+BAA+B;AAE1F,SAASC,qBAAqB,EAAEC,kBAAkB,EAAEC,kBAAkB,QAAQ,YAAY;AAC1F,SAAS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AC1C,IAAMmC,YAAY,GAAG,OAAOnC,EAAE,CAACc,IAAI,KAAK,WAAW;;MAEnD;MACA,IAAI,CAACoB,QAAQ,IAAI,CAACC,YAAY,EAAE;QAC9B,OAAO,IAAI;MACb;IACF,CAAC,CAAC,OAAOxC,KAAK,EAAE;MACd,OAAO,IAAI;IACb;IAEA,OAAO,KAAK;EACd,CAAC,CAAC,OAAOA,KAAK,EAAE;IACd,OAAO,IAAI;EACb;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["Status","getMessageAndTraceFromError","getGlobalTestRuntime","setGlobalTestRuntime","enqueueRuntimeMessage","getRuntimeMessages","setRuntimeMessages","ALLURE_STEP_CMD_SUBJECT","startAllureApiStep","stopCurrentAllureApiStep","uint8ArrayToBase64","initTestRuntime","AllureCypressTestRuntime","getTestRuntime","_AllureCypressTestRuntime_brand","WeakSet","constructor","_classPrivateMethodInitSpec","_assertClassBrand","_resetMessages","call","labels","_len","arguments","length","Array","_key","_enqueueMessageAsync","type","data","links","_len2","_key2","parameter","name","value","options","parameters","_objectSpread","description","markdown","descriptionHtml","html","displayName","historyId","testCaseId","attachment","content","attachmentContent","actualEncoding","_buildAttachmentContent","encoding","contentType","fileExtension","attachmentFromPath","path","globalAttachment","globalAttachmentFromPath","globalError","details","logStep","status","undefined","PASSED","error","_isInOriginContext","Cypress","Promise","resolve","cy","wrap","log","then","step","body","result","stepDisplayName","stepParameter","mode","flushAllureMessagesToTask","taskName","messages","_dequeueAllMessages","task","absolutePath","spec","absolute","flushAllureMessagesToTaskAsync","args","isInteractive","config","message","rawContent","_normalizeAttachmentContent","_isSerializedBuffer","Uint8Array","candidate","isArray","hasOriginContext","window","cypressOriginContext","hasOriginWindow","cypressOriginWindow","baseUrl","currentOrigin","location","origin","cypressInstance","state","cyExists","cyTaskExists"],"sources":["../../../src/browser/runtime.ts"],"sourcesContent":["import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, StatusDetails } from \"allure-js-commons\";\nimport { Status } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError } from \"allure-js-commons/sdk\";\nimport type { TestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport { getGlobalTestRuntime, setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type { AllureCypressTaskArgs, CypressMessage } from \"../types.js\";\nimport { enqueueRuntimeMessage, getRuntimeMessages, setRuntimeMessages } from \"./state.js\";\nimport { ALLURE_STEP_CMD_SUBJECT, startAllureApiStep, stopCurrentAllureApiStep } from \"./steps.js\";\nimport { uint8ArrayToBase64 } from \"./utils.js\";\n\nexport const initTestRuntime = () => setGlobalTestRuntime(new AllureCypressTestRuntime() as TestRuntime);\n\nexport const getTestRuntime = () => getGlobalTestRuntime() as AllureCypressTestRuntime;\n\ntype SerializedBuffer = {\n type: \"Buffer\";\n data: number[];\n};\n\nclass AllureCypressTestRuntime implements TestRuntime {\n constructor() {\n this.#resetMessages();\n }\n\n labels(...labels: Label[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n links(...links: Link[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n parameter(name: string, value: string, options?: ParameterOptions) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n description(markdown: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n descriptionHtml(html: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n displayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n historyId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n testCaseId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n attachment(name: string, content: Buffer | string, options: AttachmentOptions) {\n const [attachmentContent, actualEncoding] = this.#buildAttachmentContent(\n content as Buffer | string | SerializedBuffer,\n );\n\n return this.#enqueueMessageAsync({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n globalAttachment(name: string, content: Buffer | string, options: AttachmentOptions) {\n const [attachmentContent, actualEncoding] = this.#buildAttachmentContent(\n content as Buffer | string | SerializedBuffer,\n );\n\n return this.#enqueueMessageAsync({\n type: \"global_attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n globalAttachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"global_attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n globalError(details: StatusDetails) {\n return this.#enqueueMessageAsync({\n type: \"global_error\",\n data: details,\n });\n }\n\n logStep(name: string, status: Status = Status.PASSED, error?: Error): PromiseLike<void> {\n if (this.#isInOriginContext()) {\n startAllureApiStep(name);\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n }\n\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve();\n })\n .then(() => {\n stopCurrentAllureApiStep(status, error ? getMessageAndTraceFromError(error) : undefined);\n return Cypress.Promise.resolve();\n });\n }\n\n step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n return cy\n .wrap(ALLURE_STEP_CMD_SUBJECT, { log: false })\n .then(() => {\n startAllureApiStep(name);\n return Cypress.Promise.resolve(body());\n })\n .then((result) => {\n stopCurrentAllureApiStep();\n return result;\n });\n }\n\n stepDisplayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n name,\n },\n });\n }\n\n stepParameter(name: string, value: string, mode?: ParameterMode) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n flushAllureMessagesToTask(taskName: string) {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n cy.task(taskName, { absolutePath: Cypress.spec.absolute, messages }, { log: false });\n }\n }\n\n flushAllureMessagesToTaskAsync(taskName: string): Cypress.Chainable<unknown> | undefined {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n const args: AllureCypressTaskArgs = {\n absolutePath: Cypress.spec.absolute,\n messages,\n isInteractive: Cypress.config(\"isInteractive\"),\n };\n return cy.task(taskName, args, { log: false });\n }\n }\n\n #resetMessages() {\n setRuntimeMessages([]);\n }\n\n #enqueueMessageAsync(message: CypressMessage): PromiseLike<void> {\n enqueueRuntimeMessage(message);\n return Cypress.Promise.resolve();\n }\n\n #dequeueAllMessages() {\n const messages = getRuntimeMessages();\n this.#resetMessages();\n return messages;\n }\n\n #buildAttachmentContent(content: Buffer | string | SerializedBuffer): [string, BufferEncoding] {\n const rawContent = this.#normalizeAttachmentContent(content);\n const encoding: BufferEncoding = typeof rawContent === \"string\" ? \"utf8\" : \"base64\";\n\n return [uint8ArrayToBase64(rawContent), encoding];\n }\n\n #normalizeAttachmentContent(content: Buffer | string | SerializedBuffer): string | Uint8Array {\n if (typeof content === \"string\") {\n return content;\n }\n\n if (this.#isSerializedBuffer(content)) {\n return new Uint8Array(content.data);\n }\n\n return content;\n }\n\n #isSerializedBuffer(content: unknown): content is SerializedBuffer {\n if (!content || typeof content !== \"object\") {\n return false;\n }\n\n const candidate = content as Partial<SerializedBuffer>;\n return candidate.type === \"Buffer\" && Array.isArray(candidate.data);\n }\n\n #isInOriginContext(): boolean {\n try {\n const hasOriginContext = !!(window as any).cypressOriginContext;\n const hasOriginWindow = !!(window as any).cypressOriginWindow;\n\n if (hasOriginContext || hasOriginWindow) {\n return true;\n }\n\n const baseUrl = Cypress.config(\"baseUrl\");\n const currentOrigin = window.location.origin;\n\n if (baseUrl && currentOrigin !== baseUrl) {\n return true;\n }\n\n const cypressInstance = (window as any).Cypress;\n\n if (cypressInstance && cypressInstance.state && cypressInstance.state(\"origin\")) {\n return true;\n }\n\n try {\n const cyExists = typeof cy !== \"undefined\";\n const cyTaskExists = typeof cy.task !== \"undefined\";\n\n // In cy.origin context, cy.task may not be available or may throw\n if (!cyExists || !cyTaskExists) {\n return true;\n }\n } catch (error) {\n return true;\n }\n\n return false;\n } catch (error) {\n return true;\n }\n }\n}\n"],"mappings":";;;;;;;;AACA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,2BAA2B,QAAQ,uBAAuB;AAEnE,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,+BAA+B;AAE1F,SAASC,qBAAqB,EAAEC,kBAAkB,EAAEC,kBAAkB,QAAQ,YAAY;AAC1F,SAASC,uBAAuB,EAAEC,kBAAkB,EAAEC,wBAAwB,QAAQ,YAAY;AAClG,SAASC,kBAAkB,QAAQ,YAAY;AAE/C,OAAO,IAAMC,eAAe,GAAGA,CAAA,KAAMR,oBAAoB,CAAC,IAAIS,wBAAwB,CAAC,CAAgB,CAAC;AAExG,OAAO,IAAMC,cAAc,GAAGA,CAAA,KAAMX,oBAAoB,CAAC,CAA6B;AAAC,IAAAY,+BAAA,oBAAAC,OAAA;AAOvF,MAAMH,wBAAwB,CAAwB;EACpDI,WAAWA,CAAA,EAAG;IAAAC,2BAAA,OAAAH,+BAAA;IACZI,iBAAA,CAAAJ,+BAAA,MAAI,EAACK,cAAa,CAAC,CAAAC,IAAA,CAAnB,IAAI;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IAAIA,eAAe,CAACC,KAAK,IAAID,eAAe,CAACC,KAAK,CAAC,QAAQ,CAAC,EAAE;MAC/E,OAAO,IAAI;IACb;IAEA,IAAI;MACF,IAAMC,QAAQ,GAAG,OAAOxC,EAAE,KAAK,WAAW;MAC1C,IAAMyC,YAAY,GAAG,OAAOzC,EAAE,CAACc,IAAI,KAAK,WAAW;;MAEnD;MACA,IAAI,CAAC0B,QAAQ,IAAI,CAACC,YAAY,EAAE;QAC9B,OAAO,IAAI;MACb;IACF,CAAC,CAAC,OAAO9C,KAAK,EAAE;MACd,OAAO,IAAI;IACb;IAEA,OAAO,KAAK;EACd,CAAC,CAAC,OAAOA,KAAK,EAAE;IACd,OAAO,IAAI;EACb;AACF","ignoreList":[]}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var c=(function(t){return t.FAILED="failed",t.BROKEN="broken",t.PASSED="passed",t.SKIPPED="skipped",t})({}),Me=[c.FAILED,c.BROKEN,c.PASSED,c.SKIPPED],Le=(function(t){return t.SCHEDULED="scheduled",t.RUNNING="running",t.FINISHED="finished",t.PENDING="pending",t.INTERRUPTED="interrupted",t})({}),l=(function(t){return t.ALLURE_ID="ALLURE_ID",t.AS_ID="ALLURE_ID",t.SUITE="suite",t.PARENT_SUITE="parentSuite",t.SUB_SUITE="subSuite",t.EPIC="epic",t.FEATURE="feature",t.STORY="story",t.SEVERITY="severity",t.TAG="tag",t.OWNER="owner",t.LEAD="lead",t.HOST="host",t.THREAD="thread",t.TEST_METHOD="testMethod",t.TEST_CLASS="testClass",t.PACKAGE="package",t.FRAMEWORK="framework",t.LANGUAGE="language",t.LAYER="layer",t})({}),Ie=(function(t){return t.BLOCKER="blocker",t.CRITICAL="critical",t.NORMAL="normal",t.MINOR="minor",t.TRIVIAL="trivial",t})({}),W=(function(t){return t.TEXT="text/plain",t.XML="application/xml",t.HTML="text/html",t.CSV="text/csv",t.TSV="text/tab-separated-values",t.CSS="text/css",t.URI="text/uri-list",t.SVG="image/svg+xml",t.PNG="image/png",t.JSON="application/json",t.ZIP="application/zip",t.WEBM="video/webm",t.JPEG="image/jpeg",t.MP4="video/mp4",t.IMAGEDIFF="application/vnd.allure.image.diff",t})({}),_=(function(t){return t.DEFAULT="link",t.ISSUE="issue",t.TMS="tms",t})({});function K(){K=function(o,a){return new r(o,void 0,a)};var t=RegExp.prototype,e=new WeakMap;function r(n,o,a){var p=RegExp(n,o);return e.set(p,a||e.get(n)),M(p,r.prototype)}function s(n,o){var a=e.get(o);return Object.keys(a).reduce(function(p,i){var g=a[i];if(typeof g=="number")p[i]=n[g];else{for(var S=0;n[g[S]]===void 0&&S+1<g.length;)S++;p[i]=n[g[S]]}return p},Object.create(null))}return Fe(r,RegExp),r.prototype.exec=function(n){var o=t.exec.call(this,n);if(o){o.groups=s(o,this);var a=o.indices;a&&(a.groups=s(a,this))}return o},r.prototype[Symbol.replace]=function(n,o){if(typeof o=="string"){var a=e.get(this);return t[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)(>|$)/g,function(i,g,S){if(S==="")return i;var v=a[g];return Array.isArray(v)?"$"+v.join("$"):typeof v=="number"?"$"+v:""}))}if(typeof o=="function"){var p=this;return t[Symbol.replace].call(this,n,function(){var i=arguments;return typeof i[i.length-1]!="object"&&(i=[].slice.call(i)).push(s(i,p)),o.apply(this,i)})}return t[Symbol.replace].call(this,n,o)},K.apply(this,arguments)}function Fe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&M(t,e)}function M(t,e){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},M(t,e)}function vt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,s)}return r}function $(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vt(Object(r),!0).forEach(function(s){Oe(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vt(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function Oe(t,e,r){return(e=je(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function je(t){var e=He(t,"string");return typeof e=="symbol"?e:e+""}function He(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,e||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var x=t=>{switch(!0){case/assert/gi.test(t.constructor.name):case/expectation/gi.test(t.constructor.name):case(t.name&&/assert/gi.test(t.name)):case(t.message&&/assert/gi.test(t.message)):case(t.stack&&/@vitest\/expect/gi.test(t.stack)):case(t.stack&&/playwright\/lib\/matchers\/expect\.js/gi.test(t.stack)):case"matcherResult"in t:case("inspect"in t&&typeof t.inspect=="function"):return c.FAILED;default:return c.BROKEN}},Ne=function(){var{onlyFirst:e=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")},V=t=>{var e=Ne();return t.replace(e,"")},Ue=t=>{if(!t||typeof t!="object")return{};if("matcherResult"in t&&t.matcherResult!==void 0&&typeof t.matcherResult=="object")return{actual:C(t.matcherResult.actual),expected:C(t.matcherResult.expected)};var e="actual"in t&&t.actual!==void 0?{actual:C(t.actual)}:{},r="expected"in t&&t.expected!==void 0?{expected:C(t.expected)}:{};return $($({},e),r)},y=t=>{var{message:e,stack:r}=t;return $({message:e?V(e):void 0,trace:r?V(r):void 0},Ue(t))};var Ge=K(/(?:^|\s)@?allure\.([^:=\s]+)[:=]("[^"]+"|'[^']+'|`[^`]+`|\S+)/,{type:1}),xt=new RegExp(Ge,"g");var ze=t=>t?.[1],Be=t=>{var e,r=/['"`]/,s=new RegExp("^".concat(r.source)),n=new RegExp("".concat(r.source,"$")),o=(e=t?.[2])!==null&&e!==void 0?e:"";return s.test(o)&&n.test(o)?o.slice(1,-1):o};var q=t=>{var e=[],r=[],s=t.matchAll(xt),n=t.replaceAll(xt,"").split(" ").filter(Boolean).reduce((v,B)=>/^[\n\r]/.test(B)?v+B:"".concat(v," ").concat(B),"").trim();for(var o of s){var a=o,p=ze(a),i=Be(a);if(!(!p||!i)){var[g,S]=p.split(".");switch(g){case"id":e.push({name:l.ALLURE_ID,value:i});break;case"label":e.push({name:S,value:i});break;case"link":r.push({type:S,url:i});break}}}return{labels:e,links:r,cleanTitle:n}};var P=t=>!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function",C=function(e){var{maxDepth:r=0,maxLength:s=0,replacer:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return qe(typeof e=="object"?JSON.stringify(e,We(r,n)):String(e),s)},We=(t,e)=>{var r=[],s=function(o,a){if(typeof a!="object"||a===null)return a;for(;r.length>0&&!Object.is(r.at(-1),this);)r.pop();if(!(t&&r.length>=t||r.includes(a)))return r.push(a),a instanceof Map?$e(r,a):a instanceof Set?Ve(r,a):a};return e?Ke(e,s):s},Ke=(t,e)=>function(r,s){return e.call(this,r,t.call(this,r,s))},$e=(t,e)=>Array.from(e).filter(r=>{var[s]=r;return!t.includes(s)}).map(r=>{var[s,n]=r;return[s,t.includes(n)?void 0:n]}),Ve=(t,e)=>Array.from(e).map(r=>t.includes(r)?void 0:r),qe=(t,e)=>e&&t.length>e?"".concat(t.substring(0,e),"..."):t;function Tt(t,e,r,s,n,o,a){try{var p=t[o](a),i=p.value}catch(g){return void r(g)}p.done?e(i):Promise.resolve(i).then(s,n)}function d(t){return function(){var e=this,r=arguments;return new Promise(function(s,n){var o=t.apply(e,r);function a(i){Tt(o,s,n,a,p,"next",i)}function p(i){Tt(o,s,n,a,p,"throw",i)}a(void 0)})}}var Y=class{attachment(){var e=this;return d(function*(){yield e.warning()})()}attachmentFromPath(){var e=this;return d(function*(){yield e.warning()})()}description(){var e=this;return d(function*(){yield e.warning()})()}descriptionHtml(){var e=this;return d(function*(){yield e.warning()})()}displayName(){var e=this;return d(function*(){yield e.warning()})()}historyId(){var e=this;return d(function*(){yield e.warning()})()}labels(){var e=this;return d(function*(){yield e.warning()})()}links(){var e=this;return d(function*(){yield e.warning()})()}parameter(){var e=this;return d(function*(){yield e.warning()})()}logStep(){var e=this;return d(function*(){yield e.warning()})()}step(e,r){var s=this;return d(function*(){return yield s.warning(),r()})()}stepDisplayName(){var e=this;return d(function*(){yield e.warning()})()}stepParameter(){var e=this;return d(function*(){yield e.warning()})()}testCaseId(){var e=this;return d(function*(){yield e.warning()})()}warning(){return d(function*(){console.log("no test runtime is found. Please check test framework configuration")})()}},b=new Y;function Ye(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i,function(r,s,n,o,a){return s?e?".jsx":".js":!n||o&&a?n+o+"."+a.toLowerCase()+"js":r}):t}var Ct="allureTestRuntime",Z=t=>{globalThis[Ct]=()=>t},J=()=>globalThis?.[Ct],X=()=>{var t=J();if(t){var e;return(e=t())!==null&&e!==void 0?e:b}return b},Q=()=>{var t=J();if(t){var e;return(e=t())!==null&&e!==void 0?e:b}var r="allure-playwright/autoconfig";return import(Ye(r)).then(()=>{var s,n;return(s=(n=J())===null||n===void 0?void 0:n())!==null&&s!==void 0?s:b}).catch(()=>b)};var m=function(e){for(var r=arguments.length,s=new Array(r>1?r-1:0),n=1;n<r;n++)s[n-1]=arguments[n];var o=Q();return P(o)?o.then(a=>a[e](...s)):o[e](...s)},h=(t,e)=>m("labels",{name:t,value:e}),Je=function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return m("labels",...r)},tt=(t,e,r)=>m("links",{url:t,type:r,name:e}),Ze=function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return m("links",...r)},Xe=(t,e,r)=>m("parameter",t,e,r),Qe=t=>m("description",t),tr=t=>m("descriptionHtml",t),er=t=>m("displayName",t),rr=t=>m("historyId",t),sr=t=>m("testCaseId",t),nr=(t,e,r)=>{var s=typeof r=="string"?{contentType:r}:r;return m("attachment",t,e,s)},or=(t,e)=>m("attachmentFromPath",t,e,{contentType:"application/vnd.allure.playwright-trace"}),ar=(t,e,r)=>{var s=typeof r=="string"?{contentType:r}:r;return m("attachmentFromPath",t,e,s)},ir=()=>({displayName:t=>m("stepDisplayName",t),parameter:(t,e,r)=>m("stepParameter",t,e,r)}),pr=(t,e,r)=>m("logStep",t,e,r),ur=(t,e)=>m("step",t,()=>e(ir())),cr=(t,e)=>tt(t,e,_.ISSUE),lr=(t,e)=>tt(t,e,_.TMS),mr=t=>h(l.ALLURE_ID,t),fr=t=>h(l.EPIC,t),dr=t=>h(l.FEATURE,t),gr=t=>h(l.STORY,t),yr=t=>h(l.SUITE,t),hr=t=>h(l.PARENT_SUITE,t),Sr=t=>h(l.SUB_SUITE,t),vr=t=>h(l.OWNER,t),xr=t=>h(l.SEVERITY,t),Tr=t=>h(l.LAYER,t),Cr=t=>h(l.TAG,t),br=function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return m("labels",...r.map(n=>({name:l.TAG,value:n})))};var bt={stepsFromCommands:{maxArgumentLength:128,maxArgumentDepth:3}},Et=(t,e)=>{let r=t.findIndex(e);return r!==-1?et(t.splice(r)):[]},et=t=>{let e=t.length,r=new Array(e);for(let s=0;s<e;s++)r[e-s-1]=t[s];return r},At=t=>t[t.length-1],Pt=t=>typeof t<"u";var f=()=>{let t=Cypress.env("allure");return t||(t={config:bt,initialized:!1,messages:[],testPlan:void 0,currentTest:void 0,projectDir:void 0,stepStack:[],stepsToFinalize:[],nextApiStepId:0},Cypress.env("allure",t)),t},Dt=()=>f().initialized,Rt=()=>{f().initialized=!0},rt=()=>f().messages,wt=t=>{f().messages=t},u=t=>{rt().push(t)},kt=()=>f().testPlan,_t=()=>f().projectDir,Mt=()=>f().currentTest,Lt=t=>{f().currentTest=t},It=()=>{f().currentTest=void 0},Ft=()=>f().config,T=()=>f().stepStack,Ot=()=>At(T()),L=t=>T().push(t);var Ar=t=>et(T().splice(t)),jt=()=>Ar(0);var I=(t,e)=>f().stepsToFinalize.push([t,e]),Ht=()=>f().stepsToFinalize,Nt=()=>{let t=f();t.stepsToFinalize=[]};var Ut=(t,e)=>{let r=kt();if(r){let s=Gt(t);for(let n of Pr(e)){let o=Dr(r,t,s,n.tests);Rr(n.tests,o)}}},Pr=function*(t){let e=[];for(let r=t;r;r=e.pop()){yield r;for(let s=r.suites.length-1;s>=0;s--)e.push(r.suites[s])}},Dr=(t,e,r,s)=>{let n=[];return s.forEach((o,a)=>{let{fullNameSuffix:p,labels:i}=st(o),g=`${r}#${p}`,S=i.find(({name:v})=>v===l.ALLURE_ID)?.value;wr(t,g,S)||n.push(a)}),n},Rr=(t,e)=>{for(let r=e.length-1;r>=0;r--)t.splice(e[r],1)},wr=(t,e,r)=>t.tests.some(s=>r&&s.id?.toString()===r||s.selector===e);var F="__allure_report_system_hook__",zt=()=>{Cypress.mocha.getRunner().on("start",kr).on("suite",_r).on("suite end",qt).on("hook",Mr).on("hook end",Lr).on("test",Ir).on("pass",Yt).on("fail",Fr).on("pending",Jt).on("test end",pt)},Bt=()=>{afterEach(F,ut),after(F,Or)},kr=()=>{Kt(),$t()},_r=t=>{t.root&&Ut(Cypress.spec,t),Vt(t)},Mr=t=>{E(t)||nt(t)},Lr=t=>{E(t)||O(t)},Ir=t=>{D(t)||ot(t)},Fr=(t,e)=>{let r="hookName"in t;if(r&&Wt(t))return;r&&E(t)&&nt(t,Date.now()-(t.duration??0)),at(e),r&&it(t,e)},Or=function(){ut(),A(this)};var Zt=Cypress.platform==="win32",Xt=t=>t.substring(t.lastIndexOf(Zt?"\\":"/")+1),Gt=t=>{let e=_t(),r=e?t.absolute.substring(e.length+1):t.relative;return Zt?r.replaceAll("\\","/"):r},Qt=t=>Array.isArray(t)||t.buffer?btoa(String.fromCharCode.apply(null,t)):t,ct=t=>({...st(t),start:typeof t.wallClockStartedAt=="string"?Date.parse(t.wallClockStartedAt):t.wallClockStartedAt?.getTime?.()||Date.now()}),te=t=>({duration:t.duration??0,retries:t._retries??0}),lt=()=>({statusDetails:{message:"This is a pending test"}}),ee=(t,e,r)=>{let s={id:t.id,stop:Date.now(),status:e??ue(t)};return r&&(s.statusDetails=r),s},re=Symbol("The test has been reported to Allure"),mt=t=>{t[re]=!0},D=t=>t[re]===!0,jr=function*(t){let e=[];for(let r=t;r;r=e.pop()){yield r;for(let s=r.suites.length-1;s>=0;s--)e.push(r.suites[s])}},se=function*(t){for(let e of jr(t))yield*e.tests},ne=t=>{let e=[];for(let r=t.parent;r;r=r.parent)e.push(r);return e.reverse(),e};var oe=()=>(f().nextApiStepId++).toString(),st=t=>{let e=t.title,{cleanTitle:r,labels:s,links:n}=q(e),a=`${[...t.titlePath().slice(0,-1),r].join(" ")}`;return{name:r,labels:s,links:n,fullNameSuffix:a}},E=t=>t.title.includes(F),Wt=t=>t.parent.root&&t.hookName==="after all",ae=t=>{let e=t.test;return t.test.parent.hooks.findLast(o=>o.hookName==="after all")?.hookId===e.hookId},ie=(t,e,r,s)=>{let n=e?c.SKIPPED:x(r),{message:o,trace:a}=y(r);return{status:n,statusDetails:{message:e?Hr(t,s):o,trace:a}}},Hr=(t,e)=>{let r=e.title?`'${e.title}'`:"root";return`'${t}' defined in the ${r} suite has failed`},R=t=>typeof t.attributes.consoleProps=="function"?t.attributes.consoleProps():t.attributes.consoleProps,pe=t=>typeof t?.attributes?.renderProps=="function"?t.attributes.renderProps():t.attributes?.renderProps;var w={},ce=t=>t.type==="api",k=t=>t.type==="log",j=t=>G(Nr(),t),Nr=()=>{let t=oe();return L({id:t,type:"api"}),t},le=t=>{let e=x(t),r=y(t);Gr(e,r),fe(t)},H=(t,e)=>N(r=>ce(r),t,e),N=(t,e,r)=>me(Et(T(),t),e,r),U=(t,e)=>me(jt(),t,e),ft=()=>{U(),Ht().forEach(Ur),Nt()},ue=t=>t.error?x(t.error):c.PASSED,Ur=([t,e])=>{let{id:r,error:s}=t,n={id:r};s&&(n.statusDetails=y(s)),e?.(n),u({type:"cypress_step_finalize",data:n})},Gr=(t,e)=>{let r=T(),s=r.at(r.findLastIndex(k)+1);s&&N(n=>Object.is(n,s),t,e)},zr=(t,e)=>{if(k(t)){let r=t.log.attributes.error;if(r)return t.error=r}return e&&(t.error=e),t.error},me=(t,e,r)=>{let s;for(let n of t)s=zr(n,s),Br(n,e,r);s&&fe(s)},fe=t=>T().forEach(e=>e.error=t),Br=(t,e,r)=>{de(t,e,r),ce(t)&&t.error&&I(t)};var Kt=()=>Z(new dt),gt=()=>X(),dt=class{constructor(){this.#e()}labels(...e){return this.#t({type:"metadata",data:{labels:e}})}links(...e){return this.#t({type:"metadata",data:{links:e}})}parameter(e,r,s){return this.#t({type:"metadata",data:{parameters:[{name:e,value:r,...s}]}})}description(e){return this.#t({type:"metadata",data:{description:e}})}descriptionHtml(e){return this.#t({type:"metadata",data:{descriptionHtml:e}})}displayName(e){return this.#t({type:"metadata",data:{displayName:e}})}historyId(e){return this.#t({type:"metadata",data:{historyId:e}})}testCaseId(e){return this.#t({type:"metadata",data:{testCaseId:e}})}attachment(e,r,s){let n=r?.type==="Buffer"?r.data:r,o=typeof n=="string"?"utf8":"base64",a=Qt(n);return this.#t({type:"attachment_content",data:{name:e,content:a,encoding:o,contentType:s.contentType,fileExtension:s.fileExtension}})}attachmentFromPath(e,r,s){return this.#t({type:"attachment_path",data:{name:e,path:r,contentType:s.contentType,fileExtension:s.fileExtension}})}logStep(e,r=c.PASSED,s){return this.#s()?(j(e),H(r,s?y(s):void 0),Cypress.Promise.resolve()):cy.wrap(w,{log:!1}).then(()=>(j(e),Cypress.Promise.resolve())).then(()=>(H(r,s?y(s):void 0),Cypress.Promise.resolve()))}step(e,r){return cy.wrap(w,{log:!1}).then(()=>(j(e),Cypress.Promise.resolve(r()))).then(s=>(H(),s))}stepDisplayName(e){return this.#t({type:"step_metadata",data:{name:e}})}stepParameter(e,r,s){return this.#t({type:"step_metadata",data:{parameters:[{name:e,value:r,mode:s}]}})}flushAllureMessagesToTask(e){let r=this.#r();r.length&&cy.task(e,{absolutePath:Cypress.spec.absolute,messages:r},{log:!1})}flushAllureMessagesToTaskAsync(e){let r=this.#r();if(r.length){let s={absolutePath:Cypress.spec.absolute,messages:r,isInteractive:Cypress.config("isInteractive")};return cy.task(e,s,{log:!1})}}#e(){wt([])}#t(e){return u(e),Cypress.Promise.resolve()}#r(){let e=rt();return this.#e(),e}#s(){try{let e=!!window.cypressOriginContext,r=!!window.cypressOriginWindow;if(e||r)return!0;let s=Cypress.config("baseUrl"),n=window.location.origin;if(s&&n!==s)return!0;let o=window.Cypress;if(o&&o.state&&o.state("origin"))return!0;try{let a=typeof cy<"u",p=typeof cy.task<"u";if(!a||!p)return!0}catch{return!0}return!1}catch{return!0}}};var $t=()=>{u({type:"cypress_run_start",data:{}})},Vt=t=>{u({type:"cypress_suite_start",data:{id:t.id,name:t.title,root:t.root,start:Date.now()}})},qt=t=>{u({type:"cypress_suite_end",data:{root:t.root,stop:Date.now()}})},nt=(t,e)=>{u({type:"cypress_hook_start",data:{name:t.title,scopeType:t.hookName.includes("each")?"each":"all",position:t.hookName.includes("before")?"before":"after",start:e??Date.now()}})},O=t=>{ft(),u({type:"cypress_hook_end",data:{duration:t.duration??0}})},ot=t=>{Lt(t),u({type:"cypress_test_start",data:ct(t)}),mt(t)},G=(t,e)=>{u({type:"cypress_step_start",data:{id:t,name:e,start:Date.now()}})},de=(t,e,r)=>{u({type:"cypress_step_stop",data:ee(t,e,r)})},Yt=()=>{u({type:"cypress_test_pass",data:{}})},at=t=>{let e=x(t),r=y(t);U(e,r),u({type:"cypress_fail",data:{status:e,statusDetails:r}})},it=(t,e)=>{let r=t.hookName.includes("each"),s=t.parent,n=ie(t.title,r,e,s);O(t),Wr(),Kr(s,n)},Jt=t=>{D(t)?U(c.SKIPPED,{message:"The test was skipped before the command was completed"}):ot(t),u({type:"cypress_test_skip",data:lt()})},pt=t=>{ft(),u({type:"cypress_test_end",data:{duration:t.duration??0,retries:t._retries??0}}),It()},ge=(t,e)=>{u({type:"attachment_path",data:{path:t,name:e,contentType:W.PNG}})},A=t=>{if(ae(t)){let e=t.test;return E(e)||O(e),ye()}},yt=(t,e)=>{try{return at(e),it(t.test,e),ye()}catch(r){Vr(t,r)}},ht=(t,e)=>{if(!yt(t,e)?.then(()=>{throw e}))throw e},ut=()=>gt().flushAllureMessagesToTask("reportAllureCypressSpecMessages"),ye=()=>gt().flushAllureMessagesToTaskAsync("reportFinalAllureCypressSpecMessages"),Wr=()=>{let t=Mt();t&&pt(t)},Kr=(t,e)=>{for(let r of se(t))D(r)||$r(r,r.pending?{...lt(),status:c.SKIPPED}:e)},$r=(t,e)=>{u({type:"cypress_skipped_test",data:{...ct(t),...e,...te(t),suites:ne(t).map(r=>r.id)}}),mt(t)},Vr=(t,e)=>{try{console.error(`Unexpected error when reporting the failure of ${t.test?.title??"'after all'"}`),console.error(e)}catch{}};var Se=()=>{let t=qr();Yr(t),Jr(t)},qr=()=>{let t=0;return{getSuiteDepth:()=>t,incrementSuiteDepth:()=>{t++},decrementSuiteDepth:()=>{t--}}},Yr=({incrementSuiteDepth:t,decrementSuiteDepth:e})=>{let r=o=>(a,p,i)=>{t();try{return Zr(o,a,p,i)}finally{e()}},s=globalThis.describe,n=r(s);n.only=r(s.only),n.skip=r(s.skip),globalThis.describe=n},Jr=({getSuiteDepth:t})=>{let e=globalThis.after,r=(s,n)=>typeof s=="string"?e(s,he(t,n)):e(he(t,s));globalThis.after=r},Zr=(t,...e)=>{let[r,s,n]=e;return typeof n>"u"&&typeof s>"u"?t(r):typeof s=="function"?t(r,s):t(r,s,n)},he=(t,e)=>{if(t()===0&&e){let r=e.length?Xr(e):Qr(e);return Object.defineProperty(r,"name",{value:e.name}),r}return e},Xr=t=>function(e){let r=s=>{if(s){yt(this,s)?.then(()=>e(s))||e(s);return}try{if(A(this)?.then(()=>e()))return}catch(n){e(n);return}e()};return t.bind(this)(r)},Qr=t=>function(){let e,r;try{e=t.bind(this)()}catch(s){r=s}if(r)ht(this,r);else return P(e)?e.then(()=>A(this),s=>ht(this,s)):(A(this),e)};var xe=t=>es(t)?be(t):ts(t),Te=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Ce=(t,e=[])=>{if(!Te(t))return t;let r={};e.push(t);for(let[s,n]of Object.entries(t))if(typeof n=="object"&&n!==null){if(e.includes(n))continue;r[s]=Ce(n,e)}else r[s]=n;return e.pop(),r},ts=t=>{if(Te(t)){let e=Ce(t);return C({...e},ve())}return C(t,ve())},ve=()=>{let{stepsFromCommands:{maxArgumentDepth:t,maxArgumentLength:e}}=Ft();return{maxDepth:t,maxLength:e,nonNullReplacerWithDomSupport:rs}},es=t=>typeof t=="object"&&t!==null&&Cypress.dom.isDom(t),be=t=>Cypress.dom.stringify(t,"long"),rs=(t,e)=>{if(typeof e=="object"){if(e===null)return;if(Cypress.dom.isDom(e))return be(e)}return e};var Ee=t=>{let{event:e,instrument:r}=t.attributes;return!(r!=="command"||e||os(t))},Ae=(t,e)=>{let r=Ot();if(r&&k(r)){let{name:s,props:{name:n}}=R(r.log);s==="screenshot"&&n===t&&(r.attachmentName=e)}},Pe=t=>{let e=ms();typeof e<"u"&&fs(e.log,t)&&z(e.log.attributes.id),ss(t),G(t.attributes.id,as(t)),ns(t)},z=t=>N(({id:e})=>e===t),ss=t=>{let r={id:t.attributes.id,type:"log",log:t};L(r),I(r,s=>{s.parameters=is(t),r.attachmentName&&(s.name=r.attachmentName)})},ns=t=>{let{groupStart:e,end:r,id:s}=t.attributes;if(r)z(s);else if(e){let n=t.endGroup;t.endGroup=function(){return z(s),n.call(this)}}else{let n=t.end;t.end=function(){return z(s),n.call(this)}}},os=t=>{let{name:e}=t.attributes;return e==="then"&&Object.is(R(t).props["Applied To"],w)},as=t=>{let{name:e,message:r,displayName:s}=t.attributes,n=(s??e).trim(),o=(De(t)??us(t)??pe(t).message??r).trim();return[n,o].filter(Boolean).join(" ")},is=t=>cs(t).map(([e,r])=>({name:e.toString(),value:xe(r)})).filter(ds(t)),ps=["Given","When","Then","And"],us=t=>{let{attributes:{name:e,message:r}}=t;if(ps.includes(e.trim())&&r.startsWith("**")&&r.endsWith("**"))return r.substring(2,r.length-2)},cs=t=>{let e=!!De(t),{props:r,name:s}=R(t);return["clearLocalStorage"].includes(s)?[]:Object.entries(r).filter(([n,o])=>Pt(o)&&!(e&&n==="Message"))},De=t=>{if(ls(t)){let e=R(t).props.Message;if(e&&typeof e=="string")return e}},ls=({attributes:{name:t}})=>t==="assert",ms=()=>T().findLast(k),fs=(t,e)=>{let{groupStart:r,type:s}=t.attributes,{type:n}=e.attributes;return!r&&(s==="child"||n!=="child")},ds=t=>t.attributes.name==="wrap"?()=>!0:({name:e,value:r})=>e!=="Yielded"||r!=="{}";var Re=()=>Cypress.on("fail",we).on("log:added",ys),St=()=>Cypress.Screenshot.defaults({onAfterScreenshot:gs}),gs=(...[,{name:t,path:e}])=>{let r=t??Xt(e);ge(e,r),Ae(t,r)},ys=(t,e)=>{Ee(e)&&Pe(e)},we=t=>{if(le(t),hs())throw t},hs=()=>Object.is(Cypress.listeners("fail").at(-1),we);var ke=()=>{zt(),Re(),Bt(),Se()};var _e=()=>{Dt()||(Rt(),ke(),St())};_e();export{W as ContentType,l as LabelName,_ as LinkType,Ie as Severity,Le as Stage,c as Status,Me as StatusByPriority,mr as allureId,or as attachTrace,nr as attachment,ar as attachmentPath,Qe as description,tr as descriptionHtml,er as displayName,fr as epic,dr as feature,rr as historyId,cr as issue,h as label,Je as labels,Tr as layer,tt as link,Ze as links,pr as logStep,vr as owner,Xe as parameter,hr as parentSuite,xr as severity,ur as step,gr as story,Sr as subSuite,yr as suite,Cr as tag,br as tags,sr as testCaseId,lr as tms};
|
|
1
|
+
var l=(function(t){return t.FAILED="failed",t.BROKEN="broken",t.PASSED="passed",t.SKIPPED="skipped",t})({}),Me=[l.FAILED,l.BROKEN,l.PASSED,l.SKIPPED],Fe=(function(t){return t.SCHEDULED="scheduled",t.RUNNING="running",t.FINISHED="finished",t.PENDING="pending",t.INTERRUPTED="interrupted",t})({}),f=(function(t){return t.ALLURE_ID="ALLURE_ID",t.AS_ID="ALLURE_ID",t.SUITE="suite",t.PARENT_SUITE="parentSuite",t.SUB_SUITE="subSuite",t.EPIC="epic",t.FEATURE="feature",t.STORY="story",t.SEVERITY="severity",t.TAG="tag",t.OWNER="owner",t.LEAD="lead",t.HOST="host",t.THREAD="thread",t.TEST_METHOD="testMethod",t.TEST_CLASS="testClass",t.PACKAGE="package",t.FRAMEWORK="framework",t.LANGUAGE="language",t.LAYER="layer",t})({}),Le=(function(t){return t.BLOCKER="blocker",t.CRITICAL="critical",t.NORMAL="normal",t.MINOR="minor",t.TRIVIAL="trivial",t})({}),W=(function(t){return t.TEXT="text/plain",t.XML="application/xml",t.HTML="text/html",t.CSV="text/csv",t.TSV="text/tab-separated-values",t.CSS="text/css",t.URI="text/uri-list",t.SVG="image/svg+xml",t.PNG="image/png",t.JSON="application/json",t.ZIP="application/zip",t.WEBM="video/webm",t.JPEG="image/jpeg",t.MP4="video/mp4",t.IMAGEDIFF="application/vnd.allure.image.diff",t})({}),k=(function(t){return t.DEFAULT="link",t.ISSUE="issue",t.TMS="tms",t})({});function K(){K=function(o,a){return new r(o,void 0,a)};var t=RegExp.prototype,e=new WeakMap;function r(n,o,a){var p=RegExp(n,o);return e.set(p,a||e.get(n)),M(p,r.prototype)}function s(n,o){var a=e.get(o);return Object.keys(a).reduce(function(p,i){var g=a[i];if(typeof g=="number")p[i]=n[g];else{for(var S=0;n[g[S]]===void 0&&S+1<g.length;)S++;p[i]=n[g[S]]}return p},Object.create(null))}return Ie(r,RegExp),r.prototype.exec=function(n){var o=t.exec.call(this,n);if(o){o.groups=s(o,this);var a=o.indices;a&&(a.groups=s(a,this))}return o},r.prototype[Symbol.replace]=function(n,o){if(typeof o=="string"){var a=e.get(this);return t[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)(>|$)/g,function(i,g,S){if(S==="")return i;var v=a[g];return Array.isArray(v)?"$"+v.join("$"):typeof v=="number"?"$"+v:""}))}if(typeof o=="function"){var p=this;return t[Symbol.replace].call(this,n,function(){var i=arguments;return typeof i[i.length-1]!="object"&&(i=[].slice.call(i)).push(s(i,p)),o.apply(this,i)})}return t[Symbol.replace].call(this,n,o)},K.apply(this,arguments)}function Ie(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&M(t,e)}function M(t,e){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},M(t,e)}function vt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,s)}return r}function $(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vt(Object(r),!0).forEach(function(s){Oe(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vt(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function Oe(t,e,r){return(e=je(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function je(t){var e=He(t,"string");return typeof e=="symbol"?e:e+""}function He(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,e||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var x=t=>{switch(!0){case/assert/gi.test(t.constructor.name):case/expectation/gi.test(t.constructor.name):case(t.name&&/assert/gi.test(t.name)):case(t.message&&/assert/gi.test(t.message)):case(t.stack&&/@vitest\/expect/gi.test(t.stack)):case(t.stack&&/playwright\/lib\/matchers\/expect\.js/gi.test(t.stack)):case(t.stack&&/codeceptjs-expect/gi.test(t.stack)):case"matcherResult"in t:case("inspect"in t&&typeof t.inspect=="function"):case"actual"in t:case"expected"in t:return l.FAILED;default:return l.BROKEN}},Ne=function(){var{onlyFirst:e=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")},V=t=>{var e=Ne();return t.replace(e,"")},ze=t=>{if(!t||typeof t!="object")return{};if("matcherResult"in t&&t.matcherResult!==void 0&&typeof t.matcherResult=="object")return{actual:T(t.matcherResult.actual),expected:T(t.matcherResult.expected)};var e="actual"in t&&t.actual!==void 0?{actual:T(t.actual)}:{},r="expected"in t&&t.expected!==void 0?{expected:T(t.expected)}:{};return $($({},e),r)},y=t=>{var{message:e,stack:r}=t;return $({message:e?V(e):void 0,trace:r?V(r):void 0},ze(t))};var Ue=K(/(?:^|\s)@?allure\.([^:=\s]+)[:=]("[^"]+"|'[^']+'|`[^`]+`|\S+)/,{type:1}),xt=new RegExp(Ue,"g");var Ge=t=>t?.[1],Be=t=>{var e,r=/['"`]/,s=new RegExp("^".concat(r.source)),n=new RegExp("".concat(r.source,"$")),o=(e=t?.[2])!==null&&e!==void 0?e:"";return s.test(o)&&n.test(o)?o.slice(1,-1):o};var q=t=>{var e=[],r=[],s=t.matchAll(xt),n=t.replaceAll(xt,"").split(" ").filter(Boolean).reduce((v,B)=>/^[\n\r]/.test(B)?v+B:"".concat(v," ").concat(B),"").trim();for(var o of s){var a=o,p=Ge(a),i=Be(a);if(!(!p||!i)){var[g,S]=p.split(".");switch(g){case"id":e.push({name:f.ALLURE_ID,value:i});break;case"label":e.push({name:S,value:i});break;case"link":r.push({type:S,url:i});break}}}return{labels:e,links:r,cleanTitle:n}};var P=t=>!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function",T=function(e){var{maxDepth:r=0,maxLength:s=0,replacer:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return qe(typeof e=="object"?JSON.stringify(e,We(r,n)):String(e),s)},We=(t,e)=>{var r=[],s=function(o,a){if(typeof a!="object"||a===null)return a;for(;r.length>0&&!Object.is(r.at(-1),this);)r.pop();if(!(t&&r.length>=t||r.includes(a)))return r.push(a),a instanceof Map?$e(r,a):a instanceof Set?Ve(r,a):a};return e?Ke(e,s):s},Ke=(t,e)=>function(r,s){return e.call(this,r,t.call(this,r,s))},$e=(t,e)=>Array.from(e).filter(r=>{var[s]=r;return!t.includes(s)}).map(r=>{var[s,n]=r;return[s,t.includes(n)?void 0:n]}),Ve=(t,e)=>Array.from(e).map(r=>t.includes(r)?void 0:r),qe=(t,e)=>e&&t.length>e?"".concat(t.substring(0,e),"..."):t;function bt(t,e,r,s,n,o,a){try{var p=t[o](a),i=p.value}catch(g){return void r(g)}p.done?e(i):Promise.resolve(i).then(s,n)}function m(t){return function(){var e=this,r=arguments;return new Promise(function(s,n){var o=t.apply(e,r);function a(i){bt(o,s,n,a,p,"next",i)}function p(i){bt(o,s,n,a,p,"throw",i)}a(void 0)})}}var Y=class{attachment(){var e=this;return m(function*(){yield e.warning()})()}attachmentFromPath(){var e=this;return m(function*(){yield e.warning()})()}globalAttachment(){var e=this;return m(function*(){yield e.warning()})()}globalAttachmentFromPath(){var e=this;return m(function*(){yield e.warning()})()}globalError(){var e=this;return m(function*(){yield e.warning()})()}description(){var e=this;return m(function*(){yield e.warning()})()}descriptionHtml(){var e=this;return m(function*(){yield e.warning()})()}displayName(){var e=this;return m(function*(){yield e.warning()})()}historyId(){var e=this;return m(function*(){yield e.warning()})()}labels(){var e=this;return m(function*(){yield e.warning()})()}links(){var e=this;return m(function*(){yield e.warning()})()}parameter(){var e=this;return m(function*(){yield e.warning()})()}logStep(){var e=this;return m(function*(){yield e.warning()})()}step(e,r){var s=this;return m(function*(){return yield s.warning(),r()})()}stepDisplayName(){var e=this;return m(function*(){yield e.warning()})()}stepParameter(){var e=this;return m(function*(){yield e.warning()})()}testCaseId(){var e=this;return m(function*(){yield e.warning()})()}warning(){return m(function*(){console.log("no test runtime is found. Please check test framework configuration")})()}},A=new Y;function Ye(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i,function(r,s,n,o,a){return s?e?".jsx":".js":!n||o&&a?n+o+"."+a.toLowerCase()+"js":r}):t}var Tt="allureTestRuntime",Z=t=>{globalThis[Tt]=()=>t},J=()=>globalThis?.[Tt],X=()=>{var t=J();if(t){var e;return(e=t())!==null&&e!==void 0?e:A}return A},Q=()=>{var t=J();if(t){var e;return(e=t())!==null&&e!==void 0?e:A}var r="allure-playwright/autoconfig";return import(Ye(r)).then(()=>{var s,n;return(s=(n=J())===null||n===void 0?void 0:n())!==null&&s!==void 0?s:A}).catch(()=>A)};var u=function(e){for(var r=arguments.length,s=new Array(r>1?r-1:0),n=1;n<r;n++)s[n-1]=arguments[n];var o=Q();return P(o)?o.then(a=>a[e](...s)):o[e](...s)},h=(t,e)=>u("labels",{name:t,value:e}),Je=function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return u("labels",...r)},tt=(t,e,r)=>u("links",{url:t,type:r,name:e}),Ze=function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return u("links",...r)},Xe=(t,e,r)=>u("parameter",t,e,r),Qe=t=>u("description",t),tr=t=>u("descriptionHtml",t),er=t=>u("displayName",t),rr=t=>u("historyId",t),sr=t=>u("testCaseId",t),nr=(t,e,r)=>{var s=typeof r=="string"?{contentType:r}:r;return u("attachment",t,e,s)},or=(t,e,r)=>{var s=typeof r=="string"?{contentType:r}:r;return u("globalAttachment",t,e,s)},ar=(t,e,r)=>{var s=typeof r=="string"?{contentType:r}:r;return u("globalAttachmentFromPath",t,e,s)},ir=t=>u("globalError",t),pr=(t,e)=>u("attachmentFromPath",t,e,{contentType:"application/vnd.allure.playwright-trace"}),ur=(t,e,r)=>{var s=typeof r=="string"?{contentType:r}:r;return u("attachmentFromPath",t,e,s)},cr=()=>({displayName:t=>u("stepDisplayName",t),parameter:(t,e,r)=>u("stepParameter",t,e,r)}),lr=(t,e,r)=>u("logStep",t,e,r),fr=(t,e)=>u("step",t,()=>e(cr())),mr=(t,e)=>tt(t,e,k.ISSUE),dr=(t,e)=>tt(t,e,k.TMS),gr=t=>h(f.ALLURE_ID,t),yr=t=>h(f.EPIC,t),hr=t=>h(f.FEATURE,t),Sr=t=>h(f.STORY,t),vr=t=>h(f.SUITE,t),xr=t=>h(f.PARENT_SUITE,t),br=t=>h(f.SUB_SUITE,t),Tr=t=>h(f.OWNER,t),Ar=t=>h(f.SEVERITY,t),Er=t=>h(f.LAYER,t),Cr=t=>h(f.TAG,t),Pr=function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return u("labels",...r.map(n=>({name:f.TAG,value:n})))};var At={stepsFromCommands:{maxArgumentLength:128,maxArgumentDepth:3}},Et=(t,e)=>{let r=t.findIndex(e);return r!==-1?et(t.splice(r)):[]},et=t=>{let e=t.length,r=new Array(e);for(let s=0;s<e;s++)r[e-s-1]=t[s];return r},Ct=t=>t[t.length-1],Pt=t=>typeof t<"u";var d=()=>{let t=Cypress.env("allure");return t||(t={config:At,initialized:!1,messages:[],testPlan:void 0,currentTest:void 0,projectDir:void 0,stepStack:[],stepsToFinalize:[],nextApiStepId:0},Cypress.env("allure",t)),t},_t=()=>d().initialized,Dt=()=>{d().initialized=!0},rt=()=>d().messages,Rt=t=>{d().messages=t},c=t=>{rt().push(t)},wt=()=>d().testPlan,kt=()=>d().projectDir,Mt=()=>d().currentTest,Ft=t=>{d().currentTest=t},Lt=()=>{d().currentTest=void 0},It=()=>d().config,b=()=>d().stepStack,Ot=()=>Ct(b()),F=t=>b().push(t);var Dr=t=>et(b().splice(t)),jt=()=>Dr(0);var L=(t,e)=>d().stepsToFinalize.push([t,e]),Ht=()=>d().stepsToFinalize,Nt=()=>{let t=d();t.stepsToFinalize=[]};var zt=(t,e)=>{let r=wt();if(r){let s=Ut(t);for(let n of Rr(e)){let o=wr(r,t,s,n.tests);kr(n.tests,o)}}},Rr=function*(t){let e=[];for(let r=t;r;r=e.pop()){yield r;for(let s=r.suites.length-1;s>=0;s--)e.push(r.suites[s])}},wr=(t,e,r,s)=>{let n=[];return s.forEach((o,a)=>{let{fullNameSuffix:p,labels:i}=st(o),g=`${r}#${p}`,S=i.find(({name:v})=>v===f.ALLURE_ID)?.value;Mr(t,g,S)||n.push(a)}),n},kr=(t,e)=>{for(let r=e.length-1;r>=0;r--)t.splice(e[r],1)},Mr=(t,e,r)=>t.tests.some(s=>r&&s.id?.toString()===r||s.selector===e);var I="__allure_report_system_hook__",Gt=()=>{Cypress.mocha.getRunner().on("start",Fr).on("suite",Lr).on("suite end",qt).on("hook",Ir).on("hook end",Or).on("test",jr).on("pass",Yt).on("fail",Hr).on("pending",Jt).on("test end",pt)},Bt=()=>{afterEach(I,ut),after(I,Nr)},Fr=()=>{Kt(),$t()},Lr=t=>{t.root&&zt(Cypress.spec,t),Vt(t)},Ir=t=>{E(t)||nt(t)},Or=t=>{E(t)||O(t)},jr=t=>{_(t)||ot(t)},Hr=(t,e)=>{let r="hookName"in t;if(r&&Wt(t))return;r&&E(t)&&nt(t,Date.now()-(t.duration??0)),at(e),r&&it(t,e)},Nr=function(){ut(),C(this)};var Zt=Cypress.platform==="win32",Xt=t=>t.substring(t.lastIndexOf(Zt?"\\":"/")+1),Ut=t=>{let e=kt(),r=e?t.absolute.substring(e.length+1):t.relative;return Zt?r.replaceAll("\\","/"):r},Qt=t=>Array.isArray(t)||t.buffer?btoa(String.fromCharCode.apply(null,t)):t,ct=t=>({...st(t),start:typeof t.wallClockStartedAt=="string"?Date.parse(t.wallClockStartedAt):t.wallClockStartedAt?.getTime?.()||Date.now()}),te=t=>({duration:t.duration??0,retries:t._retries??0}),lt=()=>({statusDetails:{message:"This is a pending test"}}),ee=(t,e,r)=>{let s={id:t.id,stop:Date.now(),status:e??ue(t)};return r&&(s.statusDetails=r),s},re=Symbol("The test has been reported to Allure"),ft=t=>{t[re]=!0},_=t=>t[re]===!0,zr=function*(t){let e=[];for(let r=t;r;r=e.pop()){yield r;for(let s=r.suites.length-1;s>=0;s--)e.push(r.suites[s])}},se=function*(t){for(let e of zr(t))yield*e.tests},ne=t=>{let e=[];for(let r=t.parent;r;r=r.parent)e.push(r);return e.reverse(),e};var oe=()=>(d().nextApiStepId++).toString(),st=t=>{let e=t.title,{cleanTitle:r,labels:s,links:n}=q(e),a=`${[...t.titlePath().slice(0,-1),r].join(" ")}`;return{name:r,labels:s,links:n,fullNameSuffix:a}},E=t=>t.title.includes(I),Wt=t=>t.parent.root&&t.hookName==="after all",ae=t=>{let e=t.test;return t.test.parent.hooks.findLast(o=>o.hookName==="after all")?.hookId===e.hookId},ie=(t,e,r,s)=>{let n=e?l.SKIPPED:x(r),{message:o,trace:a}=y(r);return{status:n,statusDetails:{message:e?Ur(t,s):o,trace:a}}},Ur=(t,e)=>{let r=e.title?`'${e.title}'`:"root";return`'${t}' defined in the ${r} suite has failed`},D=t=>typeof t.attributes.consoleProps=="function"?t.attributes.consoleProps():t.attributes.consoleProps,pe=t=>typeof t?.attributes?.renderProps=="function"?t.attributes.renderProps():t.attributes?.renderProps;var R={},ce=t=>t.type==="api",w=t=>t.type==="log",j=t=>U(Gr(),t),Gr=()=>{let t=oe();return F({id:t,type:"api"}),t},le=t=>{let e=x(t),r=y(t);Wr(e,r),me(t)},H=(t,e)=>N(r=>ce(r),t,e),N=(t,e,r)=>fe(Et(b(),t),e,r),z=(t,e)=>fe(jt(),t,e),mt=()=>{z(),Ht().forEach(Br),Nt()},ue=t=>t.error?x(t.error):l.PASSED,Br=([t,e])=>{let{id:r,error:s}=t,n={id:r};s&&(n.statusDetails=y(s)),e?.(n),c({type:"cypress_step_finalize",data:n})},Wr=(t,e)=>{let r=b(),s=r.at(r.findLastIndex(w)+1);s&&N(n=>Object.is(n,s),t,e)},Kr=(t,e)=>{if(w(t)){let r=t.log.attributes.error;if(r)return t.error=r}return e&&(t.error=e),t.error},fe=(t,e,r)=>{let s;for(let n of t)s=Kr(n,s),$r(n,e,r);s&&me(s)},me=t=>b().forEach(e=>e.error=t),$r=(t,e,r)=>{de(t,e,r),ce(t)&&t.error&&L(t)};var Kt=()=>Z(new dt),gt=()=>X(),dt=class{constructor(){this.#e()}labels(...e){return this.#t({type:"metadata",data:{labels:e}})}links(...e){return this.#t({type:"metadata",data:{links:e}})}parameter(e,r,s){return this.#t({type:"metadata",data:{parameters:[{name:e,value:r,...s}]}})}description(e){return this.#t({type:"metadata",data:{description:e}})}descriptionHtml(e){return this.#t({type:"metadata",data:{descriptionHtml:e}})}displayName(e){return this.#t({type:"metadata",data:{displayName:e}})}historyId(e){return this.#t({type:"metadata",data:{historyId:e}})}testCaseId(e){return this.#t({type:"metadata",data:{testCaseId:e}})}attachment(e,r,s){let[n,o]=this.#s(r);return this.#t({type:"attachment_content",data:{name:e,content:n,encoding:o,contentType:s.contentType,fileExtension:s.fileExtension}})}attachmentFromPath(e,r,s){return this.#t({type:"attachment_path",data:{name:e,path:r,contentType:s.contentType,fileExtension:s.fileExtension}})}globalAttachment(e,r,s){let[n,o]=this.#s(r);return this.#t({type:"global_attachment_content",data:{name:e,content:n,encoding:o,contentType:s.contentType,fileExtension:s.fileExtension}})}globalAttachmentFromPath(e,r,s){return this.#t({type:"global_attachment_path",data:{name:e,path:r,contentType:s.contentType,fileExtension:s.fileExtension}})}globalError(e){return this.#t({type:"global_error",data:e})}logStep(e,r=l.PASSED,s){return this.#a()?(j(e),H(r,s?y(s):void 0),Cypress.Promise.resolve()):cy.wrap(R,{log:!1}).then(()=>(j(e),Cypress.Promise.resolve())).then(()=>(H(r,s?y(s):void 0),Cypress.Promise.resolve()))}step(e,r){return cy.wrap(R,{log:!1}).then(()=>(j(e),Cypress.Promise.resolve(r()))).then(s=>(H(),s))}stepDisplayName(e){return this.#t({type:"step_metadata",data:{name:e}})}stepParameter(e,r,s){return this.#t({type:"step_metadata",data:{parameters:[{name:e,value:r,mode:s}]}})}flushAllureMessagesToTask(e){let r=this.#r();r.length&&cy.task(e,{absolutePath:Cypress.spec.absolute,messages:r},{log:!1})}flushAllureMessagesToTaskAsync(e){let r=this.#r();if(r.length){let s={absolutePath:Cypress.spec.absolute,messages:r,isInteractive:Cypress.config("isInteractive")};return cy.task(e,s,{log:!1})}}#e(){Rt([])}#t(e){return c(e),Cypress.Promise.resolve()}#r(){let e=rt();return this.#e(),e}#s(e){let r=this.#n(e),s=typeof r=="string"?"utf8":"base64";return[Qt(r),s]}#n(e){return typeof e=="string"?e:this.#o(e)?new Uint8Array(e.data):e}#o(e){if(!e||typeof e!="object")return!1;let r=e;return r.type==="Buffer"&&Array.isArray(r.data)}#a(){try{let e=!!window.cypressOriginContext,r=!!window.cypressOriginWindow;if(e||r)return!0;let s=Cypress.config("baseUrl"),n=window.location.origin;if(s&&n!==s)return!0;let o=window.Cypress;if(o&&o.state&&o.state("origin"))return!0;try{let a=typeof cy<"u",p=typeof cy.task<"u";if(!a||!p)return!0}catch{return!0}return!1}catch{return!0}}};var $t=()=>{c({type:"cypress_run_start",data:{}})},Vt=t=>{c({type:"cypress_suite_start",data:{id:t.id,name:t.title,root:t.root,start:Date.now()}})},qt=t=>{c({type:"cypress_suite_end",data:{root:t.root,stop:Date.now()}})},nt=(t,e)=>{c({type:"cypress_hook_start",data:{name:t.title,scopeType:t.hookName.includes("each")?"each":"all",position:t.hookName.includes("before")?"before":"after",start:e??Date.now()}})},O=t=>{mt(),c({type:"cypress_hook_end",data:{duration:t.duration??0}})},ot=t=>{Ft(t),c({type:"cypress_test_start",data:ct(t)}),ft(t)},U=(t,e)=>{c({type:"cypress_step_start",data:{id:t,name:e,start:Date.now()}})},de=(t,e,r)=>{c({type:"cypress_step_stop",data:ee(t,e,r)})},Yt=()=>{c({type:"cypress_test_pass",data:{}})},at=t=>{let e=x(t),r=y(t);z(e,r),c({type:"cypress_fail",data:{status:e,statusDetails:r}})},it=(t,e)=>{let r=t.hookName.includes("each"),s=t.parent,n=ie(t.title,r,e,s);O(t),Vr(),qr(s,n)},Jt=t=>{_(t)?z(l.SKIPPED,{message:"The test was skipped before the command was completed"}):ot(t),c({type:"cypress_test_skip",data:lt()})},pt=t=>{mt(),c({type:"cypress_test_end",data:{duration:t.duration??0,retries:t._retries??0}}),Lt()},ge=(t,e)=>{c({type:"attachment_path",data:{path:t,name:e,contentType:W.PNG}})},C=t=>{if(ae(t)){let e=t.test;return E(e)||O(e),ye()}},yt=(t,e)=>{try{return at(e),it(t.test,e),ye()}catch(r){Jr(t,r)}},ht=(t,e)=>{if(!yt(t,e)?.then(()=>{throw e}))throw e},ut=()=>gt().flushAllureMessagesToTask("reportAllureCypressSpecMessages"),ye=()=>gt().flushAllureMessagesToTaskAsync("reportFinalAllureCypressSpecMessages"),Vr=()=>{let t=Mt();t&&pt(t)},qr=(t,e)=>{for(let r of se(t))_(r)||Yr(r,r.pending?{...lt(),status:l.SKIPPED}:e)},Yr=(t,e)=>{c({type:"cypress_skipped_test",data:{...ct(t),...e,...te(t),suites:ne(t).map(r=>r.id)}}),ft(t)},Jr=(t,e)=>{try{console.error(`Unexpected error when reporting the failure of ${t.test?.title??"'after all'"}`),console.error(e)}catch{}};var Se=()=>{let t=Zr();Xr(t),Qr(t)},Zr=()=>{let t=0;return{getSuiteDepth:()=>t,incrementSuiteDepth:()=>{t++},decrementSuiteDepth:()=>{t--}}},Xr=({incrementSuiteDepth:t,decrementSuiteDepth:e})=>{let r=o=>(a,p,i)=>{t();try{return ts(o,a,p,i)}finally{e()}},s=globalThis.describe,n=r(s);n.only=r(s.only),n.skip=r(s.skip),globalThis.describe=n},Qr=({getSuiteDepth:t})=>{let e=globalThis.after,r=(s,n)=>typeof s=="string"?e(s,he(t,n)):e(he(t,s));globalThis.after=r},ts=(t,...e)=>{let[r,s,n]=e;return typeof n>"u"&&typeof s>"u"?t(r):typeof s=="function"?t(r,s):t(r,s,n)},he=(t,e)=>{if(t()===0&&e){let r=e.length?es(e):rs(e);return Object.defineProperty(r,"name",{value:e.name}),r}return e},es=t=>function(e){let r=s=>{if(s){yt(this,s)?.then(()=>e(s))||e(s);return}try{if(C(this)?.then(()=>e()))return}catch(n){e(n);return}e()};return t.bind(this)(r)},rs=t=>function(){let e,r;try{e=t.bind(this)()}catch(s){r=s}if(r)ht(this,r);else return P(e)?e.then(()=>C(this),s=>ht(this,s)):(C(this),e)};var xe=t=>ns(t)?Ae(t):ss(t),be=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Te=(t,e=[])=>{if(!be(t))return t;let r={};e.push(t);for(let[s,n]of Object.entries(t))if(typeof n=="object"&&n!==null){if(e.includes(n))continue;r[s]=Te(n,e)}else r[s]=n;return e.pop(),r},ss=t=>{if(be(t)){let e=Te(t);return T({...e},ve())}return T(t,ve())},ve=()=>{let{stepsFromCommands:{maxArgumentDepth:t,maxArgumentLength:e}}=It();return{maxDepth:t,maxLength:e,nonNullReplacerWithDomSupport:os}},ns=t=>typeof t=="object"&&t!==null&&Cypress.dom.isDom(t),Ae=t=>Cypress.dom.stringify(t,"long"),os=(t,e)=>{if(typeof e=="object"){if(e===null)return;if(Cypress.dom.isDom(e))return Ae(e)}return e};var Ee=t=>{let{event:e,instrument:r}=t.attributes;return!(r!=="command"||e||ps(t))},Ce=(t,e)=>{let r=Ot();if(r&&w(r)){let{name:s,props:{name:n}}=D(r.log);s==="screenshot"&&n===t&&(r.attachmentName=e)}},Pe=t=>{let e=gs();typeof e<"u"&&ys(e.log,t)&&G(e.log.attributes.id),as(t),U(t.attributes.id,us(t)),is(t)},G=t=>N(({id:e})=>e===t),as=t=>{let r={id:t.attributes.id,type:"log",log:t};F(r),L(r,s=>{s.parameters=cs(t),r.attachmentName&&(s.name=r.attachmentName)})},is=t=>{let{groupStart:e,end:r,id:s}=t.attributes;if(r)G(s);else if(e){let n=t.endGroup;t.endGroup=function(){return G(s),n.call(this)}}else{let n=t.end;t.end=function(){return G(s),n.call(this)}}},ps=t=>{let{name:e}=t.attributes;return e==="then"&&Object.is(D(t).props["Applied To"],R)},us=t=>{let{name:e,message:r,displayName:s}=t.attributes,n=(s??e).trim(),o=(_e(t)??fs(t)??pe(t).message??r).trim();return[n,o].filter(Boolean).join(" ")},cs=t=>ms(t).map(([e,r])=>({name:e.toString(),value:xe(r)})).filter(hs(t)),ls=["Given","When","Then","And"],fs=t=>{let{attributes:{name:e,message:r}}=t;if(ls.includes(e.trim())&&r.startsWith("**")&&r.endsWith("**"))return r.substring(2,r.length-2)},ms=t=>{let e=!!_e(t),{props:r,name:s}=D(t);return["clearLocalStorage"].includes(s)?[]:Object.entries(r).filter(([n,o])=>Pt(o)&&!(e&&n==="Message"))},_e=t=>{if(ds(t)){let e=D(t).props.Message;if(e&&typeof e=="string")return e}},ds=({attributes:{name:t}})=>t==="assert",gs=()=>b().findLast(w),ys=(t,e)=>{let{groupStart:r,type:s}=t.attributes,{type:n}=e.attributes;return!r&&(s==="child"||n!=="child")},hs=t=>t.attributes.name==="wrap"?()=>!0:({name:e,value:r})=>e!=="Yielded"||r!=="{}";var De=()=>Cypress.on("fail",Re).on("log:added",vs),St=()=>Cypress.Screenshot.defaults({onAfterScreenshot:Ss}),Ss=(...[,{name:t,path:e}])=>{let r=t??Xt(e);ge(e,r),Ce(t,r)},vs=(t,e)=>{Ee(e)&&Pe(e)},Re=t=>{if(le(t),xs())throw t},xs=()=>Object.is(Cypress.listeners("fail").at(-1),Re);var we=()=>{Gt(),De(),Bt(),Se()};var ke=()=>{_t()||(Dt(),we(),St())};ke();export{W as ContentType,f as LabelName,k as LinkType,Le as Severity,Fe as Stage,l as Status,Me as StatusByPriority,gr as allureId,pr as attachTrace,nr as attachment,ur as attachmentPath,Qe as description,tr as descriptionHtml,er as displayName,yr as epic,hr as feature,or as globalAttachment,ar as globalAttachmentPath,ir as globalError,rr as historyId,mr as issue,h as label,Je as labels,Er as layer,tt as link,Ze as links,lr as logStep,Tr as owner,Xe as parameter,xr as parentSuite,Ar as severity,fr as step,Sr as story,br as subSuite,vr as suite,Cr as tag,Pr as tags,sr as testCaseId,dr as tms};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|