allure-cypress 3.13.0 → 3.15.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.
Files changed (37) hide show
  1. package/README.md +15 -1
  2. package/dist/cjs/browser/events/cypress.js +17 -5
  3. package/dist/cjs/browser/events/cypress.js.map +1 -1
  4. package/dist/cjs/browser/lifecycle.js +3 -1
  5. package/dist/cjs/browser/lifecycle.js.map +1 -1
  6. package/dist/cjs/browser/runtime.js +83 -14
  7. package/dist/cjs/browser/runtime.js.map +1 -1
  8. package/dist/cjs/browser/serialize.js +15 -17
  9. package/dist/cjs/browser/serialize.js.map +1 -1
  10. package/dist/cjs/browser/steps.js +4 -2
  11. package/dist/cjs/browser/steps.js.map +1 -1
  12. package/dist/cjs/browser/utils.js +3 -1
  13. package/dist/cjs/browser/utils.js.map +1 -1
  14. package/dist/cjs/index.js +1 -1
  15. package/dist/cjs/index.js.map +4 -4
  16. package/dist/cjs/reporter.js +97 -56
  17. package/dist/cjs/reporter.js.map +1 -1
  18. package/dist/esm/browser/events/cypress.js +17 -5
  19. package/dist/esm/browser/events/cypress.js.map +1 -1
  20. package/dist/esm/browser/lifecycle.js +2 -1
  21. package/dist/esm/browser/lifecycle.js.map +1 -1
  22. package/dist/esm/browser/runtime.js +83 -15
  23. package/dist/esm/browser/runtime.js.map +1 -1
  24. package/dist/esm/browser/serialize.js +15 -17
  25. package/dist/esm/browser/serialize.js.map +1 -1
  26. package/dist/esm/browser/steps.js +3 -2
  27. package/dist/esm/browser/steps.js.map +1 -1
  28. package/dist/esm/browser/utils.js +2 -1
  29. package/dist/esm/browser/utils.js.map +1 -1
  30. package/dist/esm/index.js +1 -1
  31. package/dist/esm/index.js.map +4 -4
  32. package/dist/esm/reporter.js +98 -57
  33. package/dist/esm/reporter.js.map +1 -1
  34. package/dist/types/browser/runtime.d.ts +7 -2
  35. package/dist/types/browser/steps.d.ts +1 -1
  36. package/dist/types/reporter.d.ts +5 -0
  37. package/package.json +4 -7
@@ -1,4 +1,4 @@
1
- import type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, StatusDetails } from "allure-js-commons";
1
+ import type { AllureMetricResult, AttachmentOptions, GlobalErrorArgs, Label, Link, ParameterMode, ParameterOptions } from "allure-js-commons";
2
2
  import { Status } from "allure-js-commons";
3
3
  import type { SyncTestRuntime, TestRuntime } from "allure-js-commons/sdk/runtime";
4
4
  export declare const initTestRuntime: () => void;
@@ -12,6 +12,10 @@ declare class AllureCypressTestRuntime implements TestRuntime {
12
12
  parameter(name: string, value: string, options?: ParameterOptions): PromiseLike<void>;
13
13
  description(markdown: string): PromiseLike<void>;
14
14
  descriptionHtml(html: string): PromiseLike<void>;
15
+ precondition(markdown: string): PromiseLike<void>;
16
+ preconditionHtml(html: string): PromiseLike<void>;
17
+ expectedResult(markdown: string): PromiseLike<void>;
18
+ expectedResultHtml(html: string): PromiseLike<void>;
15
19
  displayName(name: string): PromiseLike<void>;
16
20
  historyId(value: string): PromiseLike<void>;
17
21
  testCaseId(value: string): PromiseLike<void>;
@@ -19,7 +23,8 @@ declare class AllureCypressTestRuntime implements TestRuntime {
19
23
  attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, "encoding">): PromiseLike<void>;
20
24
  globalAttachment(name: string, content: Uint8Array | Buffer | string, options: AttachmentOptions): PromiseLike<void>;
21
25
  globalAttachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, "encoding">): PromiseLike<void>;
22
- globalError(details: StatusDetails): PromiseLike<void>;
26
+ globalError(...args: GlobalErrorArgs): PromiseLike<void>;
27
+ metrics(...results: AllureMetricResult[]): PromiseLike<void>;
23
28
  logStep(name: string, status?: Status, error?: Error): PromiseLike<void>;
24
29
  step<T = void>(name: string, body: () => T | PromiseLike<T>): Cypress.ThenReturn<T, T>;
25
30
  stepDisplayName(name: string): PromiseLike<void>;
@@ -11,4 +11,4 @@ export declare const stopCurrentAllureApiStep: (status?: Status, statusDetails?:
11
11
  export declare const findAndStopStepWithSubsteps: (pred: (stepEntry: StepDescriptor) => boolean, status?: Status, statusDetails?: StatusDetails) => void;
12
12
  export declare const stopAllSteps: (status?: Status, statusDetails?: StatusDetails) => void;
13
13
  export declare const finalizeSteps: () => void;
14
- export declare const resolveStepStatus: (step: StepDescriptor) => Status;
14
+ export declare const resolveStepStatus: (step: StepDescriptor) => Status.PASSED | import("allure-js-commons").ErrorStatus;
@@ -7,6 +7,11 @@ export declare class AllureCypress {
7
7
  videoOnFailOnly: boolean;
8
8
  constructor(config?: AllureCypressConfig);
9
9
  attachToCypress: (on: Cypress.PluginEvents) => void;
10
+ /**
11
+ * Forward `after:screenshot` here if you define your own handler. Pass the
12
+ * final screenshot path after any changes made by your handler.
13
+ */
14
+ onAfterScreenshot: ({ path }: Cypress.ScreenshotDetails) => void;
10
15
  /**
11
16
  * Forward the `after:spec` event into Allure Cypress using this function if
12
17
  * you need to define your own handler or combine Allure Cypress with other
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure-cypress",
3
- "version": "3.13.0",
3
+ "version": "3.15.0",
4
4
  "description": "Allure Cypress integration",
5
5
  "keywords": [
6
6
  "allure",
@@ -60,26 +60,23 @@
60
60
  "test": "vitest run"
61
61
  },
62
62
  "dependencies": {
63
- "allure-js-commons": "3.13.0"
63
+ "allure-js-commons": "3.15.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@babel/cli": "^8.0.1",
67
67
  "@babel/core": "^7.28.0",
68
- "@babel/plugin-transform-modules-commonjs": "^7.27.1",
69
68
  "@babel/preset-env": "^7.28.0",
70
69
  "@babel/preset-typescript": "^7.27.1",
71
- "@types/babel__core": "^7.20.5",
72
- "@types/babel__preset-env": "^7.10.0",
73
70
  "@types/node": "^26.0.1",
74
71
  "allure-commandline": "^2.29.0",
75
- "allure-vitest": "3.13.0",
72
+ "allure-vitest": "3.15.0",
76
73
  "babel-plugin-add-module-exports": "^1.0.4",
77
74
  "cypress": "^16.0.0",
78
75
  "esbuild": "^0.27.0",
79
76
  "npm-run-all2": "^9.0.2",
80
77
  "rimraf": "^6.0.0",
81
78
  "typescript": "^6.0.3",
82
- "vitest": "^4.1.10"
79
+ "vitest": "^4.1.11"
83
80
  },
84
81
  "peerDependencies": {
85
82
  "cypress": ">=12.17.4"