allure-js-commons 3.0.0-beta.8 → 3.0.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 (48) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/sdk/index.js +12 -0
  3. package/dist/cjs/sdk/index.js.map +1 -1
  4. package/dist/cjs/sdk/reporter/LifecycleState.js +39 -19
  5. package/dist/cjs/sdk/reporter/LifecycleState.js.map +1 -1
  6. package/dist/cjs/sdk/reporter/ReporterRuntime.js +75 -21
  7. package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
  8. package/dist/cjs/sdk/reporter/index.js +22 -1
  9. package/dist/cjs/sdk/reporter/index.js.map +1 -1
  10. package/dist/cjs/sdk/reporter/types.js.map +1 -1
  11. package/dist/cjs/sdk/reporter/utils/labels.js +22 -3
  12. package/dist/cjs/sdk/reporter/utils/labels.js.map +1 -1
  13. package/dist/cjs/sdk/reporter/utils.js +17 -17
  14. package/dist/cjs/sdk/reporter/utils.js.map +1 -1
  15. package/dist/cjs/sdk/reporter/writer/MessageReader.js +3 -0
  16. package/dist/cjs/sdk/reporter/writer/MessageReader.js.map +1 -1
  17. package/dist/cjs/sdk/types.js.map +1 -1
  18. package/dist/cjs/sdk/utils.js +43 -1
  19. package/dist/cjs/sdk/utils.js.map +1 -1
  20. package/dist/esm/sdk/index.js +1 -1
  21. package/dist/esm/sdk/index.js.map +1 -1
  22. package/dist/esm/sdk/reporter/LifecycleState.js +39 -19
  23. package/dist/esm/sdk/reporter/LifecycleState.js.map +1 -1
  24. package/dist/esm/sdk/reporter/ReporterRuntime.js +75 -21
  25. package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
  26. package/dist/esm/sdk/reporter/index.js +1 -1
  27. package/dist/esm/sdk/reporter/index.js.map +1 -1
  28. package/dist/esm/sdk/reporter/types.js.map +1 -1
  29. package/dist/esm/sdk/reporter/utils/labels.js +17 -2
  30. package/dist/esm/sdk/reporter/utils/labels.js.map +1 -1
  31. package/dist/esm/sdk/reporter/utils.js +13 -13
  32. package/dist/esm/sdk/reporter/utils.js.map +1 -1
  33. package/dist/esm/sdk/reporter/writer/MessageReader.js +3 -0
  34. package/dist/esm/sdk/reporter/writer/MessageReader.js.map +1 -1
  35. package/dist/esm/sdk/types.js.map +1 -1
  36. package/dist/esm/sdk/utils.js +41 -0
  37. package/dist/esm/sdk/utils.js.map +1 -1
  38. package/dist/types/sdk/index.d.ts +1 -1
  39. package/dist/types/sdk/reporter/LifecycleState.d.ts +6 -8
  40. package/dist/types/sdk/reporter/ReporterRuntime.d.ts +2 -2
  41. package/dist/types/sdk/reporter/index.d.ts +1 -1
  42. package/dist/types/sdk/reporter/types.d.ts +17 -5
  43. package/dist/types/sdk/reporter/utils/labels.d.ts +4 -1
  44. package/dist/types/sdk/reporter/utils.d.ts +10 -2
  45. package/dist/types/sdk/reporter/writer/MessageReader.d.ts +1 -0
  46. package/dist/types/sdk/types.d.ts +4 -0
  47. package/dist/types/sdk/utils.d.ts +3 -1
  48. package/package.json +3 -3
package/README.md CHANGED
@@ -25,5 +25,5 @@ Using `ALLURE_LABEL_{{labelName}}={{labelValue}}` syntax you can set common labe
25
25
  #### Examples
26
26
 
27
27
  ```bash
28
- ALLURE_LABEL_EPIC="Story 1" npm test
28
+ ALLURE_LABEL_epic="Story 1" npm test
29
29
  ```
@@ -51,12 +51,24 @@ Object.defineProperty(exports, "isAnyStepFailed", {
51
51
  return _utils.isAnyStepFailed;
52
52
  }
53
53
  });
54
+ Object.defineProperty(exports, "isMetadataTag", {
55
+ enumerable: true,
56
+ get: function get() {
57
+ return _utils.isMetadataTag;
58
+ }
59
+ });
54
60
  Object.defineProperty(exports, "isPromise", {
55
61
  enumerable: true,
56
62
  get: function get() {
57
63
  return _utils.isPromise;
58
64
  }
59
65
  });
66
+ Object.defineProperty(exports, "serialize", {
67
+ enumerable: true,
68
+ get: function get() {
69
+ return _utils.serialize;
70
+ }
71
+ });
60
72
  Object.defineProperty(exports, "stripAnsi", {
61
73
  enumerable: true,
62
74
  get: function get() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_utils","require"],"sources":["../../../src/sdk/index.ts"],"sourcesContent":["export type {\n AllureResults,\n Category,\n EnvironmentInfo,\n ExecutorInfo,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n TestPlanV1Test,\n TestPlanV1,\n} from \"./types.js\";\nexport {\n getStatusFromError,\n getMessageAndTraceFromError,\n extractMetadataFromString,\n isAllStepsEnded,\n isAnyStepFailed,\n getUnfinishedStepsMessages,\n hasStepMessage,\n isPromise,\n hasLabel,\n stripAnsi,\n} from \"./utils.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAAA,MAAA,GAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_utils","require"],"sources":["../../../src/sdk/index.ts"],"sourcesContent":["export type {\n AllureResults,\n Category,\n EnvironmentInfo,\n ExecutorInfo,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n TestPlanV1Test,\n TestPlanV1,\n} from \"./types.js\";\nexport {\n getStatusFromError,\n getMessageAndTraceFromError,\n isMetadataTag,\n extractMetadataFromString,\n isAllStepsEnded,\n isAnyStepFailed,\n getUnfinishedStepsMessages,\n hasStepMessage,\n isPromise,\n hasLabel,\n stripAnsi,\n serialize,\n} from \"./utils.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAAA,MAAA,GAAAC,OAAA","ignoreList":[]}
@@ -9,66 +9,86 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
9
9
  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; }
10
10
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
11
11
  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); }
12
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
13
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
14
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
15
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
16
+ var _scopes = /*#__PURE__*/new WeakMap();
17
+ var _testResults = /*#__PURE__*/new WeakMap();
18
+ var _stepResults = /*#__PURE__*/new WeakMap();
19
+ var _fixturesResults = /*#__PURE__*/new WeakMap();
12
20
  class LifecycleState {
13
21
  constructor() {
14
22
  var _this = this;
15
- _defineProperty(this, "scopes", new Map());
16
- _defineProperty(this, "testResults", new Map());
17
- _defineProperty(this, "stepResults", new Map());
18
- _defineProperty(this, "fixturesResults", new Map());
19
- _defineProperty(this, "getScope", uuid => this.scopes.get(uuid));
20
- _defineProperty(this, "getWrappedFixtureResult", uuid => this.fixturesResults.get(uuid));
23
+ _classPrivateFieldInitSpec(this, _scopes, new Map());
24
+ _classPrivateFieldInitSpec(this, _testResults, new Map());
25
+ _classPrivateFieldInitSpec(this, _stepResults, new Map());
26
+ _classPrivateFieldInitSpec(this, _fixturesResults, new Map());
27
+ _defineProperty(this, "getScope", uuid => _classPrivateFieldGet(_scopes, this).get(uuid));
28
+ _defineProperty(this, "getWrappedFixtureResult", uuid => _classPrivateFieldGet(_fixturesResults, this).get(uuid));
21
29
  _defineProperty(this, "getFixtureResult", uuid => {
22
30
  var _this$getWrappedFixtu;
23
31
  return (_this$getWrappedFixtu = this.getWrappedFixtureResult(uuid)) === null || _this$getWrappedFixtu === void 0 ? void 0 : _this$getWrappedFixtu.value;
24
32
  });
25
- _defineProperty(this, "getTestResult", uuid => this.testResults.get(uuid));
26
- _defineProperty(this, "getStepResult", uuid => this.stepResults.get(uuid));
33
+ _defineProperty(this, "getWrappedTestResult", uuid => _classPrivateFieldGet(_testResults, this).get(uuid));
34
+ _defineProperty(this, "getTestResult", uuid => {
35
+ var _this$getWrappedTestR;
36
+ return (_this$getWrappedTestR = this.getWrappedTestResult(uuid)) === null || _this$getWrappedTestR === void 0 ? void 0 : _this$getWrappedTestR.value;
37
+ });
38
+ _defineProperty(this, "getStepResult", uuid => _classPrivateFieldGet(_stepResults, this).get(uuid));
27
39
  _defineProperty(this, "getExecutionItem", uuid => {
28
40
  var _ref, _this$getFixtureResul;
29
41
  return (_ref = (_this$getFixtureResul = this.getFixtureResult(uuid)) !== null && _this$getFixtureResul !== void 0 ? _this$getFixtureResul : this.getTestResult(uuid)) !== null && _ref !== void 0 ? _ref : this.getStepResult(uuid);
30
42
  });
31
43
  // test results
32
- _defineProperty(this, "setTestResult", (uuid, result) => {
33
- this.testResults.set(uuid, result);
44
+ _defineProperty(this, "setTestResult", function (uuid, result) {
45
+ var scopeUuids = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
46
+ _classPrivateFieldGet(_testResults, _this).set(uuid, {
47
+ value: result,
48
+ scopeUuids
49
+ });
34
50
  });
35
51
  _defineProperty(this, "deleteTestResult", uuid => {
36
- this.testResults.delete(uuid);
52
+ _classPrivateFieldGet(_testResults, this).delete(uuid);
37
53
  });
38
54
  // steps
39
55
  _defineProperty(this, "setStepResult", (uuid, result) => {
40
- this.stepResults.set(uuid, result);
56
+ _classPrivateFieldGet(_stepResults, this).set(uuid, result);
41
57
  });
42
58
  _defineProperty(this, "deleteStepResult", uuid => {
43
- this.stepResults.delete(uuid);
59
+ _classPrivateFieldGet(_stepResults, this).delete(uuid);
44
60
  });
45
61
  // fixtures
46
- _defineProperty(this, "setFixtureResult", (uuid, type, result) => {
62
+ _defineProperty(this, "setFixtureResult", (scopeUuid, uuid, type, result) => {
47
63
  var wrappedResult = {
48
64
  uuid,
49
65
  type,
50
- value: result
66
+ value: result,
67
+ scopeUuid
51
68
  };
52
- this.fixturesResults.set(uuid, wrappedResult);
69
+ _classPrivateFieldGet(_fixturesResults, this).set(uuid, wrappedResult);
53
70
  return wrappedResult;
54
71
  });
55
72
  _defineProperty(this, "deleteFixtureResult", uuid => {
56
- this.fixturesResults.delete(uuid);
73
+ _classPrivateFieldGet(_fixturesResults, this).delete(uuid);
57
74
  });
58
75
  // test scopes
59
76
  _defineProperty(this, "setScope", function (uuid) {
60
77
  var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
61
78
  var scope = _objectSpread(_objectSpread({
79
+ labels: [],
80
+ links: [],
81
+ parameters: [],
62
82
  fixtures: [],
63
83
  tests: []
64
84
  }, data), {}, {
65
85
  uuid
66
86
  });
67
- _this.scopes.set(uuid, scope);
87
+ _classPrivateFieldGet(_scopes, _this).set(uuid, scope);
68
88
  return scope;
69
89
  });
70
90
  _defineProperty(this, "deleteScope", uuid => {
71
- this.scopes.delete(uuid);
91
+ _classPrivateFieldGet(_scopes, this).delete(uuid);
72
92
  });
73
93
  }
74
94
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LifecycleState.js","names":["LifecycleState","constructor","_this","_defineProperty","Map","uuid","scopes","get","fixturesResults","_this$getWrappedFixtu","getWrappedFixtureResult","value","testResults","stepResults","_ref","_this$getFixtureResul","getFixtureResult","getTestResult","getStepResult","result","set","delete","type","wrappedResult","data","arguments","length","undefined","scope","_objectSpread","fixtures","tests","exports"],"sources":["../../../../src/sdk/reporter/LifecycleState.ts"],"sourcesContent":["import type { FixtureResult, StepResult, TestResult } from \"../../model.js\";\nimport type { FixtureType, FixtureWrapper, TestScope } from \"./types.js\";\n\nexport class LifecycleState {\n scopes = new Map<string, TestScope>();\n\n testResults = new Map<string, TestResult>();\n\n stepResults = new Map<string, StepResult>();\n\n fixturesResults = new Map<string, FixtureWrapper>();\n\n getScope = (uuid: string) => this.scopes.get(uuid);\n\n getWrappedFixtureResult = (uuid: string) => this.fixturesResults.get(uuid);\n\n getFixtureResult = (uuid: string) => this.getWrappedFixtureResult(uuid)?.value;\n\n getTestResult = (uuid: string) => this.testResults.get(uuid);\n\n getStepResult = (uuid: string) => this.stepResults.get(uuid);\n\n getExecutionItem = (uuid: string): FixtureResult | TestResult | StepResult | undefined =>\n this.getFixtureResult(uuid) ?? this.getTestResult(uuid) ?? this.getStepResult(uuid);\n\n // test results\n setTestResult = (uuid: string, result: TestResult) => {\n this.testResults.set(uuid, result);\n };\n\n deleteTestResult = (uuid: string) => {\n this.testResults.delete(uuid);\n };\n\n // steps\n setStepResult = (uuid: string, result: StepResult) => {\n this.stepResults.set(uuid, result);\n };\n\n deleteStepResult = (uuid: string) => {\n this.stepResults.delete(uuid);\n };\n\n // fixtures\n setFixtureResult = (uuid: string, type: FixtureType, result: FixtureResult) => {\n const wrappedResult: FixtureWrapper = {\n uuid,\n type,\n value: result,\n };\n this.fixturesResults.set(uuid, wrappedResult);\n return wrappedResult;\n };\n\n deleteFixtureResult = (uuid: string) => {\n this.fixturesResults.delete(uuid);\n };\n\n // test scopes\n setScope = (uuid: string, data: Partial<TestScope> = {}) => {\n const scope: TestScope = {\n fixtures: [],\n tests: [],\n ...data,\n uuid,\n };\n this.scopes.set(uuid, scope);\n return scope;\n };\n\n deleteScope = (uuid: string) => {\n this.scopes.delete(uuid);\n };\n}\n"],"mappings":";;;;;;;;;;;AA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ecycleState","constructor","_this","_classPrivateFieldInitSpec","_scopes","Map","_testResults","_stepResults","_fixturesResults","_defineProperty","uuid","_classPrivateFieldGet","get","_this$getWrappedFixtu","getWrappedFixtureResult","value","_this$getWrappedTestR","getWrappedTestResult","_ref","_this$getFixtureResul","getFixtureResult","getTestResult","getStepResult","result","scopeUuids","arguments","length","undefined","set","delete","scopeUuid","type","wrappedResult","data","scope","_objectSpread","labels","links","parameters","fixtures","tests","exports"],"sources":["../../../../src/sdk/reporter/LifecycleState.ts"],"sourcesContent":["import type { FixtureResult, StepResult, TestResult } from \"../../model.js\";\nimport type { FixtureResultWrapper, FixtureType, TestResultWrapper, TestScope } from \"./types.js\";\n\nexport class LifecycleState {\n #scopes = new Map<string, TestScope>();\n\n #testResults = new Map<string, TestResultWrapper>();\n\n #stepResults = new Map<string, StepResult>();\n\n #fixturesResults = new Map<string, FixtureResultWrapper>();\n\n getScope = (uuid: string) => this.#scopes.get(uuid);\n\n getWrappedFixtureResult = (uuid: string) => this.#fixturesResults.get(uuid);\n\n getFixtureResult = (uuid: string) => this.getWrappedFixtureResult(uuid)?.value;\n\n getWrappedTestResult = (uuid: string) => this.#testResults.get(uuid);\n\n getTestResult = (uuid: string) => this.getWrappedTestResult(uuid)?.value;\n\n getStepResult = (uuid: string) => this.#stepResults.get(uuid);\n\n getExecutionItem = (uuid: string): FixtureResult | TestResult | StepResult | undefined =>\n this.getFixtureResult(uuid) ?? this.getTestResult(uuid) ?? this.getStepResult(uuid);\n\n // test results\n setTestResult = (uuid: string, result: TestResult, scopeUuids: string[] = []) => {\n this.#testResults.set(uuid, { value: result, scopeUuids });\n };\n\n deleteTestResult = (uuid: string) => {\n this.#testResults.delete(uuid);\n };\n\n // steps\n setStepResult = (uuid: string, result: StepResult) => {\n this.#stepResults.set(uuid, result);\n };\n\n deleteStepResult = (uuid: string) => {\n this.#stepResults.delete(uuid);\n };\n\n // fixtures\n setFixtureResult = (scopeUuid: string, uuid: string, type: FixtureType, result: FixtureResult) => {\n const wrappedResult: FixtureResultWrapper = {\n uuid,\n type,\n value: result,\n scopeUuid,\n };\n this.#fixturesResults.set(uuid, wrappedResult);\n return wrappedResult;\n };\n\n deleteFixtureResult = (uuid: string) => {\n this.#fixturesResults.delete(uuid);\n };\n\n // test scopes\n setScope = (uuid: string, data: Partial<TestScope> = {}) => {\n const scope: TestScope = {\n labels: [],\n links: [],\n parameters: [],\n fixtures: [],\n tests: [],\n ...data,\n uuid,\n };\n this.#scopes.set(uuid, scope);\n return scope;\n };\n\n deleteScope = (uuid: string) => {\n this.#scopes.delete(uuid);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAGO,MAAMA,cAAc,CAAC;EAAAC,YAAA;IAAA,IAAAC,KAAA;IAC1BC,0BAAA,OAAAC,OAAO,EAAG,IAAIC,GAAG,CAAoB,CAAC;IAEtCF,0BAAA,OAAAG,YAAY,EAAG,IAAID,GAAG,CAA4B,CAAC;IAEnDF,0BAAA,OAAAI,YAAY,EAAG,IAAIF,GAAG,CAAqB,CAAC;IAE5CF,0BAAA,OAAAK,gBAAgB,EAAG,IAAIH,GAAG,CAA+B,CAAC;IAACI,eAAA,mBAE/CC,IAAY,IAAKC,qBAAA,CAAKP,OAAO,EAAZ,IAAW,CAAC,CAACQ,GAAG,CAACF,IAAI,CAAC;IAAAD,eAAA,kCAExBC,IAAY,IAAKC,qBAAA,CAAKH,gBAAgB,EAArB,IAAoB,CAAC,CAACI,GAAG,CAACF,IAAI,CAAC;IAAAD,eAAA,2BAEvDC,IAAY;MAAA,IAAAG,qBAAA;MAAA,QAAAA,qBAAA,GAAK,IAAI,CAACC,uBAAuB,CAACJ,IAAI,CAAC,cAAAG,qBAAA,uBAAlCA,qBAAA,CAAoCE,KAAK;IAAA;IAAAN,eAAA,+BAEtDC,IAAY,IAAKC,qBAAA,CAAKL,YAAY,EAAjB,IAAgB,CAAC,CAACM,GAAG,CAACF,IAAI,CAAC;IAAAD,eAAA,wBAEnDC,IAAY;MAAA,IAAA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ACnB,IAAI,CAAC;IAChC,CAAC;IAED;IAAAD,eAAA,2BACmB,CAACqB,SAAiB,EAAEpB,IAAY,EAAEqB,IAAiB,EAAER,MAAqB,KAAK;MAChG,IAAMS,aAAmC,GAAG;QAC1CtB,IAAI;QACJqB,IAAI;QACJhB,KAAK,EAAEQ,MAAM;QACbO;MACF,CAAC;MACDnB,qBAAA,CAAKH,gBAAgB,EAArB,IAAoB,CAAC,CAACoB,GAAG,CAAClB,IAAI,EAAEsB,aAAa,CAAC;MAC9C,OAAOA,aAAa;IACtB,CAAC;IAAAvB,eAAA,8BAEsBC,IAAY,IAAK;MACtCC,qBAAA,CAAKH,gBAAgB,EAArB,IAAoB,CAAC,CAACqB,MAAM,CAACnB,IAAI,CAAC;IACpC,CAAC;IAED;IAAAD,eAAA,mBACW,UAACC,IAAY,EAAoC;MAAA,IAAlCuB,IAAwB,GAAAR,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;MACrD,IAAMS,KAAgB,GAAAC,aAAA,CAAAA,aAAA;QACpBC,MAAM,EAAE,EAAE;QACVC,KAAK,EAAE,EAAE;QACTC,UAAU,EAAE,EAAE;QACdC,QAAQ,EAAE,EAAE;QACZC,KAAK,EAAE;MAAE,GACNP,IAAI;QACPvB;MAAI,EACL;MACDC,qBAAA,CAAKP,OAAO,EAAZF,KAAW,CAAC,CAAC0B,GAAG,CAAClB,IAAI,EAAEwB,KAAK,CAAC;MAC7B,OAAOA,KAAK;IACd,CAAC;IAAAzB,eAAA,sBAEcC,IAAY,IAAK;MAC9BC,qBAAA,CAAKP,OAAO,EAAZ,IAAW,CAAC,CAACyB,MAAM,CAACnB,IAAI,CAAC;IAC3B,CAAC;EAAA;AACH;AAAC+B,OAAA,CAAAzC,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -13,9 +13,6 @@ var _testplan = require("./testplan.js");
13
13
  var _utils = require("./utils.js");
14
14
  var _attachments = require("./utils/attachments.js");
15
15
  var _loader = require("./writer/loader.js");
16
- var _excluded = ["links", "labels", "parameters", "displayName"];
17
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
18
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
19
16
  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; }
20
17
  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; }
21
18
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
@@ -129,7 +126,7 @@ class ReporterRuntime {
129
126
  return;
130
127
  }
131
128
  var uuid = (0, _utils.randomUuid)();
132
- var wrappedFixture = this.state.setFixtureResult(uuid, type, _objectSpread(_objectSpread({}, (0, _factory.createFixtureResult)()), {}, {
129
+ var wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, _objectSpread(_objectSpread({}, (0, _factory.createFixtureResult)()), {}, {
133
130
  start: Date.now()
134
131
  }, fixtureResult));
135
132
  scope.fixtures.push(wrappedFixture);
@@ -172,7 +169,7 @@ class ReporterRuntime {
172
169
  }
173
170
  scope.tests.push(uuid);
174
171
  });
175
- _this.state.setTestResult(uuid, testResult);
172
+ _this.state.setTestResult(uuid, testResult, scopeUuids);
176
173
  _this.notifier.afterTestResultStart(testResult);
177
174
  return uuid;
178
175
  });
@@ -189,22 +186,30 @@ class ReporterRuntime {
189
186
  });
190
187
  _defineProperty(this, "stopTest", (uuid, opts) => {
191
188
  var _testResult$testCaseI, _testResult$historyId;
192
- var testResult = this.state.getTestResult(uuid);
193
- if (!testResult) {
189
+ var wrapped = this.state.getWrappedTestResult(uuid);
190
+ if (!wrapped) {
194
191
  // eslint-disable-next-line no-console
195
192
  console.error("could not stop test result: no test with uuid ".concat(uuid, ") is found"));
196
193
  return;
197
194
  }
195
+ var testResult = wrapped.value;
198
196
  this.notifier.beforeTestResultStop(testResult);
199
197
  (_testResult$testCaseI = testResult.testCaseId) !== null && _testResult$testCaseI !== void 0 ? _testResult$testCaseI : testResult.testCaseId = (0, _utils.getTestResultTestCaseId)(testResult);
200
198
  (_testResult$historyId = testResult.historyId) !== null && _testResult$historyId !== void 0 ? _testResult$historyId : testResult.historyId = (0, _utils.getTestResultHistoryId)(testResult);
201
199
  var startStop = _classPrivateFieldGet(_calculateTimings, this).call(this, testResult.start, opts === null || opts === void 0 ? void 0 : opts.stop, opts === null || opts === void 0 ? void 0 : opts.duration);
202
200
  testResult.start = startStop.start;
203
201
  testResult.stop = startStop.stop;
202
+ var scopeUuids = wrapped.scopeUuids;
203
+ scopeUuids.forEach(scopeUuid => {
204
+ var scope = this.state.getScope(scopeUuid);
205
+ if (scope !== null && scope !== void 0 && scope.labels) {
206
+ testResult.labels = [...testResult.labels, ...scope.labels];
207
+ }
208
+ });
204
209
  this.notifier.afterTestResultStop(testResult);
205
210
  });
206
211
  _defineProperty(this, "writeTest", uuid => {
207
- var testResult = this.state.testResults.get(uuid);
212
+ var testResult = this.state.getTestResult(uuid);
208
213
  if (!testResult) {
209
214
  // eslint-disable-next-line no-console
210
215
  console.error("could not write test result: no test with uuid ".concat(uuid, " is found"));
@@ -351,22 +356,60 @@ class ReporterRuntime {
351
356
  });
352
357
  _classPrivateFieldInitSpec(this, _handleMetadataMessage, (rootUuid, message) => {
353
358
  // only display name could be set to fixture.
354
- var fixtureResult = this.state.getFixtureResult(rootUuid);
359
+ var fixtureResult = this.state.getWrappedFixtureResult(rootUuid);
360
+ var {
361
+ links,
362
+ labels,
363
+ parameters,
364
+ displayName,
365
+ testCaseId,
366
+ historyId,
367
+ description,
368
+ descriptionHtml
369
+ } = message;
355
370
  if (fixtureResult) {
356
- this.updateFixture(rootUuid, result => {
357
- if (message.displayName) {
358
- result.name = message.displayName;
371
+ if (displayName) {
372
+ this.updateFixture(rootUuid, result => {
373
+ result.name = displayName;
374
+ });
375
+ }
376
+ if (historyId) {
377
+ // eslint-disable-next-line no-console
378
+ console.error("historyId can't be changed within test fixtures");
379
+ }
380
+ if (testCaseId) {
381
+ // eslint-disable-next-line no-console
382
+ console.error("testCaseId can't be changed within test fixtures");
383
+ }
384
+ if (links || labels || parameters || description || descriptionHtml) {
385
+ // in some frameworks, afterEach methods can be executed before test stop event, while
386
+ // in others after. To remove the possible undetermined behaviour we only allow
387
+ // using runtime metadata API in before hooks.
388
+ if (fixtureResult.type === "after") {
389
+ // eslint-disable-next-line no-console
390
+ console.error("metadata messages isn't supported for after test fixtures");
391
+ return;
359
392
  }
360
- });
393
+ this.updateScope(fixtureResult.scopeUuid, scope => {
394
+ if (links) {
395
+ scope.links = [...scope.links, ...(this.linkConfig ? (0, _utils.formatLinks)(this.linkConfig, links) : links)];
396
+ }
397
+ if (labels) {
398
+ scope.labels = [...scope.labels, ...labels];
399
+ }
400
+ if (parameters) {
401
+ scope.parameters = [...scope.parameters, ...parameters];
402
+ }
403
+ if (description) {
404
+ scope.description = description;
405
+ }
406
+ if (descriptionHtml) {
407
+ scope.descriptionHtml = descriptionHtml;
408
+ }
409
+ });
410
+ }
361
411
  return;
362
412
  }
363
- var {
364
- links,
365
- labels,
366
- parameters,
367
- displayName
368
- } = message,
369
- rest = _objectWithoutProperties(message, _excluded);
370
413
  this.updateTest(rootUuid, result => {
371
414
  if (links) {
372
415
  result.links = [...result.links, ...(this.linkConfig ? (0, _utils.formatLinks)(this.linkConfig, links) : links)];
@@ -380,7 +423,18 @@ class ReporterRuntime {
380
423
  if (displayName) {
381
424
  result.name = displayName;
382
425
  }
383
- Object.assign(result, rest);
426
+ if (testCaseId) {
427
+ result.testCaseId = testCaseId;
428
+ }
429
+ if (historyId) {
430
+ result.historyId = historyId;
431
+ }
432
+ if (description) {
433
+ result.description = description;
434
+ }
435
+ if (descriptionHtml) {
436
+ result.descriptionHtml = descriptionHtml;
437
+ }
384
438
  });
385
439
  });
386
440
  _classPrivateFieldInitSpec(this, _handleStepMetadataMessage, (rootUuid, message) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ReporterRuntime.js","names":["_path","require","_model","_LifecycleState","_Notifier","_factory","_testplan","_utils","_attachments","_loader","_excluded","_objectWithoutProperties","e","t","o","r","i","_objectWithoutPropertiesLoose","Object","getOwnPropertySymbols","n","length","indexOf","propertyIsEnumerable","call","hasOwnProperty","ownKeys","keys","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_classPrivateFieldGet","s","get","_assertClassBrand","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","DefaultStepStack","constructor","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","WeakMap","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this","writer","listeners","environmentInfo","categories","links","LifecycleState","uuid","randomUuid","state","setScope","updateFunc","scope","getScope","console","error","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","start","Date","now","fixtures","fixture","getFixtureResult","opts","startStop","stop","duration","stage","Stage","FINISHED","result","scopeUuids","undefined","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","beforeTestResultStop","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","afterTestResultStop","testResults","hasSkipLabel","labels","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","stepResult","createStepResult","steps","setStepResult","addStep","step","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","extname","attachmentFileName","buildAttachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","updateFixture","displayName","parameters","rest","updateTest","linkConfig","formatLinks","assign","updateStep","startStep","status","statusDetails","stopStep","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","resolveWriter","Notifier","exports"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type { Config, FixtureType, FixtureWrapper, LinkConfig, TestScope, Writer } from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n\n constructor({ writer, listeners = [], environmentInfo, categories, links }: Config) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultStop(testResult);\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.testResults.get(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getFixtureResult(rootUuid);\n if (fixtureResult) {\n this.updateFixture(rootUuid, (result) => {\n if (message.displayName) {\n result.name = message.displayName;\n }\n });\n return;\n }\n\n const { links, labels, parameters, displayName, ...rest } = message;\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n Object.assign(result, rest);\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (start?: number, stop?: number, duration?: number): { start?: number; stop?: number } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return result;\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAmBA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAmD,IAAAS,SAAA;AAAA,SAAAC,yBAAAC,CAAA,EAAAC,CAAA,gBAAAD,CAAA,iBAAAE,CAAA,EAAAC,CAAA,EAAAC,CAAA,GAAAC,6BAAA,CAAAL,CAAA,EAAAC,CAAA,OAAAK,MAAA,CAAAC,qBAAA,QAAAC,CAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAP,CAAA,QAAAG,CAAA,MAAAA,CAAA,GAAAK,CAAA,CAAAC,MAAA,EAAAN,CAAA,IAAAD,CAAA,GAAAM,CAAA,CAAAL,CAAA,GAAAF,CAAA,CAAAS,OAAA,CAAAR,CAAA,aAAAS,oBAAA,CAAAC,IAAA,CAAAZ,CAAA,EAAAE,CAAA,MAAAE,CAAA,CAAAF,CAAA,IAAAF,CAAA,CAAAE,CAAA,aAAAE,CAAA;AAAA,SAAAC,8BAAAF,CAAA,EAAAH,CAAA,gBAAAG,CAAA,iBAAAF,CAAA,gBAAAO,CAAA,IAAAL,CAAA,SAAAU,cAAA,CAAAD,IAAA,CAAAT,CAAA,EAAAK,CAAA,SAAAR,CAAA,CAAAU,OAAA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C,IAAI,CAACgH,UAAU,GAAG9G,MAAK;EACzB;AAgeF;AAAC2I,OAAA,CAAAlJ,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"file":"ReporterRuntime.js","names":["_path","require","_model","_LifecycleState","_Notifier","_factory","_testplan","_utils","_attachments","_loader","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_classPrivateFieldGet","s","get","_assertClassBrand","n","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","String","Number","DefaultStepStack","constructor","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","WeakMap","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this","writer","listeners","environmentInfo","categories","links","LifecycleState","uuid","randomUuid","state","setScope","updateFunc","scope","getScope","console","error","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","start","Date","now","fixtures","fixture","getFixtureResult","opts","startStop","stop","duration","stage","Stage","FINISHED","result","scopeUuids","undefined","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","labels","afterTestResultStop","hasSkipLabel","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","stepResult","createStepResult","steps","setStepResult","addStep","step","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","extname","attachmentFileName","buildAttachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","parameters","displayName","description","descriptionHtml","updateFixture","updateScope","linkConfig","formatLinks","updateTest","updateStep","startStep","status","statusDetails","stopStep","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","resolveWriter","Notifier","exports"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n\n constructor({ writer, listeners = [], environmentInfo, categories, links }: ReporterRuntimeConfig) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult, scopeUuids);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const wrapped = this.state.getWrappedTestResult(uuid);\n if (!wrapped) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n const testResult = wrapped.value;\n\n this.notifier.beforeTestResultStop(testResult);\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n const scopeUuids = wrapped.scopeUuids;\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n });\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (start?: number, stop?: number, duration?: number): { start?: number; stop?: number } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return result;\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAmBA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AASA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAmD,SAAAS,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CA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BC,IAAI,CAACpC,MAAM,GAAG,IAAAgJ,qBAAa,EAAChJ,MAAM,CAAC;IACnC,IAAI,CAAC0C,QAAQ,GAAG,IAAIuG,kBAAQ,CAAC;MAAEhJ;IAAU,CAAC,CAAC;IAC3C,IAAI,CAACE,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACmH,UAAU,GAAGjH,MAAK;EACzB;AA6hBF;AAAC8I,OAAA,CAAArJ,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -14,7 +14,10 @@ var _exportNames = {
14
14
  MessageReader: true,
15
15
  getEnvironmentLabels: true,
16
16
  getHostLabel: true,
17
- getThreadLabel: true
17
+ getThreadLabel: true,
18
+ getPackageLabel: true,
19
+ getLanguageLabel: true,
20
+ getFrameworkLabel: true
18
21
  };
19
22
  Object.defineProperty(exports, "ALLURE_METADATA_CONTENT_TYPE", {
20
23
  enumerable: true,
@@ -70,12 +73,30 @@ Object.defineProperty(exports, "getEnvironmentLabels", {
70
73
  return _labels.getEnvironmentLabels;
71
74
  }
72
75
  });
76
+ Object.defineProperty(exports, "getFrameworkLabel", {
77
+ enumerable: true,
78
+ get: function get() {
79
+ return _labels.getFrameworkLabel;
80
+ }
81
+ });
73
82
  Object.defineProperty(exports, "getHostLabel", {
74
83
  enumerable: true,
75
84
  get: function get() {
76
85
  return _labels.getHostLabel;
77
86
  }
78
87
  });
88
+ Object.defineProperty(exports, "getLanguageLabel", {
89
+ enumerable: true,
90
+ get: function get() {
91
+ return _labels.getLanguageLabel;
92
+ }
93
+ });
94
+ Object.defineProperty(exports, "getPackageLabel", {
95
+ enumerable: true,
96
+ get: function get() {
97
+ return _labels.getPackageLabel;
98
+ }
99
+ });
79
100
  Object.defineProperty(exports, "getThreadLabel", {
80
101
  enumerable: true,
81
102
  get: function get() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_types","require","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_testplan","_factory","_LifecycleState","_ReporterRuntime","_InMemoryWriter","_FileSystemWriter","_MessageWriter","_MessageReader","_labels"],"sources":["../../../../src/sdk/reporter/index.ts"],"sourcesContent":["export type * from \"./types.js\";\nexport { ALLURE_METADATA_CONTENT_TYPE, ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from \"./types.js\";\nexport * from \"./utils.js\";\nexport * from \"./testplan.js\";\nexport * from \"./factory.js\";\nexport { LifecycleState } from \"./LifecycleState.js\";\nexport { ReporterRuntime } from \"./ReporterRuntime.js\";\nexport { InMemoryWriter } from \"./writer/InMemoryWriter.js\";\nexport { FileSystemWriter } from \"./writer/FileSystemWriter.js\";\nexport { MessageWriter } from \"./writer/MessageWriter.js\";\nexport { MessageReader } from \"./writer/MessageReader.js\";\nexport { getEnvironmentLabels, getHostLabel, getThreadLabel } from \"./utils/labels.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,SAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,SAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,SAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,QAAA,GAAAf,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAY,QAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAU,QAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAE,QAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,eAAA,GAAAhB,OAAA;AACA,IAAAiB,gBAAA,GAAAjB,OAAA;AACA,IAAAkB,eAAA,GAAAlB,OAAA;AACA,IAAAmB,iBAAA,GAAAnB,OAAA;AACA,IAAAoB,cAAA,GAAApB,OAAA;AACA,IAAAqB,cAAA,GAAArB,OAAA;AACA,IAAAsB,OAAA,GAAAtB,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_types","require","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_testplan","_factory","_LifecycleState","_ReporterRuntime","_InMemoryWriter","_FileSystemWriter","_MessageWriter","_MessageReader","_labels"],"sources":["../../../../src/sdk/reporter/index.ts"],"sourcesContent":["export type * from \"./types.js\";\nexport { ALLURE_METADATA_CONTENT_TYPE, ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from \"./types.js\";\nexport * from \"./utils.js\";\nexport * from \"./testplan.js\";\nexport * from \"./factory.js\";\nexport { LifecycleState } from \"./LifecycleState.js\";\nexport { ReporterRuntime } from \"./ReporterRuntime.js\";\nexport { InMemoryWriter } from \"./writer/InMemoryWriter.js\";\nexport { FileSystemWriter } from \"./writer/FileSystemWriter.js\";\nexport { MessageWriter } from \"./writer/MessageWriter.js\";\nexport { MessageReader } from \"./writer/MessageReader.js\";\nexport {\n getEnvironmentLabels,\n getHostLabel,\n getThreadLabel,\n getPackageLabel,\n getLanguageLabel,\n getFrameworkLabel,\n} from \"./utils/labels.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,SAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,I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