allure-codeceptjs 2.15.1 → 3.0.0-beta.10

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/README.md CHANGED
@@ -19,47 +19,109 @@ npm i -D allure-codeceptjs
19
19
  ```
20
20
 
21
21
  ## Usage
22
+
22
23
  Add the allure plugin inside you plugins section of your CodeceptJS config file.
23
24
  For instance the config file is `codecept.config.(js|ts)` then:
24
- ```
25
+
26
+ ```js
27
+ module.exports.config = {
25
28
  plugins: {
26
- ...
29
+ // ...
27
30
  allure: {
28
31
  enabled: true,
29
32
  require: "allure-codeceptjs",
30
33
  },
31
- ...
34
+ // ...
32
35
  }
33
36
  };
34
37
  ```
35
38
 
36
- ## Metadata usage
39
+ ## Allure Runtime API usage
37
40
 
38
41
  Right now you can access allure API through codeceptjs container.
39
42
 
40
43
  ```js
44
+ import { label, tag, tags, issue, owner, layer, allureId, description, story, feature, epic, attachment } from "allure-js-commons";
45
+
41
46
  Feature("login-feature");
42
47
  Scenario("login-scenario1", async () => {
43
- const allure = codeceptjs.container.plugins("allure");
44
-
45
- allure.label("name", "value");
46
- allure.tag("tag1");
47
- allure.tags("tag2", "tag3");
48
- allure.issue("issueName", "google.com");
49
- allure.owner("eroshenkoam");
50
- allure.layer("UI");
51
- allure.id("228");
52
- allure.description("aga");
53
- allure.story("aga");
54
- allure.feature("aga");
55
- allure.epic("aga");
56
- allure.epic("severity");
57
- allure.addAttachment("data.txt", "some data", "text/plain");
48
+ await label("name", "value");
49
+ await tag("tag1");
50
+ await tags("tag2", "tag3");
51
+ await issue("issueName", "google.com");
52
+ await owner("eroshenkoam");
53
+ await layer("UI");
54
+ await allureId("228");
55
+ await description("aga");
56
+ await story("aga");
57
+ await feature("aga");
58
+ await epic("aga");
59
+ await attachment("data.txt", "some data", "text/plain");
58
60
  });
59
61
  ```
60
62
 
61
63
  You can also use tags to manage labels on scenarios.
62
64
 
65
+ ## Links usage
66
+
67
+ ```js
68
+ import { link, issue, tms } from "allure-js-commons";
69
+
70
+ Feature("login-feature");
71
+ Scenario("login-scenario1", async () => {
72
+ await link("link_type", "https://allurereport.org", "Allure Report");
73
+ await issue("Issue Name", "https://github.com/allure-framework/allure-js/issues/352");
74
+ await tms("Task Name", "https://github.com/allure-framework/allure-js/tasks/352");
75
+ });
76
+ ```
77
+
78
+ You can also configure links formatters to make usage much more convenient. `%s`
79
+ in `urlTemplate` parameter will be replaced by given value.
80
+
81
+ ```diff
82
+ module.exports.config = {
83
+ // ...
84
+ plugins: {
85
+ allure: {
86
+ enabled: true,
87
+ require: "allure-codeceptjs",
88
+ + links: [
89
+ + {
90
+ + type: "${LinkType.ISSUE}",
91
+ + urlTemplate: "https://example.org/issues/%s",
92
+ + nameTemplate: "Issue: %s",
93
+ + },
94
+ + {
95
+ + type: "${LinkType.TMS}",
96
+ + urlTemplate: "https://example.org/tasks/%s",
97
+ + }
98
+ + ]
99
+ },
100
+ },
101
+ // ...
102
+ };
103
+ ```
104
+
105
+ Then you can assign link using shorter notation:
106
+
107
+ ```js
108
+ import { link, issue, tms } from "allure-js-commons";
109
+
110
+ Feature("login-feature");
111
+ Scenario("login-scenario1", async () => {
112
+ await issue("351");
113
+ await issue("352", "Issue Name");
114
+ await tms("351");
115
+ await tms("352", "Task Name");
116
+ await link("custom", "352");
117
+ await link("custom", "352", "Link name");
118
+ });
119
+ ```
120
+
121
+ ## Tags metadata API
122
+
123
+ You also can mark up your tests with Allure metadata using CodeceptJS tags API.
124
+
63
125
  ### Id
64
126
 
65
127
  ```javascript
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _codeceptjs = require("codeceptjs");
8
+ var _allureJsCommons = require("allure-js-commons");
9
+ var _legacy = require("./legacy.js");
10
+ var _reporter = require("./reporter.js");
11
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
+ var allurePlugin = config => {
17
+ var mocha = _codeceptjs.container.mocha();
18
+ mocha.reporter(_reporter.AllureCodeceptJsReporter.prototype.constructor, _objectSpread({}, config));
19
+ return _objectSpread(_objectSpread({}, _legacy.allureCodeceptJsLegacyApi), {}, {
20
+ // this method is used by various bundled codeceptjs plugins, e.g. by screenshotOnFail
21
+ addAttachment: (name, content, contentType) => {
22
+ // wrap it in attachmentStep. Since we use Mocha, Runtime API is sync, so no awaits is fine
23
+ (0, _allureJsCommons.attachment)(name, content, contentType);
24
+ }
25
+ });
26
+ };
27
+ var _default = exports.default = allurePlugin;
28
+ module.exports = exports.default;
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_codeceptjs","require","_allureJsCommons","_legacy","_reporter","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","allurePlugin","config","mocha","container","reporter","AllureCodeceptJsReporter","prototype","constructor","allureCodeceptJsLegacyApi","addAttachment","name","content","contentType","attachment","_default","exports","default","module"],"sources":["../../src/index.ts"],"sourcesContent":["import { container } from \"codeceptjs\";\nimport { attachment } from \"allure-js-commons\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\nimport { allureCodeceptJsLegacyApi } from \"./legacy.js\";\nimport { AllureCodeceptJsReporter } from \"./reporter.js\";\n\nconst allurePlugin = (config: ReporterConfig) => {\n const mocha = container.mocha();\n mocha.reporter(AllureCodeceptJsReporter.prototype.constructor, { ...config });\n\n return {\n ...allureCodeceptJsLegacyApi,\n // this method is used by various bundled codeceptjs plugins, e.g. by screenshotOnFail\n addAttachment: (name: string, content: Buffer | string, contentType: string) => {\n // wrap it in attachmentStep. Since we use Mocha, Runtime API is sync, so no awaits is fine\n attachment(name, content, contentType);\n },\n };\n};\n\nexport default allurePlugin;\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAAyD,SAAAI,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,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KA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CAAA,CAAA4B,IAAA,CAAA1B,CAAA,EAAAD,CAAA,uCAAAuB,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAA5B,CAAA,GAAA6B,MAAA,GAAAC,MAAA,EAAA7B,CAAA;AAEzD,IAAM8B,YAAY,GAAIC,MAAsB,IAAK;EAC/C,IAAMC,KAAK,GAAGC,qBAAS,CAACD,KAAK,CAAC,CAAC;EAC/BA,KAAK,CAACE,QAAQ,CAACC,kCAAwB,CAACC,SAAS,CAACC,WAAW,EAAA3B,aAAA,KAAOqB,MAAM,CAAE,CAAC;EAE7E,OAAArB,aAAA,CAAAA,aAAA,KACK4B,iCAAyB;IAC5B;IACAC,aAAa,EAAEA,CAACC,IAAY,EAAEC,OAAwB,EAAEC,WAAmB,KAAK;MAC9E;MACA,IAAAC,2BAAU,EAACH,IAAI,EAAEC,OAAO,EAAEC,WAAW,CAAC;IACxC;EAAC;AAEL,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEahB,YAAY;AAAAiB,MAAA,CAAAF,OAAA,GAAAA,OAAA,CAAAC,OAAA","ignoreList":[]}
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.allureCodeceptJsLegacyApi = void 0;
7
+ var allure = _interopRequireWildcard(require("allure-js-commons"));
8
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
9
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
+ /**
11
+ * @deprecated please use api exported by "allure-js-commons" instead.
12
+ */
13
+
14
+ /**
15
+ * @deprecated please use api exported by "allure-js-commons" instead.
16
+ */
17
+ var allureCodeceptJsLegacyApi = exports.allureCodeceptJsLegacyApi = {
18
+ /**
19
+ * @deprecated please use import { label } from "allure-js-commons" instead.
20
+ */
21
+ label: function label() {
22
+ return Promise.resolve(allure.label(...arguments));
23
+ },
24
+ /**
25
+ * @deprecated please use import { link } from "allure-js-commons" instead.
26
+ */
27
+ link: (type, url, name) => Promise.resolve(allure.link(url, name, type)),
28
+ /**
29
+ * @deprecated please use import { parameter } from "allure-js-commons" instead.
30
+ */
31
+ parameter: (name, value, options) => Promise.resolve(allure.parameter(name, value, options)),
32
+ /**
33
+ * @deprecated please use import { description } from "allure-js-commons" instead.
34
+ */
35
+ description: function description() {
36
+ return Promise.resolve(allure.description(...arguments));
37
+ },
38
+ /**
39
+ * @deprecated please use import { descriptionHtml } from "allure-js-commons" instead.
40
+ */
41
+ descriptionHtml: html => Promise.resolve(allure.descriptionHtml(html)),
42
+ /**
43
+ * @deprecated please use import { testCaseId } from "allure-js-commons" instead.
44
+ */
45
+ testCaseId: id => Promise.resolve(allure.testCaseId(id)),
46
+ /**
47
+ * @deprecated please use import { historyId } from "allure-js-commons" instead.
48
+ */
49
+ historyId: id => Promise.resolve(allure.historyId(id)),
50
+ /**
51
+ * @deprecated please use import { allureId } from "allure-js-commons" instead.
52
+ */
53
+ allureId: id => Promise.resolve(allure.allureId(id)),
54
+ /**
55
+ * @deprecated please use import { displayName } from "allure-js-commons" instead.
56
+ */
57
+ displayName: name => Promise.resolve(allure.displayName(name)),
58
+ /**
59
+ * @deprecated please use import { attachment } from "allure-js-commons" instead.
60
+ */
61
+ attachment: (name, content, type) => Promise.resolve(allure.attachment(name, content, {
62
+ contentType: type
63
+ })),
64
+ /**
65
+ * @deprecated please use import { issue } from "allure-js-commons" instead.
66
+ */
67
+ issue: (name, url) => Promise.resolve(allure.issue(url, name)),
68
+ /**
69
+ * @deprecated please use import { tms } from "allure-js-commons" instead.
70
+ */
71
+ tms: (name, url) => Promise.resolve(allure.tms(url, name)),
72
+ /**
73
+ * @deprecated please use import { epic } from "allure-js-commons" instead.
74
+ */
75
+ epic: name => Promise.resolve(allure.epic(name)),
76
+ /**
77
+ * @deprecated please use import { feature } from "allure-js-commons" instead.
78
+ */
79
+ feature: name => Promise.resolve(allure.feature(name)),
80
+ /**
81
+ * @deprecated please use import { story } from "allure-js-commons" instead.
82
+ */
83
+ story: name => Promise.resolve(allure.story(name)),
84
+ /**
85
+ * @deprecated please use import { suite } from "allure-js-commons" instead.
86
+ */
87
+ suite: name => Promise.resolve(allure.suite(name)),
88
+ /**
89
+ * @deprecated please use import { parentSuite } from "allure-js-commons" instead.
90
+ */
91
+ parentSuite: name => Promise.resolve(allure.parentSuite(name)),
92
+ /**
93
+ * @deprecated please use import { subSuite } from "allure-js-commons" instead.
94
+ */
95
+ subSuite: name => Promise.resolve(allure.subSuite(name)),
96
+ /**
97
+ * @deprecated please use import { owner } from "allure-js-commons" instead.
98
+ */
99
+ owner: name => Promise.resolve(allure.owner(name)),
100
+ /**
101
+ * @deprecated please use import { severity } from "allure-js-commons" instead.
102
+ */
103
+ severity: name => Promise.resolve(allure.severity(name)),
104
+ /**
105
+ * @deprecated please use import { layer } from "allure-js-commons" instead.
106
+ */
107
+ layer: name => Promise.resolve(allure.layer(name)),
108
+ /**
109
+ * @deprecated please use import { tag } from "allure-js-commons" instead.
110
+ */
111
+ tag: name => Promise.resolve(allure.tag(name)),
112
+ /**
113
+ * @deprecated please use import { step } from "allure-js-commons" instead.
114
+ */
115
+ step: (name, body) => Promise.resolve(allure.step(name, body))
116
+ };
117
+ //# sourceMappingURL=legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy.js","names":["allure","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","allureCodeceptJsLegacyApi","exports","label","Promise","resolve","arguments","link","type","url","name","parameter","value","options","description","descriptionHtml","html","testCaseId","id","historyId","allureId","displayName","attachment","content","contentType","issue","tms","epic","feature","story","suite","parentSuite","subSuite","owner","severity","layer","tag","step","body"],"sources":["../../src/legacy.ts"],"sourcesContent":["import * as allure from \"allure-js-commons\";\n\n/**\n * @deprecated please use api exported by \"allure-js-commons\" instead.\n */\nexport interface AllureCodeceptJsLegacyApi {\n label: (name: string, value: string) => Promise<void>;\n link: (type: string, url: string, name?: string) => Promise<void>;\n parameter: (\n name: string,\n value: string,\n options?: { excluded?: boolean; mode?: \"hidden\" | \"masked\" | \"default\" },\n ) => Promise<void>;\n description: (markdown: string) => Promise<void>;\n descriptionHtml: (html: string) => Promise<void>;\n testCaseId: (id: string) => Promise<void>;\n historyId: (id: string) => Promise<void>;\n allureId: (id: string) => Promise<void>;\n displayName: (name: string) => Promise<void>;\n attachment: (name: string, content: Buffer | string, type: string) => Promise<void>;\n issue: (name: string, url: string) => Promise<void>;\n tms: (name: string, url: string) => Promise<void>;\n epic: (name: string) => Promise<void>;\n feature: (name: string) => Promise<void>;\n story: (name: string) => Promise<void>;\n suite: (name: string) => Promise<void>;\n parentSuite: (name: string) => Promise<void>;\n subSuite: (name: string) => Promise<void>;\n owner: (name: string) => Promise<void>;\n severity: (name: string) => Promise<void>;\n layer: (name: string) => Promise<void>;\n tag: (name: string) => Promise<void>;\n step: (name: string, body: () => Promise<void>) => Promise<void>;\n}\n\n/**\n * @deprecated please use api exported by \"allure-js-commons\" instead.\n */\nexport const allureCodeceptJsLegacyApi: AllureCodeceptJsLegacyApi = {\n /**\n * @deprecated please use import { label } from \"allure-js-commons\" instead.\n */\n label: (...args) => Promise.resolve(allure.label(...args)),\n /**\n * @deprecated please use import { link } from \"allure-js-commons\" instead.\n */\n link: (type, url, name) => Promise.resolve(allure.link(url, name, type)),\n /**\n * @deprecated please use import { parameter } from \"allure-js-commons\" instead.\n */\n parameter: (name, value, options) => Promise.resolve(allure.parameter(name, value, options)),\n /**\n * @deprecated please use import { description } from \"allure-js-commons\" instead.\n */\n description: (...args) => Promise.resolve(allure.description(...args)),\n /**\n * @deprecated please use import { descriptionHtml } from \"allure-js-commons\" instead.\n */\n descriptionHtml: (html) => Promise.resolve(allure.descriptionHtml(html)),\n /**\n * @deprecated please use import { testCaseId } from \"allure-js-commons\" instead.\n */\n testCaseId: (id) => Promise.resolve(allure.testCaseId(id)),\n /**\n * @deprecated please use import { historyId } from \"allure-js-commons\" instead.\n */\n historyId: (id) => Promise.resolve(allure.historyId(id)),\n /**\n * @deprecated please use import { allureId } from \"allure-js-commons\" instead.\n */\n allureId: (id) => Promise.resolve(allure.allureId(id)),\n /**\n * @deprecated please use import { displayName } from \"allure-js-commons\" instead.\n */\n displayName: (name) => Promise.resolve(allure.displayName(name)),\n /**\n * @deprecated please use import { attachment } from \"allure-js-commons\" instead.\n */\n attachment: (name, content, type) => Promise.resolve(allure.attachment(name, content, { contentType: type })),\n /**\n * @deprecated please use import { issue } from \"allure-js-commons\" instead.\n */\n issue: (name, url) => Promise.resolve(allure.issue(url, name)),\n /**\n * @deprecated please use import { tms } from \"allure-js-commons\" instead.\n */\n tms: (name, url) => Promise.resolve(allure.tms(url, name)),\n /**\n * @deprecated please use import { epic } from \"allure-js-commons\" instead.\n */\n epic: (name) => Promise.resolve(allure.epic(name)),\n /**\n * @deprecated please use import { feature } from \"allure-js-commons\" instead.\n */\n feature: (name) => Promise.resolve(allure.feature(name)),\n /**\n * @deprecated please use import { story } from \"allure-js-commons\" instead.\n */\n story: (name) => Promise.resolve(allure.story(name)),\n /**\n * @deprecated please use import { suite } from \"allure-js-commons\" instead.\n */\n suite: (name) => Promise.resolve(allure.suite(name)),\n /**\n * @deprecated please use import { parentSuite } from \"allure-js-commons\" instead.\n */\n parentSuite: (name) => Promise.resolve(allure.parentSuite(name)),\n /**\n * @deprecated please use import { subSuite } from \"allure-js-commons\" instead.\n */\n subSuite: (name) => Promise.resolve(allure.subSuite(name)),\n /**\n * @deprecated please use import { owner } from \"allure-js-commons\" instead.\n */\n owner: (name) => Promise.resolve(allure.owner(name)),\n /**\n * @deprecated please use import { severity } from \"allure-js-commons\" instead.\n */\n severity: (name) => Promise.resolve(allure.severity(name)),\n /**\n * @deprecated please use import { layer } from \"allure-js-commons\" instead.\n */\n layer: (name) => Promise.resolve(allure.layer(name)),\n /**\n * @deprecated please use import { tag } from \"allure-js-commons\" instead.\n */\n tag: (name) => Promise.resolve(allure.tag(name)),\n /**\n * @deprecated please use import { step } from \"allure-js-commons\" instead.\n */\n step: (name, body) => Promise.resolve(allure.step(name, body)),\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4C,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc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model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","names":[],"sources":["../../src/model.ts"],"sourcesContent":["export interface CodeceptError {\n params: any;\n template: string;\n showDiff: boolean;\n actual: string;\n expected: string;\n cliMessage: () => string;\n message: string;\n inspect: () => string;\n}\n\nexport interface CodeceptStep {\n actor: string;\n name: string;\n helperMethod: string;\n suffix: string;\n prefix: string;\n comment: string;\n args: string[];\n status: string;\n metaStep: CodeceptStep;\n toString: () => string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AllureCodeceptJsReporter = void 0;
7
+ var _codeceptjs = require("codeceptjs");
8
+ var _nodeProcess = require("node:process");
9
+ var _allureJsCommons = require("allure-js-commons");
10
+ var _sdk = require("allure-js-commons/sdk");
11
+ var _allureMocha = _interopRequireDefault(require("allure-mocha"));
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
+ class AllureCodeceptJsReporter extends _allureMocha.default {
19
+ constructor(runner, opts, isInWorker) {
20
+ super(runner, opts, isInWorker);
21
+ _defineProperty(this, "getFrameworkName", () => "codeceptjs");
22
+ this.registerEvents();
23
+ }
24
+ registerEvents() {
25
+ // Test
26
+ _codeceptjs.event.dispatcher.on(_codeceptjs.event.test.before, this.testStarted.bind(this));
27
+ // Step
28
+ _codeceptjs.event.dispatcher.on(_codeceptjs.event.step.started, this.stepStarted.bind(this));
29
+ _codeceptjs.event.dispatcher.on(_codeceptjs.event.step.passed, this.stepPassed.bind(this));
30
+ _codeceptjs.event.dispatcher.on(_codeceptjs.event.step.failed, this.stepFailed.bind(this));
31
+ _codeceptjs.event.dispatcher.on(_codeceptjs.event.step.comment, this.stepComment.bind(this));
32
+ }
33
+ testStarted(test) {
34
+ if (!this.currentTest) {
35
+ return;
36
+ }
37
+ var tags = test.tags || [];
38
+ var extraTagLabels = tags.filter(tag => tag && !(0, _sdk.isMetadataTag)(tag)).map(tag => tag.startsWith("@") ? tag.substring(1) : tag).map(tag => tag.trim()).filter(tag => tag.length > 0).map(tag => ({
39
+ name: _allureJsCommons.LabelName.TAG,
40
+ value: tag
41
+ }));
42
+ this.runtime.updateTest(this.currentTest, tr => {
43
+ tr.labels.push(...extraTagLabels);
44
+ });
45
+ }
46
+ stepStarted(step) {
47
+ var _this$currentHook, _step$args;
48
+ var root = (_this$currentHook = this.currentHook) !== null && _this$currentHook !== void 0 ? _this$currentHook : this.currentTest;
49
+ if (!root) {
50
+ return;
51
+ }
52
+ this.runtime.startStep(root, undefined, {
53
+ name: "".concat(step.actor, " ").concat(step.name),
54
+ parameters: (_step$args = step.args) === null || _step$args === void 0 ? void 0 : _step$args.map((arg, index) => ({
55
+ name: "arg".concat(index),
56
+ value: "".concat(arg)
57
+ }))
58
+ });
59
+ }
60
+
61
+ // according to the docs, codeceptjs supposed to report the error,
62
+ // but actually it's never reported
63
+ stepFailed(_, error) {
64
+ this.stopCurrentStep(result => {
65
+ result.stage = _allureJsCommons.Stage.FINISHED;
66
+ if (error) {
67
+ result.status = (0, _sdk.getStatusFromError)({
68
+ message: error.message
69
+ });
70
+ result.statusDetails = (0, _sdk.getMessageAndTraceFromError)(error);
71
+ } else {
72
+ result.status = _nodeProcess.env.TRY_TO === "true" ? _allureJsCommons.Status.BROKEN : _allureJsCommons.Status.FAILED;
73
+ }
74
+ });
75
+ }
76
+ stepComment() {
77
+ this.stopCurrentStep(result => {
78
+ result.status = _allureJsCommons.Status.PASSED;
79
+ result.stage = _allureJsCommons.Stage.FINISHED;
80
+ });
81
+ }
82
+ stepPassed() {
83
+ this.stopCurrentStep(result => {
84
+ result.status = _allureJsCommons.Status.PASSED;
85
+ result.stage = _allureJsCommons.Stage.FINISHED;
86
+ });
87
+ }
88
+ stopCurrentStep(updateFunc) {
89
+ var _this$currentHook2;
90
+ var root = (_this$currentHook2 = this.currentHook) !== null && _this$currentHook2 !== void 0 ? _this$currentHook2 : this.currentTest;
91
+ var currentStep = root ? this.runtime.currentStep(root) : undefined;
92
+ if (!currentStep) {
93
+ return;
94
+ }
95
+ var promise = _codeceptjs.recorder.promise();
96
+ // @ts-ignore
97
+ if (promise) {
98
+ promise.catch(err => {
99
+ if (err instanceof Error) {
100
+ this.runtime.updateStep(currentStep, step => {
101
+ step.status = (0, _sdk.getStatusFromError)(err);
102
+ step.statusDetails = _objectSpread(_objectSpread({}, step.statusDetails), (0, _sdk.getMessageAndTraceFromError)(err));
103
+ });
104
+ }
105
+ return Promise.reject(err);
106
+ });
107
+ }
108
+ this.runtime.updateStep(currentStep, updateFunc);
109
+ this.runtime.stopStep(currentStep);
110
+ }
111
+ }
112
+ exports.AllureCodeceptJsReporter = AllureCodeceptJsReporter;
113
+ //# sourceMappingURL=reporter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reporter.js","names":["_codeceptjs","require","_nodeProcess","_allureJsCommons","_sdk","_allureMocha","_interopRequireDefault","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","AllureCodeceptJsReporter","AllureMochaReporter","constructor","runner","opts","isInWorker","registerEvents","event","dispatcher","on","test","before","testStarted","bind","step","started","stepStarted","passed","stepPassed","failed","stepFailed","comment","stepComment","currentTest","tags","extraTagLabels","tag","isMetadataTag","map","startsWith","substring","trim","name","LabelName","TAG","runtime","updateTest","tr","labels","_this$currentHook","_step$args","root","currentHook","startStep","undefined","concat","actor","parameters","args","arg","index","_","error","stopCurrentStep","result","stage","Stage","FINISHED","status","getStatusFromError","message","statusDetails","getMessageAndTraceFromError","env","TRY_TO","Status","BROKEN","FAILED","PASSED","updateFunc","_this$currentHook2","currentStep","promise","recorder","catch","err","Error","updateStep","Promise","reject","stopStep","exports"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { event, recorder } from \"codeceptjs\";\nimport type * as Mocha from \"mocha\";\nimport { env } from \"node:process\";\nimport { LabelName, Stage, Status, type StepResult } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError, isMetadataTag } from \"allure-js-commons/sdk\";\nimport AllureMochaReporter from \"allure-mocha\";\nimport type { CodeceptError, CodeceptStep } from \"./model.js\";\n\nexport class AllureCodeceptJsReporter extends AllureMochaReporter {\n constructor(runner: Mocha.Runner, opts: Mocha.MochaOptions, isInWorker: boolean) {\n super(runner, opts, isInWorker);\n this.registerEvents();\n }\n\n registerEvents() {\n // Test\n event.dispatcher.on(event.test.before, this.testStarted.bind(this));\n // Step\n event.dispatcher.on(event.step.started, this.stepStarted.bind(this));\n event.dispatcher.on(event.step.passed, this.stepPassed.bind(this));\n event.dispatcher.on(event.step.failed, this.stepFailed.bind(this));\n event.dispatcher.on(event.step.comment, this.stepComment.bind(this));\n }\n\n testStarted(test: { tags?: string[] }) {\n if (!this.currentTest) {\n return;\n }\n\n const tags = test.tags || [];\n const extraTagLabels = tags\n .filter((tag) => tag && !isMetadataTag(tag))\n .map((tag) => (tag.startsWith(\"@\") ? tag.substring(1) : tag))\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0)\n .map((tag) => ({ name: LabelName.TAG, value: tag }));\n\n this.runtime.updateTest(this.currentTest, (tr) => {\n tr.labels.push(...extraTagLabels);\n });\n }\n\n stepStarted(step: CodeceptStep) {\n const root = this.currentHook ?? this.currentTest;\n if (!root) {\n return;\n }\n this.runtime.startStep(root, undefined, {\n name: `${step.actor} ${step.name}`,\n parameters: step.args?.map((arg, index) => ({ name: `arg${index}`, value: `${arg}` })),\n });\n }\n\n // according to the docs, codeceptjs supposed to report the error,\n // but actually it's never reported\n stepFailed(_: CodeceptJS.Step, error?: CodeceptError) {\n this.stopCurrentStep((result) => {\n result.stage = Stage.FINISHED;\n if (error) {\n result.status = getStatusFromError({ message: error.message } as Error);\n result.statusDetails = getMessageAndTraceFromError(error);\n } else {\n result.status = env.TRY_TO === \"true\" ? Status.BROKEN : Status.FAILED;\n }\n });\n }\n\n stepComment() {\n this.stopCurrentStep((result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n }\n\n stepPassed() {\n this.stopCurrentStep((result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n }\n\n stopCurrentStep(updateFunc: (result: StepResult) => void) {\n const root = this.currentHook ?? this.currentTest;\n const currentStep = root ? this.runtime.currentStep(root) : undefined;\n\n if (!currentStep) {\n return;\n }\n const promise = recorder.promise();\n // @ts-ignore\n if (promise) {\n promise.catch((err) => {\n if (err instanceof Error) {\n this.runtime.updateStep(currentStep, (step) => {\n step.status = getStatusFromError(err);\n step.statusDetails = { ...step.statusDetails, ...getMessageAndTraceFromError(err) };\n });\n }\n return Promise.reject(err);\n });\n }\n\n this.runtime.updateStep(currentStep, updateFunc);\n this.runtime.stopStep(currentStep);\n }\n\n protected getFrameworkName = () => \"codeceptjs\";\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAC,sBAAA,CAAAL,OAAA;AAA+C,SAAAK,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,QAAAH,CAAA,EAAAI,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAP,CAAA,OAAAM,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAR,CAAA,GAAAI,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAX,CAAA,EAAAI,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAf,CAAA,aAAAI,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAD,OAAA,CAAAG,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAnB,CAAA,EAAAI,CAAA,EAAAC,CAAA,CAAAD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IAAI,CAACzC,OAAO,CAAC0C,UAAU,CAACN,WAAW,EAAGzD,IAAI,IAAK;YAC7CA,IAAI,CAAC4C,MAAM,GAAG,IAAAC,uBAAkB,EAACgB,GAAG,CAAC;YACrC7D,IAAI,CAAC+C,aAAa,GAAAjF,aAAA,CAAAA,aAAA,KAAQkC,IAAI,CAAC+C,aAAa,GAAK,IAAAC,gCAA2B,EAACa,GAAG,CAAC,CAAE;UACrF,CAAC,CAAC;QACJ;QACA,OAAOG,OAAO,CAACC,MAAM,CAACJ,GAAG,CAAC;MAC5B,CAAC,CAAC;IACJ;IAEA,IAAI,CAACxC,OAAO,CAAC0C,UAAU,CAACN,WAAW,EAAEF,UAAU,CAAC;IAChD,IAAI,CAAClC,OAAO,CAAC6C,QAAQ,CAACT,WAAW,CAAC;EACpC;AAGF;AAACU,OAAA,CAAAjF,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
+ import { container } from "codeceptjs";
7
+ import { attachment } from "allure-js-commons";
8
+ import { allureCodeceptJsLegacyApi } from "./legacy.js";
9
+ import { AllureCodeceptJsReporter } from "./reporter.js";
10
+ var allurePlugin = config => {
11
+ var mocha = container.mocha();
12
+ mocha.reporter(AllureCodeceptJsReporter.prototype.constructor, _objectSpread({}, config));
13
+ return _objectSpread(_objectSpread({}, allureCodeceptJsLegacyApi), {}, {
14
+ // this method is used by various bundled codeceptjs plugins, e.g. by screenshotOnFail
15
+ addAttachment: (name, content, contentType) => {
16
+ // wrap it in attachmentStep. Since we use Mocha, Runtime API is sync, so no awaits is fine
17
+ attachment(name, content, contentType);
18
+ }
19
+ });
20
+ };
21
+ export default allurePlugin;
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["container","attachment","allureCodeceptJsLegacyApi","AllureCodeceptJsReporter","allurePlugin","config","mocha","reporter","prototype","constructor","_objectSpread","addAttachment","name","content","contentType"],"sources":["../../src/index.ts"],"sourcesContent":["import { container } from \"codeceptjs\";\nimport { attachment } from \"allure-js-commons\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\nimport { allureCodeceptJsLegacyApi } from \"./legacy.js\";\nimport { AllureCodeceptJsReporter } from \"./reporter.js\";\n\nconst allurePlugin = (config: ReporterConfig) => {\n const mocha = container.mocha();\n mocha.reporter(AllureCodeceptJsReporter.prototype.constructor, { ...config });\n\n return {\n ...allureCodeceptJsLegacyApi,\n // this method is used by various bundled codeceptjs plugins, e.g. by screenshotOnFail\n addAttachment: (name: string, content: Buffer | string, contentType: string) => {\n // wrap it in attachmentStep. Since we use Mocha, Runtime API is sync, so no awaits is fine\n attachment(name, content, contentType);\n },\n };\n};\n\nexport default allurePlugin;\n"],"mappings":";;;;;AAAA,SAASA,SAAS,QAAQ,YAAY;AACtC,SAASC,UAAU,QAAQ,mBAAmB;AAE9C,SAASC,yBAAyB,QAAQ,aAAa;AACvD,SAASC,wBAAwB,QAAQ,eAAe;AAExD,IAAMC,YAAY,GAAIC,MAAsB,IAAK;EAC/C,IAAMC,KAAK,GAAGN,SAAS,CAACM,KAAK,CAAC,CAAC;EAC/BA,KAAK,CAACC,QAAQ,CAACJ,wBAAwB,CAACK,SAAS,CAACC,WAAW,EAAAC,aAAA,KAAOL,MAAM,CAAE,CAAC;EAE7E,OAAAK,aAAA,CAAAA,aAAA,KACKR,yBAAyB;IAC5B;IACAS,aAAa,EAAEA,CAACC,IAAY,EAAEC,OAAwB,EAAEC,WAAmB,KAAK;MAC9E;MACAb,UAAU,CAACW,IAAI,EAAEC,OAAO,EAAEC,WAAW,CAAC;IACxC;EAAC;AAEL,CAAC;AAED,eAAeV,YAAY","ignoreList":[]}
@@ -0,0 +1,110 @@
1
+ import * as allure from "allure-js-commons";
2
+
3
+ /**
4
+ * @deprecated please use api exported by "allure-js-commons" instead.
5
+ */
6
+
7
+ /**
8
+ * @deprecated please use api exported by "allure-js-commons" instead.
9
+ */
10
+ export var allureCodeceptJsLegacyApi = {
11
+ /**
12
+ * @deprecated please use import { label } from "allure-js-commons" instead.
13
+ */
14
+ label: function label() {
15
+ return Promise.resolve(allure.label(...arguments));
16
+ },
17
+ /**
18
+ * @deprecated please use import { link } from "allure-js-commons" instead.
19
+ */
20
+ link: (type, url, name) => Promise.resolve(allure.link(url, name, type)),
21
+ /**
22
+ * @deprecated please use import { parameter } from "allure-js-commons" instead.
23
+ */
24
+ parameter: (name, value, options) => Promise.resolve(allure.parameter(name, value, options)),
25
+ /**
26
+ * @deprecated please use import { description } from "allure-js-commons" instead.
27
+ */
28
+ description: function description() {
29
+ return Promise.resolve(allure.description(...arguments));
30
+ },
31
+ /**
32
+ * @deprecated please use import { descriptionHtml } from "allure-js-commons" instead.
33
+ */
34
+ descriptionHtml: html => Promise.resolve(allure.descriptionHtml(html)),
35
+ /**
36
+ * @deprecated please use import { testCaseId } from "allure-js-commons" instead.
37
+ */
38
+ testCaseId: id => Promise.resolve(allure.testCaseId(id)),
39
+ /**
40
+ * @deprecated please use import { historyId } from "allure-js-commons" instead.
41
+ */
42
+ historyId: id => Promise.resolve(allure.historyId(id)),
43
+ /**
44
+ * @deprecated please use import { allureId } from "allure-js-commons" instead.
45
+ */
46
+ allureId: id => Promise.resolve(allure.allureId(id)),
47
+ /**
48
+ * @deprecated please use import { displayName } from "allure-js-commons" instead.
49
+ */
50
+ displayName: name => Promise.resolve(allure.displayName(name)),
51
+ /**
52
+ * @deprecated please use import { attachment } from "allure-js-commons" instead.
53
+ */
54
+ attachment: (name, content, type) => Promise.resolve(allure.attachment(name, content, {
55
+ contentType: type
56
+ })),
57
+ /**
58
+ * @deprecated please use import { issue } from "allure-js-commons" instead.
59
+ */
60
+ issue: (name, url) => Promise.resolve(allure.issue(url, name)),
61
+ /**
62
+ * @deprecated please use import { tms } from "allure-js-commons" instead.
63
+ */
64
+ tms: (name, url) => Promise.resolve(allure.tms(url, name)),
65
+ /**
66
+ * @deprecated please use import { epic } from "allure-js-commons" instead.
67
+ */
68
+ epic: name => Promise.resolve(allure.epic(name)),
69
+ /**
70
+ * @deprecated please use import { feature } from "allure-js-commons" instead.
71
+ */
72
+ feature: name => Promise.resolve(allure.feature(name)),
73
+ /**
74
+ * @deprecated please use import { story } from "allure-js-commons" instead.
75
+ */
76
+ story: name => Promise.resolve(allure.story(name)),
77
+ /**
78
+ * @deprecated please use import { suite } from "allure-js-commons" instead.
79
+ */
80
+ suite: name => Promise.resolve(allure.suite(name)),
81
+ /**
82
+ * @deprecated please use import { parentSuite } from "allure-js-commons" instead.
83
+ */
84
+ parentSuite: name => Promise.resolve(allure.parentSuite(name)),
85
+ /**
86
+ * @deprecated please use import { subSuite } from "allure-js-commons" instead.
87
+ */
88
+ subSuite: name => Promise.resolve(allure.subSuite(name)),
89
+ /**
90
+ * @deprecated please use import { owner } from "allure-js-commons" instead.
91
+ */
92
+ owner: name => Promise.resolve(allure.owner(name)),
93
+ /**
94
+ * @deprecated please use import { severity } from "allure-js-commons" instead.
95
+ */
96
+ severity: name => Promise.resolve(allure.severity(name)),
97
+ /**
98
+ * @deprecated please use import { layer } from "allure-js-commons" instead.
99
+ */
100
+ layer: name => Promise.resolve(allure.layer(name)),
101
+ /**
102
+ * @deprecated please use import { tag } from "allure-js-commons" instead.
103
+ */
104
+ tag: name => Promise.resolve(allure.tag(name)),
105
+ /**
106
+ * @deprecated please use import { step } from "allure-js-commons" instead.
107
+ */
108
+ step: (name, body) => Promise.resolve(allure.step(name, body))
109
+ };
110
+ //# sourceMappingURL=legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy.js","names":["allure","allureCodeceptJsLegacyApi","label","Promise","resolve","arguments","link","type","url","name","parameter","value","options","description","descriptionHtml","html","testCaseId","id","historyId","allureId","displayName","attachment","content","contentType","issue","tms","epic","feature","story","suite","parentSuite","subSuite","owner","severity","layer","tag","step","body"],"sources":["../../src/legacy.ts"],"sourcesContent":["import * as allure from \"allure-js-commons\";\n\n/**\n * @deprecated please use api exported by \"allure-js-commons\" instead.\n */\nexport interface AllureCodeceptJsLegacyApi {\n label: (name: string, value: string) => Promise<void>;\n link: (type: string, url: string, name?: string) => Promise<void>;\n parameter: (\n name: string,\n value: string,\n options?: { excluded?: boolean; mode?: \"hidden\" | \"masked\" | \"default\" },\n ) => Promise<void>;\n description: (markdown: string) => Promise<void>;\n descriptionHtml: (html: string) => Promise<void>;\n testCaseId: (id: string) => Promise<void>;\n historyId: (id: string) => Promise<void>;\n allureId: (id: string) => Promise<void>;\n displayName: (name: string) => Promise<void>;\n attachment: (name: string, content: Buffer | string, type: string) => Promise<void>;\n issue: (name: string, url: string) => Promise<void>;\n tms: (name: string, url: string) => Promise<void>;\n epic: (name: string) => Promise<void>;\n feature: (name: string) => Promise<void>;\n story: (name: string) => Promise<void>;\n suite: (name: string) => Promise<void>;\n parentSuite: (name: string) => Promise<void>;\n subSuite: (name: string) => Promise<void>;\n owner: (name: string) => Promise<void>;\n severity: (name: string) => Promise<void>;\n layer: (name: string) => Promise<void>;\n tag: (name: string) => Promise<void>;\n step: (name: string, body: () => Promise<void>) => Promise<void>;\n}\n\n/**\n * @deprecated please use api exported by \"allure-js-commons\" instead.\n */\nexport const allureCodeceptJsLegacyApi: AllureCodeceptJsLegacyApi = {\n /**\n * @deprecated please use import { label } from \"allure-js-commons\" instead.\n */\n label: (...args) => Promise.resolve(allure.label(...args)),\n /**\n * @deprecated please use import { link } from \"allure-js-commons\" instead.\n */\n link: (type, url, name) => Promise.resolve(allure.link(url, name, type)),\n /**\n * @deprecated please use import { parameter } from \"allure-js-commons\" instead.\n */\n parameter: (name, value, options) => Promise.resolve(allure.parameter(name, value, options)),\n /**\n * @deprecated please use import { description } from \"allure-js-commons\" instead.\n */\n description: (...args) => Promise.resolve(allure.description(...args)),\n /**\n * @deprecated please use import { descriptionHtml } from \"allure-js-commons\" instead.\n */\n descriptionHtml: (html) => Promise.resolve(allure.descriptionHtml(html)),\n /**\n * @deprecated please use import { testCaseId } from \"allure-js-commons\" instead.\n */\n testCaseId: (id) => Promise.resolve(allure.testCaseId(id)),\n /**\n * @deprecated please use import { historyId } from \"allure-js-commons\" instead.\n */\n historyId: (id) => Promise.resolve(allure.historyId(id)),\n /**\n * @deprecated please use import { allureId } from \"allure-js-commons\" instead.\n */\n allureId: (id) => Promise.resolve(allure.allureId(id)),\n /**\n * @deprecated please use import { displayName } from \"allure-js-commons\" instead.\n */\n displayName: (name) => Promise.resolve(allure.displayName(name)),\n /**\n * @deprecated please use import { attachment } from \"allure-js-commons\" instead.\n */\n attachment: (name, content, type) => Promise.resolve(allure.attachment(name, content, { contentType: type })),\n /**\n * @deprecated please use import { issue } from \"allure-js-commons\" instead.\n */\n issue: (name, url) => Promise.resolve(allure.issue(url, name)),\n /**\n * @deprecated please use import { tms } from \"allure-js-commons\" instead.\n */\n tms: (name, url) => Promise.resolve(allure.tms(url, name)),\n /**\n * @deprecated please use import { epic } from \"allure-js-commons\" instead.\n */\n epic: (name) => Promise.resolve(allure.epic(name)),\n /**\n * @deprecated please use import { feature } from \"allure-js-commons\" instead.\n */\n feature: (name) => Promise.resolve(allure.feature(name)),\n /**\n * @deprecated please use import { story } from \"allure-js-commons\" instead.\n */\n story: (name) => Promise.resolve(allure.story(name)),\n /**\n * @deprecated please use import { suite } from \"allure-js-commons\" instead.\n */\n suite: (name) => Promise.resolve(allure.suite(name)),\n /**\n * @deprecated please use import { parentSuite } from \"allure-js-commons\" instead.\n */\n parentSuite: (name) => Promise.resolve(allure.parentSuite(name)),\n /**\n * @deprecated please use import { subSuite } from \"allure-js-commons\" instead.\n */\n subSuite: (name) => Promise.resolve(allure.subSuite(name)),\n /**\n * @deprecated please use import { owner } from \"allure-js-commons\" instead.\n */\n owner: (name) => Promise.resolve(allure.owner(name)),\n /**\n * @deprecated please use import { severity } from \"allure-js-commons\" instead.\n */\n severity: (name) => Promise.resolve(allure.severity(name)),\n /**\n * @deprecated please use import { layer } from \"allure-js-commons\" instead.\n */\n layer: (name) => Promise.resolve(allure.layer(name)),\n /**\n * @deprecated please use import { tag } from \"allure-js-commons\" instead.\n */\n tag: (name) => Promise.resolve(allure.tag(name)),\n /**\n * @deprecated please use import { step } from \"allure-js-commons\" instead.\n */\n step: (name, body) => Promise.resolve(allure.step(name, body)),\n};\n"],"mappings":"AAAA,OAAO,KAAKA,MAAM,MAAM,mBAAmB;;AAE3C;AACA;AACA;;AA+BA;AACA;AACA;AACA,OAAO,IAAMC,yBAAoD,GAAG;EAClE;AACF;AACA;EACEC,KAAK,EAAE,SAAAA,MAAA;IAAA,OAAaC,OAAO,CAACC,OAAO,CAACJ,MAAM,CAACE,KAAK,CAAC,GAAAG,SAAO,CAAC,CAAC;EAAA;EAC1D;AACF;AACA;EACEC,IAAI,EAAEA,CAACC,IAAI,EAAEC,GAAG,EAAEC,IAAI,KA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AACxB,IAAI,CAAC,CAAC;EAC1D;AACF;AACA;EACEyB,KAAK,EAAGzB,IAAI,IAAKN,OAAO,CAACC,OAAO,CAACJ,MAAM,CAACkC,KAAK,CAACzB,IAAI,CAAC,CAAC;EACpD;AACF;AACA;EACE0B,GAAG,EAAG1B,IAAI,IAAKN,OAAO,CAACC,OAAO,CAACJ,MAAM,CAACmC,GAAG,CAAC1B,IAAI,CAAC,CAAC;EAChD;AACF;AACA;EACE2B,IAAI,EAAEA,CAAC3B,IAAI,EAAE4B,IAAI,KAAKlC,OAAO,CAACC,OAAO,CAACJ,MAAM,CAACoC,IAAI,CAAC3B,IAAI,EAAE4B,IAAI,CAAC;AAC/D,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","names":[],"sources":["../../src/model.ts"],"sourcesContent":["export interface CodeceptError {\n params: any;\n template: string;\n showDiff: boolean;\n actual: string;\n expected: string;\n cliMessage: () => string;\n message: string;\n inspect: () => string;\n}\n\nexport interface CodeceptStep {\n actor: string;\n name: string;\n helperMethod: string;\n suffix: string;\n prefix: string;\n comment: string;\n args: string[];\n status: string;\n metaStep: CodeceptStep;\n toString: () => string;\n}\n"],"mappings":"","ignoreList":[]}