allure-cypress 3.14.0 → 3.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +15 -1
  2. package/dist/cjs/browser/events/cypress.js +17 -5
  3. package/dist/cjs/browser/events/cypress.js.map +1 -1
  4. package/dist/cjs/browser/lifecycle.js +3 -1
  5. package/dist/cjs/browser/lifecycle.js.map +1 -1
  6. package/dist/cjs/browser/runtime.js +64 -6
  7. package/dist/cjs/browser/runtime.js.map +1 -1
  8. package/dist/cjs/browser/serialize.js +15 -17
  9. package/dist/cjs/browser/serialize.js.map +1 -1
  10. package/dist/cjs/browser/steps.js +4 -2
  11. package/dist/cjs/browser/steps.js.map +1 -1
  12. package/dist/cjs/browser/utils.js +3 -1
  13. package/dist/cjs/browser/utils.js.map +1 -1
  14. package/dist/cjs/index.js +1 -1
  15. package/dist/cjs/index.js.map +4 -4
  16. package/dist/cjs/reporter.js +92 -50
  17. package/dist/cjs/reporter.js.map +1 -1
  18. package/dist/esm/browser/events/cypress.js +17 -5
  19. package/dist/esm/browser/events/cypress.js.map +1 -1
  20. package/dist/esm/browser/lifecycle.js +2 -1
  21. package/dist/esm/browser/lifecycle.js.map +1 -1
  22. package/dist/esm/browser/runtime.js +63 -6
  23. package/dist/esm/browser/runtime.js.map +1 -1
  24. package/dist/esm/browser/serialize.js +15 -17
  25. package/dist/esm/browser/serialize.js.map +1 -1
  26. package/dist/esm/browser/steps.js +3 -2
  27. package/dist/esm/browser/steps.js.map +1 -1
  28. package/dist/esm/browser/utils.js +2 -1
  29. package/dist/esm/browser/utils.js.map +1 -1
  30. package/dist/esm/index.js +1 -1
  31. package/dist/esm/index.js.map +4 -4
  32. package/dist/esm/reporter.js +93 -51
  33. package/dist/esm/reporter.js.map +1 -1
  34. package/dist/types/browser/runtime.d.ts +6 -2
  35. package/dist/types/reporter.d.ts +5 -0
  36. package/package.json +3 -6
@@ -14,7 +14,8 @@ var _excluded = ["fullNameSuffix"],
14
14
  _excluded4 = ["id"],
15
15
  _excluded5 = ["id", "stop"],
16
16
  _excluded6 = ["id"],
17
- _excluded7 = ["resultsDir", "videoOnFailOnly"];
17
+ _excluded7 = ["path", "name"],
18
+ _excluded8 = ["resultsDir", "videoOnFailOnly"];
18
19
  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; }
19
20
  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; }
20
21
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
@@ -27,6 +28,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
27
28
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
28
29
  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"); }
29
30
  var _fixtureNames = /*#__PURE__*/new WeakMap();
31
+ var _screenshotReferencesByPath = /*#__PURE__*/new WeakMap();
30
32
  var _endAllSpecs = /*#__PURE__*/new WeakMap();
31
33
  var _applyAllureCypressMessages = /*#__PURE__*/new WeakMap();
32
34
  var _startRun = /*#__PURE__*/new WeakMap();
@@ -44,7 +46,6 @@ var _skipTest = /*#__PURE__*/new WeakMap();
44
46
  var _addSkippedTest = /*#__PURE__*/new WeakMap();
45
47
  var _stopTest = /*#__PURE__*/new WeakMap();
46
48
  var _stopExistingTestResult = /*#__PURE__*/new WeakMap();
47
- var _fixTestStepStops = /*#__PURE__*/new WeakMap();
48
49
  var _fixFixtureStepStops = /*#__PURE__*/new WeakMap();
49
50
  var _fixStepStops = /*#__PURE__*/new WeakMap();
50
51
  var _startStep = /*#__PURE__*/new WeakMap();
@@ -62,6 +63,7 @@ class AllureCypress {
62
63
  _defineProperty(this, "allureRuntime", void 0);
63
64
  _defineProperty(this, "specContextByAbsolutePath", new Map());
64
65
  _classPrivateFieldInitSpec(this, _fixtureNames, new Map());
66
+ _classPrivateFieldInitSpec(this, _screenshotReferencesByPath, new Map());
65
67
  _defineProperty(this, "videoOnFailOnly", false);
66
68
  _defineProperty(this, "attachToCypress", on => {
67
69
  on("task", {
@@ -79,6 +81,7 @@ class AllureCypress {
79
81
  return null;
80
82
  }
81
83
  });
84
+ on("after:screenshot", this.onAfterScreenshot);
82
85
 
83
86
  // Emits the remaining fixtures and writes the video of the spec.
84
87
  // In interactive mode it's invoked through the `reportFinalAllureCypressSpecMessages` task.
@@ -88,6 +91,24 @@ class AllureCypress {
88
91
  // `experimentalInteractiveRunEvents` is set.
89
92
  on("after:run", this.onAfterRun);
90
93
  });
94
+ /**
95
+ * Forward `after:screenshot` here if you define your own handler. Pass the
96
+ * final screenshot path after any changes made by your handler.
97
+ */
98
+ _defineProperty(this, "onAfterScreenshot", _ref => {
99
+ var _classPrivateFieldGet2;
100
+ var {
101
+ path
102
+ } = _ref;
103
+ // Snapshot plugins can move or delete the file before the browser flushes
104
+ // its attachment message. Preserve each capture, including overwritten paths.
105
+ var reference = this.allureRuntime.emitAttachment(path, {
106
+ contentType: _allureJsCommons.ContentType.PNG
107
+ });
108
+ var references = (_classPrivateFieldGet2 = _classPrivateFieldGet(_screenshotReferencesByPath, this).get(path)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : [];
109
+ references.push(reference);
110
+ _classPrivateFieldGet(_screenshotReferencesByPath, this).set(path, references);
111
+ });
91
112
  /**
92
113
  * Forward the `after:spec` event into Allure Cypress using this function if
93
114
  * you need to define your own handler or combine Allure Cypress with other
@@ -152,17 +173,18 @@ class AllureCypress {
152
173
  _classPrivateFieldGet(_emitRemainingScopes, this).call(this, specContext);
153
174
  this.specContextByAbsolutePath.delete(specAbsolutePath);
154
175
  }
176
+ _classPrivateFieldGet(_screenshotReferencesByPath, this).clear();
155
177
  });
156
178
  _classPrivateFieldInitSpec(this, _endAllSpecs, () => {
157
179
  for (var specAbsolutePath of this.specContextByAbsolutePath.keys()) {
158
180
  this.endSpec(specAbsolutePath);
159
181
  }
160
182
  });
161
- _classPrivateFieldInitSpec(this, _applyAllureCypressMessages, _ref => {
183
+ _classPrivateFieldInitSpec(this, _applyAllureCypressMessages, _ref2 => {
162
184
  var {
163
185
  messages,
164
186
  absolutePath
165
- } = _ref;
187
+ } = _ref2;
166
188
  messages.forEach(message => {
167
189
  if (message.type === "cypress_run_start") {
168
190
  _classPrivateFieldGet(_startRun, this).call(this, absolutePath);
@@ -223,14 +245,14 @@ class AllureCypress {
223
245
  _classPrivateFieldGet(_initializeSpecContext, this).call(this, absolutePath);
224
246
  }
225
247
  });
226
- _classPrivateFieldInitSpec(this, _startSuite, (context, _ref2) => {
248
+ _classPrivateFieldInitSpec(this, _startSuite, (context, _ref3) => {
227
249
  var {
228
250
  data: {
229
251
  id,
230
252
  name,
231
253
  root
232
254
  }
233
- } = _ref2;
255
+ } = _ref3;
234
256
  _classPrivateFieldGet(_pushNewSuiteScope, this).call(this, context, id);
235
257
  if (!root) {
236
258
  _classPrivateFieldGet(_emitPreviousTestScope, this).call(this, context);
@@ -244,12 +266,12 @@ class AllureCypress {
244
266
  context.suiteScopeToId.set(scope, suiteId);
245
267
  return scope;
246
268
  });
247
- _classPrivateFieldInitSpec(this, _stopSuite, (context, _ref3) => {
269
+ _classPrivateFieldInitSpec(this, _stopSuite, (context, _ref4) => {
248
270
  var {
249
271
  data: {
250
272
  root
251
273
  }
252
- } = _ref3;
274
+ } = _ref4;
253
275
  _classPrivateFieldGet(_emitPreviousTestScope, this).call(this, context);
254
276
  if (!root) {
255
277
  context.suiteNames.pop();
@@ -267,7 +289,7 @@ class AllureCypress {
267
289
  this.allureRuntime.writeScope(scope);
268
290
  }
269
291
  });
270
- _classPrivateFieldInitSpec(this, _startHook, (context, _ref4) => {
292
+ _classPrivateFieldInitSpec(this, _startHook, (context, _ref5) => {
271
293
  var {
272
294
  data: {
273
295
  name,
@@ -275,7 +297,7 @@ class AllureCypress {
275
297
  position,
276
298
  start
277
299
  }
278
- } = _ref4;
300
+ } = _ref5;
279
301
  var isEach = scopeType === "each";
280
302
  var isAfterEach = position === "after" && isEach;
281
303
  if (!isAfterEach) {
@@ -293,12 +315,12 @@ class AllureCypress {
293
315
  }
294
316
  }
295
317
  });
296
- _classPrivateFieldInitSpec(this, _stopHook, (context, _ref5) => {
318
+ _classPrivateFieldInitSpec(this, _stopHook, (context, _ref6) => {
297
319
  var {
298
320
  data: {
299
321
  duration
300
322
  }
301
- } = _ref5;
323
+ } = _ref6;
302
324
  var fixtureUuid = context.fixture;
303
325
  if (fixtureUuid) {
304
326
  this.allureRuntime.updateFixture(fixtureUuid, fixture => {
@@ -313,23 +335,23 @@ class AllureCypress {
313
335
  context.fixture = undefined;
314
336
  }
315
337
  });
316
- _classPrivateFieldInitSpec(this, _startTest, (context, _ref6) => {
338
+ _classPrivateFieldInitSpec(this, _startTest, (context, _ref7) => {
317
339
  var {
318
340
  data: {
319
341
  fullNameSuffix
320
342
  }
321
- } = _ref6,
322
- testResultData = _objectWithoutProperties(_ref6.data, _excluded);
343
+ } = _ref7,
344
+ testResultData = _objectWithoutProperties(_ref7.data, _excluded);
323
345
  _classPrivateFieldGet(_emitPreviousTestScope, this).call(this, context);
324
346
  var testScope = this.allureRuntime.startScope();
325
347
  context.testScope = testScope;
326
348
  context.test = _classPrivateFieldGet(_addNewTestResult, this).call(this, context, fullNameSuffix, testResultData, [context.videoScope, ...context.suiteScopes, testScope]);
327
349
  });
328
- _classPrivateFieldInitSpec(this, _addNewTestResult, (context, fullNameSuffix, _ref7, scopes) => {
350
+ _classPrivateFieldInitSpec(this, _addNewTestResult, (context, fullNameSuffix, _ref8, scopes) => {
329
351
  var {
330
352
  labels: metadataLabels = []
331
- } = _ref7,
332
- otherTestData = _objectWithoutProperties(_ref7, _excluded2);
353
+ } = _ref8,
354
+ otherTestData = _objectWithoutProperties(_ref8, _excluded2);
333
355
  var projectName = (0, _reporter.getProjectName)();
334
356
  var posixPath = (0, _reporter.getPosixPath)(context.specPath);
335
357
  var fullNameBase = projectName ? "".concat(projectName, ":").concat(posixPath) : posixPath;
@@ -337,28 +359,28 @@ class AllureCypress {
337
359
  var titlePath = posixPath.split("/").concat(context.suiteNames);
338
360
  return this.allureRuntime.startTest(_objectSpread({
339
361
  stage: _allureJsCommons.Stage.RUNNING,
340
- labels: [(0, _reporter.getLanguageLabel)(), (0, _reporter.getFrameworkLabel)("cypress"), ...(0, _reporter.getSuiteLabels)(context.suiteNames), ...metadataLabels, ...(0, _reporter.getEnvironmentLabels)(), (0, _reporter.getHostLabel)(), (0, _reporter.getThreadLabel)(), (0, _reporter.getPackageLabel)(context.specPath), (0, _reporter.getFallbackTestCaseIdLabel)((0, _reporter.md5)(legacyFullName))],
362
+ labels: [(0, _reporter.getLanguageLabel)(), (0, _reporter.getFrameworkLabel)("cypress"), ...metadataLabels, ...(0, _reporter.getEnvironmentLabels)(), (0, _reporter.getHostLabel)(), (0, _reporter.getThreadLabel)(), (0, _reporter.getPackageLabel)(context.specPath), (0, _reporter.getFallbackTestCaseIdLabel)((0, _reporter.md5)(legacyFullName))],
341
363
  fullName: "".concat(fullNameBase, "#").concat(fullNameSuffix),
342
364
  titlePath: projectName ? [projectName, ...titlePath] : titlePath
343
365
  }, otherTestData), scopes);
344
366
  });
345
- _classPrivateFieldInitSpec(this, _failHookAndTest, (context, _ref8) => {
367
+ _classPrivateFieldInitSpec(this, _failHookAndTest, (context, _ref9) => {
346
368
  var {
347
369
  data: {
348
370
  status,
349
371
  statusDetails
350
372
  }
351
- } = _ref8;
373
+ } = _ref9;
352
374
  var setError = result => Object.assign(result, {
353
375
  status,
354
376
  statusDetails
355
377
  });
356
378
  var fixtureUuid = context.fixture;
357
379
  if (fixtureUuid) {
358
- var _classPrivateFieldGet2;
380
+ var _classPrivateFieldGet3;
359
381
  this.allureRuntime.updateFixture(fixtureUuid, setError);
360
382
  this.allureRuntime.applyGlobalRuntimeMessages([(0, _sdk.toGlobalErrorMessage)({
361
- name: (_classPrivateFieldGet2 = _classPrivateFieldGet(_fixtureNames, this).get(fixtureUuid)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : "hook",
383
+ name: (_classPrivateFieldGet3 = _classPrivateFieldGet(_fixtureNames, this).get(fixtureUuid)) !== null && _classPrivateFieldGet3 !== void 0 ? _classPrivateFieldGet3 : "hook",
362
384
  details: statusDetails,
363
385
  status
364
386
  })]);
@@ -377,12 +399,12 @@ class AllureCypress {
377
399
  });
378
400
  }
379
401
  });
380
- _classPrivateFieldInitSpec(this, _skipTest, (context, _ref9) => {
402
+ _classPrivateFieldInitSpec(this, _skipTest, (context, _ref0) => {
381
403
  var {
382
404
  data: {
383
405
  statusDetails
384
406
  }
385
- } = _ref9;
407
+ } = _ref0;
386
408
  var testUuid = context.test;
387
409
  if (testUuid) {
388
410
  this.allureRuntime.updateTest(testUuid, testResult => {
@@ -393,7 +415,7 @@ class AllureCypress {
393
415
  });
394
416
  }
395
417
  });
396
- _classPrivateFieldInitSpec(this, _addSkippedTest, (context, _ref0) => {
418
+ _classPrivateFieldInitSpec(this, _addSkippedTest, (context, _ref1) => {
397
419
  var {
398
420
  data: {
399
421
  fullNameSuffix,
@@ -401,8 +423,8 @@ class AllureCypress {
401
423
  duration,
402
424
  retries
403
425
  }
404
- } = _ref0,
405
- testResultData = _objectWithoutProperties(_ref0.data, _excluded3);
426
+ } = _ref1,
427
+ testResultData = _objectWithoutProperties(_ref1.data, _excluded3);
406
428
  // Tests skipped because of a hook error may share all suites of the current context
407
429
  // or just a part thereof (if it's from a sibling suite).
408
430
  var scopes = suites.map(s => context.suiteIdToScope.get(s)).filter(s => Boolean(s));
@@ -410,25 +432,25 @@ class AllureCypress {
410
432
  _classPrivateFieldGet(_stopExistingTestResult, this).call(this, testUuid, {
411
433
  duration,
412
434
  retries
413
- });
435
+ }, context.suiteNames);
414
436
  this.allureRuntime.writeTest(testUuid);
415
437
  });
416
- _classPrivateFieldInitSpec(this, _stopTest, (context, _ref1) => {
438
+ _classPrivateFieldInitSpec(this, _stopTest, (context, _ref10) => {
417
439
  var {
418
440
  data
419
- } = _ref1;
441
+ } = _ref10;
420
442
  var testUuid = context.test;
421
443
  if (testUuid) {
422
- _classPrivateFieldGet(_stopExistingTestResult, this).call(this, testUuid, data);
444
+ _classPrivateFieldGet(_stopExistingTestResult, this).call(this, testUuid, data, context.suiteNames);
423
445
  this.allureRuntime.writeTest(testUuid);
424
446
  context.test = undefined;
425
447
  }
426
448
  });
427
- _classPrivateFieldInitSpec(this, _stopExistingTestResult, (testUuid, _ref10) => {
449
+ _classPrivateFieldInitSpec(this, _stopExistingTestResult, (testUuid, _ref11, suiteNames) => {
428
450
  var {
429
451
  retries,
430
452
  duration
431
- } = _ref10;
453
+ } = _ref11;
432
454
  this.allureRuntime.updateTest(testUuid, testResult => {
433
455
  if (retries > 0) {
434
456
  testResult.parameters.push({
@@ -442,19 +464,20 @@ class AllureCypress {
442
464
  this.allureRuntime.stopTest(testUuid, {
443
465
  duration
444
466
  });
445
- _classPrivateFieldGet(_fixTestStepStops, this).call(this, testUuid);
446
- });
447
- _classPrivateFieldInitSpec(this, _fixTestStepStops, testUuid => {
448
- this.allureRuntime.updateTest(testUuid, _classPrivateFieldGet(_fixStepStops, this));
467
+ // Hook metadata is merged by stopTest, so apply defaults only after it.
468
+ this.allureRuntime.updateTest(testUuid, testResult => {
469
+ testResult.labels.push(...(0, _reporter.getDefaultSuiteLabels)(testResult, suiteNames));
470
+ _classPrivateFieldGet(_fixStepStops, this).call(this, testResult);
471
+ });
449
472
  });
450
473
  _classPrivateFieldInitSpec(this, _fixFixtureStepStops, fixtureUuid => {
451
474
  this.allureRuntime.updateFixture(fixtureUuid, _classPrivateFieldGet(_fixStepStops, this));
452
475
  });
453
- _classPrivateFieldInitSpec(this, _fixStepStops, _ref11 => {
476
+ _classPrivateFieldInitSpec(this, _fixStepStops, _ref12 => {
454
477
  var {
455
478
  stop,
456
479
  steps = []
457
- } = _ref11;
480
+ } = _ref12;
458
481
  if (stop) {
459
482
  // In some circumstances, steps becomes dangling and are stopped at the test end/hook end events, which happen
460
483
  // chronologically after the test or fixture ends. This leads to the steps' stop time being greater than the one
@@ -470,11 +493,11 @@ class AllureCypress {
470
493
  }
471
494
  }
472
495
  });
473
- _classPrivateFieldInitSpec(this, _startStep, (context, _ref12) => {
496
+ _classPrivateFieldInitSpec(this, _startStep, (context, _ref13) => {
474
497
  var {
475
498
  id
476
- } = _ref12,
477
- properties = _objectWithoutProperties(_ref12, _excluded4);
499
+ } = _ref13,
500
+ properties = _objectWithoutProperties(_ref13, _excluded4);
478
501
  var rootUuid = _classPrivateFieldGet(_resolveRootUuid, this).call(this, context);
479
502
  if (rootUuid) {
480
503
  var stepUuid = this.allureRuntime.startStep(rootUuid, undefined, properties);
@@ -483,12 +506,12 @@ class AllureCypress {
483
506
  }
484
507
  }
485
508
  });
486
- _classPrivateFieldInitSpec(this, _stopStep, (context, _ref13) => {
509
+ _classPrivateFieldInitSpec(this, _stopStep, (context, _ref14) => {
487
510
  var {
488
511
  id,
489
512
  stop
490
- } = _ref13,
491
- properties = _objectWithoutProperties(_ref13, _excluded5);
513
+ } = _ref14,
514
+ properties = _objectWithoutProperties(_ref14, _excluded5);
492
515
  var stepUuid = context.stepsByFrontEndId.get(id);
493
516
  if (stepUuid) {
494
517
  this.allureRuntime.updateStep(stepUuid, r => {
@@ -499,11 +522,11 @@ class AllureCypress {
499
522
  });
500
523
  }
501
524
  });
502
- _classPrivateFieldInitSpec(this, _finalizeStep, (context, _ref14) => {
525
+ _classPrivateFieldInitSpec(this, _finalizeStep, (context, _ref15) => {
503
526
  var {
504
527
  id
505
- } = _ref14,
506
- properties = _objectWithoutProperties(_ref14, _excluded6);
528
+ } = _ref15,
529
+ properties = _objectWithoutProperties(_ref15, _excluded6);
507
530
  var stepUuid = context.stepsByFrontEndId.get(id);
508
531
  if (stepUuid) {
509
532
  this.allureRuntime.updateStep(stepUuid, r => {
@@ -514,6 +537,25 @@ class AllureCypress {
514
537
  });
515
538
  _classPrivateFieldInitSpec(this, _applyRuntimeApiMessages, (context, message) => {
516
539
  var rootUuid = _classPrivateFieldGet(_resolveRootUuid, this).call(this, context);
540
+ if (message.type === "attachment_path") {
541
+ var _message$data = message.data,
542
+ {
543
+ path,
544
+ name
545
+ } = _message$data,
546
+ options = _objectWithoutProperties(_message$data, _excluded7);
547
+ var references = _classPrivateFieldGet(_screenshotReferencesByPath, this).get(path);
548
+ var reference = references === null || references === void 0 ? void 0 : references.shift();
549
+ if (reference) {
550
+ if (!(references !== null && references !== void 0 && references.length)) {
551
+ _classPrivateFieldGet(_screenshotReferencesByPath, this).delete(path);
552
+ }
553
+ if (rootUuid) {
554
+ this.allureRuntime.writeAttachment(rootUuid, undefined, name, reference, options);
555
+ }
556
+ return;
557
+ }
558
+ }
517
559
  if (rootUuid) {
518
560
  this.allureRuntime.applyRuntimeMessages(rootUuid, [message]);
519
561
  } else {
@@ -587,7 +629,7 @@ class AllureCypress {
587
629
  resultsDir,
588
630
  videoOnFailOnly = false
589
631
  } = config,
590
- rest = _objectWithoutProperties(config, _excluded7);
632
+ rest = _objectWithoutProperties(config, _excluded8);
591
633
  this.videoOnFailOnly = videoOnFailOnly;
592
634
  this.allureRuntime = new _reporter.ReporterRuntime(_objectSpread({
593
635
  writer: (0, _reporter.createDefaultWriter)({
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.js","names":["_allureJsCommons","require","_sdk","_reporter","_utils","_excluded","_excluded2","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","n","indexOf","propertyIsEnumerable","call","hasOwnProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","_classPrivateFieldGet","s","get","_assertClassBrand","_fixtureNames","WeakMap","_endAllSpecs","_applyAllureCypressMessages","_startRun","_startSuite","_pushNewSuiteScope","_stopSuite","_writeLastSuiteScope","_startHook","_stopHook","_startTest","_addNewTestResult","_failHookAndTest","_passTest","_skipTest","_addSkippedTest","_stopTest","_stopExistingTestResult","_fixTestStepStops","_fixFixtureStepStops","_fixStepStops","_startStep","_stopStep","_finalizeStep","_applyRuntimeApiMessages","_emitPreviousTestScope","_resolveRootUuid","_attachSpecVideo","_emitRemainingScopes","_initializeSpecContext","AllureCypress","constructor","config","undefined","Map","on","reportAllureCypressSpecMessages","args","reportFinalAllureCypressSpecMessages","isInteractive","endSpec","absolutePath","onAfterSpec","onAfterRun","spec","results","_results$video","absolute","video","endRun","allureRuntime","writeEnvironmentInfo","writeCategoriesDefinitions","specAbsolutePath","cypressVideoPath","specContext","specContextByAbsolutePath","delete","_ref","messages","message","type","context","data","_ref2","id","name","root","suiteNames","suiteId","scope","startScope","suiteScopes","suiteIdToScope","suiteScopeToId","_ref3","pop","writeScope","_ref4","scopeType","position","start","isEach","isAfterEach","testScope","last","fixture","startFixture","status","_ref5","duration","fixtureUuid","updateFixture","_fixture$status","Status","PASSED","stopFixture","_ref6","fullNameSuffix","testResultData","test","videoScope","_ref7","scopes","labels","metadataLabels","otherTestData","projectName","getProjectName","posixPath","getPosixPath","specPath","fullNameBase","concat","legacyFullName","titlePath","split","startTest","stage","Stage","RUNNING","getLanguageLabel","getFrameworkLabel","getSuiteLabels","getEnvironmentLabels","getHostLabel","getThreadLabel","getPackageLabel","getFallbackTestCaseIdLabel","md5","fullName","_ref8","statusDetails","setError","result","assign","_classPrivateFieldGet2","applyGlobalRuntimeMessages","toGlobalErrorMessage","details","testUuid","updateTest","failed","testResult","_ref9","SKIPPED","_ref0","suites","retries","map","Boolean","writeTest","_ref1","_ref10","parameters","toString","excluded","FINISHED","stopTest","_ref11","stop","steps","step","at","_ref12","properties","rootUuid","stepUuid","startStep","stepsByFrontEndId","_ref13","updateStep","stopStep","_ref14","applyRuntimeMessages","_context$fixture","shouldVideoBeAttached","videoOnFailOnly","writeAttachment","contentType","ContentType","MP4","getRelativePath","resultsDir","rest","ReporterRuntime","writer","createDefaultWriter","exports","createRuntimeState","allureConfig","getRuntimeConfigDefaults","initialized","testPlan","parseTestPlan","projectDir","getProjectRoot","stepStack","stepsToFinalize","nextApiStepId","stepsFromCommands","enabled","DEFAULT_RUNTIME_CONFIG","maxArgumentLength","maxArgumentDepth","initializeRuntimeState","cypressConfig","allureState","expose","allure","env","allureCypress","hasCypressConfig","allureCypressReporter","attachToCypress"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { ContentType, Stage, Status } from \"allure-js-commons\";\nimport type { FixtureResult, TestResult } from \"allure-js-commons\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport { toGlobalErrorMessage } from \"allure-js-commons/sdk\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFallbackTestCaseIdLabel,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getPackageLabel,\n getPosixPath,\n getProjectName,\n getProjectRoot,\n getRelativePath,\n getSuiteLabels,\n getThreadLabel,\n md5,\n parseTestPlan,\n} from \"allure-js-commons/sdk/reporter\";\nimport type Cypress from \"cypress\";\n\nimport type {\n AllureCypressConfig,\n AllureCypressTaskArgs,\n AllureSpecState,\n CypressFailMessage,\n CypressHookEndMessage,\n CypressHookStartMessage,\n CypressSkippedTestMessage,\n CypressStepFinalizeMessage,\n CypressStepStartMessage,\n CypressStepStopMessage,\n CypressSuiteEndMessage,\n CypressSuiteStartMessage,\n CypressTestEndMessage,\n CypressTestSkipMessage,\n CypressTestStartMessage,\n SpecContext,\n} from \"./types.js\";\nimport { DEFAULT_RUNTIME_CONFIG, last } from \"./utils.js\";\n\nexport class AllureCypress {\n allureRuntime: ReporterRuntime;\n specContextByAbsolutePath = new Map<string, SpecContext>();\n #fixtureNames = new Map<string, string>();\n videoOnFailOnly: boolean = false;\n\n constructor(config: AllureCypressConfig = {}) {\n const { resultsDir, videoOnFailOnly = false, ...rest } = config;\n\n this.videoOnFailOnly = videoOnFailOnly;\n this.allureRuntime = new ReporterRuntime({\n writer: createDefaultWriter({ resultsDir }),\n ...rest,\n });\n }\n\n attachToCypress = (on: Cypress.PluginEvents) => {\n on(\"task\", {\n reportAllureCypressSpecMessages: (args: AllureCypressTaskArgs) => {\n this.#applyAllureCypressMessages(args);\n return null;\n },\n reportFinalAllureCypressSpecMessages: (args: AllureCypressTaskArgs) => {\n this.#applyAllureCypressMessages(args);\n if (args.isInteractive) {\n // In non-interactive mode the spec is ended via the 'after:spec' event instead\n // to get the spec's video.\n this.endSpec(args.absolutePath);\n }\n return null;\n },\n });\n\n // Emits the remaining fixtures and writes the video of the spec.\n // In interactive mode it's invoked through the `reportFinalAllureCypressSpecMessages` task.\n on(\"after:spec\", this.onAfterSpec);\n\n // Emits the categories and env info. Doesn't work in interactive mode unless\n // `experimentalInteractiveRunEvents` is set.\n on(\"after:run\", this.onAfterRun);\n };\n\n /**\n * Forward the `after:spec` event into Allure Cypress using this function if\n * you need to define your own handler or combine Allure Cypress with other\n * plugins. More info [here](https://github.com/allure-framework/allure-js/blob/main/packages/allure-cypress/README.md#setupnodeevents-limitations).\n * @param spec The first argument of the `after:spec` event.\n * @param results The second argument of the `after:spec` event. It's `undefined` in interactive mode.\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * setupNodeEvents: (on, config) => {\n * const allureReporter = allureCypress(on, config);\n * on(\"after:spec\", (spec, results) => {\n * allureReporter.onAfterSpec(spec, results);\n * });\n * return config;\n * }\n * // ...\n * });\n * ```\n */\n onAfterSpec = (spec: Cypress.Spec, results: CypressCommandLine.RunResult | undefined) => {\n this.endSpec(spec.absolute, results?.video ?? undefined);\n };\n\n /**\n * Forward the `after:run` event into Allure Cypress using this function if\n * you need to define your own handler or combine Allure Cypress with other\n * plugins. More info [here](https://github.com/allure-framework/allure-js/blob/main/packages/allure-cypress/README.md#setupnodeevents-limitations).\n * @param results The argument of the `after:run` event. It's `undefined` in interactive mode.\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * setupNodeEvents: (on, config) => {\n * const allureReporter = allureCypress(on, config);\n * on(\"after:run\", (results) => {\n * allureReporter.onAfterRun(results);\n * });\n * return config;\n * }\n * // ...\n * });\n * ```\n */\n onAfterRun = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n results: CypressCommandLine.CypressFailedRunResult | CypressCommandLine.CypressRunResult | undefined,\n ) => {\n this.endRun();\n };\n\n endRun = () => {\n this.#endAllSpecs();\n this.allureRuntime.writeEnvironmentInfo();\n this.allureRuntime.writeCategoriesDefinitions();\n };\n\n endSpec = (specAbsolutePath: string, cypressVideoPath?: string) => {\n const specContext = this.specContextByAbsolutePath.get(specAbsolutePath);\n if (specContext) {\n this.#attachSpecVideo(specContext, cypressVideoPath);\n this.#emitRemainingScopes(specContext);\n this.specContextByAbsolutePath.delete(specAbsolutePath);\n }\n };\n\n #endAllSpecs = () => {\n for (const specAbsolutePath of this.specContextByAbsolutePath.keys()) {\n this.endSpec(specAbsolutePath);\n }\n };\n\n #applyAllureCypressMessages = ({ messages, absolutePath }: AllureCypressTaskArgs) => {\n messages.forEach((message) => {\n if (message.type === \"cypress_run_start\") {\n this.#startRun(absolutePath);\n return;\n }\n\n const context = this.specContextByAbsolutePath.get(absolutePath);\n if (!context) {\n return;\n }\n\n switch (message.type) {\n case \"cypress_suite_start\":\n this.#startSuite(context, message);\n break;\n case \"cypress_suite_end\":\n this.#stopSuite(context, message);\n break;\n case \"cypress_hook_start\":\n this.#startHook(context, message);\n break;\n case \"cypress_hook_end\":\n this.#stopHook(context, message);\n break;\n case \"cypress_test_start\":\n this.#startTest(context, message);\n break;\n case \"cypress_test_pass\":\n this.#passTest(context);\n break;\n case \"cypress_fail\":\n this.#failHookAndTest(context, message);\n break;\n case \"cypress_test_skip\":\n this.#skipTest(context, message);\n break;\n case \"cypress_skipped_test\":\n this.#addSkippedTest(context, message);\n break;\n case \"cypress_test_end\":\n this.#stopTest(context, message);\n break;\n case \"cypress_step_start\":\n this.#startStep(context, message.data);\n break;\n case \"cypress_step_stop\":\n this.#stopStep(context, message.data);\n break;\n case \"cypress_step_finalize\":\n this.#finalizeStep(context, message.data);\n break;\n default:\n this.#applyRuntimeApiMessages(context, message);\n break;\n }\n });\n };\n\n #startRun = (absolutePath: string) => {\n if (!this.specContextByAbsolutePath.has(absolutePath)) {\n this.#initializeSpecContext(absolutePath);\n }\n };\n\n #startSuite = (context: SpecContext, { data: { id, name, root } }: CypressSuiteStartMessage) => {\n this.#pushNewSuiteScope(context, id);\n if (!root) {\n this.#emitPreviousTestScope(context);\n context.suiteNames.push(name);\n }\n };\n\n #pushNewSuiteScope = (context: SpecContext, suiteId: string) => {\n const scope = this.allureRuntime.startScope();\n context.suiteScopes.push(scope);\n context.suiteIdToScope.set(suiteId, scope);\n context.suiteScopeToId.set(scope, suiteId);\n return scope;\n };\n\n #stopSuite = (context: SpecContext, { data: { root } }: CypressSuiteEndMessage) => {\n this.#emitPreviousTestScope(context);\n if (!root) {\n context.suiteNames.pop();\n }\n this.#writeLastSuiteScope(context);\n };\n\n #writeLastSuiteScope = (context: SpecContext) => {\n const scope = context.suiteScopes.pop();\n if (scope) {\n const suiteId = context.suiteScopeToId.get(scope);\n if (suiteId) {\n context.suiteScopeToId.delete(scope);\n context.suiteIdToScope.delete(suiteId);\n }\n this.allureRuntime.writeScope(scope);\n }\n };\n\n #startHook = (context: SpecContext, { data: { name, scopeType, position, start } }: CypressHookStartMessage) => {\n const isEach = scopeType === \"each\";\n const isAfterEach = position === \"after\" && isEach;\n if (!isAfterEach) {\n this.#emitPreviousTestScope(context);\n }\n\n const scope = isEach ? context.testScope : last(context.suiteScopes);\n if (scope) {\n context.fixture = this.allureRuntime.startFixture(scope, position, {\n name,\n start,\n status: undefined,\n });\n if (context.fixture) {\n this.#fixtureNames.set(context.fixture, name);\n }\n }\n };\n\n #stopHook = (context: SpecContext, { data: { duration } }: CypressHookEndMessage) => {\n const fixtureUuid = context.fixture;\n if (fixtureUuid) {\n this.allureRuntime.updateFixture(fixtureUuid, (fixture) => {\n fixture.status ??= Status.PASSED;\n });\n this.allureRuntime.stopFixture(fixtureUuid, { duration });\n this.#fixFixtureStepStops(fixtureUuid);\n this.#fixtureNames.delete(fixtureUuid);\n context.fixture = undefined;\n }\n };\n\n #startTest = (context: SpecContext, { data: { fullNameSuffix, ...testResultData } }: CypressTestStartMessage) => {\n this.#emitPreviousTestScope(context);\n const testScope = this.allureRuntime.startScope();\n context.testScope = testScope;\n context.test = this.#addNewTestResult(context, fullNameSuffix, testResultData, [\n context.videoScope,\n ...context.suiteScopes,\n testScope,\n ]);\n };\n\n #addNewTestResult = (\n context: SpecContext,\n fullNameSuffix: string,\n { labels: metadataLabels = [], ...otherTestData }: Partial<TestResult>,\n scopes: string[],\n ) => {\n const projectName = getProjectName();\n const posixPath = getPosixPath(context.specPath);\n const fullNameBase = projectName ? `${projectName}:${posixPath}` : posixPath;\n const legacyFullName = `${posixPath}#${fullNameSuffix}`;\n\n const titlePath = posixPath.split(\"/\").concat(context.suiteNames);\n\n return this.allureRuntime.startTest(\n {\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"cypress\"),\n ...getSuiteLabels(context.suiteNames),\n ...metadataLabels,\n ...getEnvironmentLabels(),\n getHostLabel(),\n getThreadLabel(),\n getPackageLabel(context.specPath),\n getFallbackTestCaseIdLabel(md5(legacyFullName)),\n ],\n fullName: `${fullNameBase}#${fullNameSuffix}`,\n titlePath: projectName ? [projectName, ...titlePath] : titlePath,\n ...otherTestData,\n },\n scopes,\n );\n };\n\n #failHookAndTest = (context: SpecContext, { data: { status, statusDetails } }: CypressFailMessage) => {\n const setError = (result: object) => Object.assign(result, { status, statusDetails });\n\n const fixtureUuid = context.fixture;\n if (fixtureUuid) {\n this.allureRuntime.updateFixture(fixtureUuid, setError);\n this.allureRuntime.applyGlobalRuntimeMessages([\n toGlobalErrorMessage({\n name: this.#fixtureNames.get(fixtureUuid) ?? \"hook\",\n details: statusDetails,\n status,\n }),\n ]);\n }\n\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, setError);\n }\n\n context.failed = true;\n };\n\n #passTest = (context: SpecContext) => {\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.status = Status.PASSED;\n });\n }\n };\n\n #skipTest = (context: SpecContext, { data: { statusDetails } }: CypressTestSkipMessage) => {\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.status = Status.SKIPPED;\n if (statusDetails) {\n testResult.statusDetails = statusDetails;\n }\n });\n }\n };\n\n #addSkippedTest = (\n context: SpecContext,\n { data: { fullNameSuffix, suites, duration, retries, ...testResultData } }: CypressSkippedTestMessage,\n ) => {\n // Tests skipped because of a hook error may share all suites of the current context\n // or just a part thereof (if it's from a sibling suite).\n const scopes = suites.map((s) => context.suiteIdToScope.get(s)).filter((s): s is string => Boolean(s));\n\n const testUuid = this.#addNewTestResult(context, fullNameSuffix, testResultData, [context.videoScope, ...scopes]);\n this.#stopExistingTestResult(testUuid, { duration, retries });\n this.allureRuntime.writeTest(testUuid);\n };\n\n #stopTest = (context: SpecContext, { data }: CypressTestEndMessage) => {\n const testUuid = context.test;\n if (testUuid) {\n this.#stopExistingTestResult(testUuid, data);\n this.allureRuntime.writeTest(testUuid);\n context.test = undefined;\n }\n };\n\n #stopExistingTestResult = (testUuid: string, { retries, duration }: CypressTestEndMessage[\"data\"]) => {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n if (retries > 0) {\n testResult.parameters.push({\n name: \"Retry\",\n value: retries.toString(),\n excluded: true,\n });\n }\n testResult.stage = Stage.FINISHED;\n });\n this.allureRuntime.stopTest(testUuid, { duration });\n this.#fixTestStepStops(testUuid);\n };\n\n #fixTestStepStops = (testUuid: string) => {\n this.allureRuntime.updateTest(testUuid, this.#fixStepStops);\n };\n\n #fixFixtureStepStops = (fixtureUuid: string) => {\n this.allureRuntime.updateFixture(fixtureUuid, this.#fixStepStops);\n };\n\n #fixStepStops = ({ stop, steps = [] }: TestResult | FixtureResult) => {\n if (stop) {\n // In some circumstances, steps becomes dangling and are stopped at the test end/hook end events, which happen\n // chronologically after the test or fixture ends. This leads to the steps' stop time being greater than the one\n // of the test/fixture.\n // The only steps that may be affected are the rightmost descendants of the test/fixture.\n for (let step = steps.at(-1); step; step = step.steps.at(-1)) {\n if (step.stop && step.stop > stop) {\n step.stop = stop;\n } else {\n // Steps are always stopped child-to-parent. If a step's stop time is OK, its substeps are also correct.\n return;\n }\n }\n }\n };\n\n #startStep = (context: SpecContext, { id, ...properties }: CypressStepStartMessage[\"data\"]) => {\n const rootUuid = this.#resolveRootUuid(context);\n if (rootUuid) {\n const stepUuid = this.allureRuntime.startStep(rootUuid, undefined, properties);\n if (stepUuid) {\n context.stepsByFrontEndId.set(id, stepUuid);\n }\n }\n };\n\n #stopStep = (context: SpecContext, { id, stop, ...properties }: CypressStepStopMessage[\"data\"]) => {\n const stepUuid = context.stepsByFrontEndId.get(id);\n if (stepUuid) {\n this.allureRuntime.updateStep(stepUuid, (r) => {\n Object.assign(r, properties);\n });\n this.allureRuntime.stopStep(stepUuid, { stop });\n }\n };\n\n #finalizeStep = (context: SpecContext, { id, ...properties }: CypressStepFinalizeMessage[\"data\"]) => {\n const stepUuid = context.stepsByFrontEndId.get(id);\n if (stepUuid) {\n this.allureRuntime.updateStep(stepUuid, (r) => {\n Object.assign(r, properties);\n });\n context.stepsByFrontEndId.delete(id);\n }\n };\n\n #applyRuntimeApiMessages = (context: SpecContext, message: RuntimeMessage) => {\n const rootUuid = this.#resolveRootUuid(context);\n if (rootUuid) {\n this.allureRuntime.applyRuntimeMessages(rootUuid, [message]);\n } else {\n this.allureRuntime.applyGlobalRuntimeMessages([message]);\n }\n };\n\n /**\n * We must defer emitting a test's scope until we receive all the test's `afterEach` hooks.\n * At the same time, we should report it as early as we can. That means we should call this\n * method in the following cases:\n * - when an `after` hook of the test starts (`after` hooks are called later than `afterEach`)\n * - when a `before` or `beforeEach` hook of the next test starts (in case the next test has `before`/`beforeEach` hooks)\n * - when the next test starts (in case the next test doesn't have `before`/`beforeEach` hooks)\n * - when the test's suite ends (in case the test is the last one in its suite, including the root suite of the spec)\n * - when a nested suite starts\n * - when the spec ends\n */\n #emitPreviousTestScope = (context: SpecContext) => {\n const testScope = context.testScope;\n\n // Checking the test allows us to tell `beforeEach` and `afterEach` apart.\n // Here we're interested in `afterEach` only.\n if (!context.test && testScope) {\n this.allureRuntime.writeScope(testScope);\n context.testScope = undefined;\n }\n };\n\n #resolveRootUuid = (context: SpecContext) => context.fixture ?? context.test;\n\n #attachSpecVideo = (context: SpecContext, cypressVideoPath?: string) => {\n const shouldVideoBeAttached = (!this.videoOnFailOnly || context.failed) && cypressVideoPath;\n if (shouldVideoBeAttached) {\n const fixtureUuid = this.allureRuntime.startFixture(context.videoScope, \"after\", {\n name: \"Cypress video\",\n status: Status.PASSED,\n stage: Stage.FINISHED,\n })!;\n this.allureRuntime.writeAttachment(fixtureUuid, undefined, \"Cypress video\", cypressVideoPath, {\n contentType: ContentType.MP4,\n });\n this.allureRuntime.stopFixture(fixtureUuid);\n this.allureRuntime.writeScope(context.videoScope);\n }\n };\n\n #emitRemainingScopes = (context: SpecContext) => {\n this.#emitPreviousTestScope(context);\n context.suiteScopes.forEach((scope) => {\n this.allureRuntime.writeScope(scope);\n });\n };\n\n #initializeSpecContext = (absolutePath: string) => {\n const specPath = getRelativePath(absolutePath);\n const context: SpecContext = {\n specPath,\n test: undefined,\n fixture: undefined,\n stepsByFrontEndId: new Map(),\n videoScope: this.allureRuntime.startScope(),\n suiteIdToScope: new Map(),\n suiteScopeToId: new Map(),\n suiteScopes: [],\n testScope: undefined,\n suiteNames: [],\n failed: false,\n };\n this.specContextByAbsolutePath.set(absolutePath, context);\n };\n}\n\nconst createRuntimeState = (allureConfig?: AllureCypressConfig): AllureSpecState => ({\n config: getRuntimeConfigDefaults(allureConfig),\n initialized: false,\n messages: [],\n testPlan: parseTestPlan(),\n projectDir: getProjectRoot(),\n projectName: getProjectName(),\n stepStack: [],\n stepsToFinalize: [],\n nextApiStepId: 0,\n});\n\nconst getRuntimeConfigDefaults = ({\n stepsFromCommands: {\n enabled = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.enabled,\n maxArgumentLength = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength,\n maxArgumentDepth = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth,\n } = DEFAULT_RUNTIME_CONFIG.stepsFromCommands,\n}: AllureCypressConfig = DEFAULT_RUNTIME_CONFIG): AllureSpecState[\"config\"] => ({\n stepsFromCommands: {\n enabled,\n maxArgumentDepth,\n maxArgumentLength,\n },\n});\n\nconst initializeRuntimeState = (cypressConfig: Cypress.PluginConfigOptions, allureConfig?: AllureCypressConfig) => {\n const allureState = createRuntimeState(allureConfig);\n if (cypressConfig.expose) {\n // Cypress 15.10+ uses `expose` instead of `env` to share data between the Node and browser contexts.\n cypressConfig.expose.allure = allureState;\n }\n if (cypressConfig.env) {\n // For legacy Cypress versions.\n cypressConfig.env.allure = allureState;\n }\n return cypressConfig;\n};\n\n/**\n * Sets up Allure Cypress.\n * @param on The function used to subscribe to Cypress Node events (it's the first argument of `setupNodeEvents`).\n * @param cypressConfig The Cypress configuration (the second argument of `setupNodeEvents`). If provided, the selective run feature will be enabled.\n * @param allureConfig An Allure configuration object (optional).\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * e2e: {\n * setupNodeEvents: (on, config) => {\n * allureCypress(on, config, { videoOnFailOnly: true });\n * return config;\n * },\n * // ...\n * }\n * });\n * ```\n */\nexport const allureCypress = (\n on: Cypress.PluginEvents,\n cypressConfig?: Cypress.PluginConfigOptions,\n allureConfig?: AllureCypressConfig,\n) => {\n // Backward compatibility; mainly for JS users who have no type hints\n if (!allureConfig && cypressConfig && !(\"env\" in cypressConfig)) {\n allureConfig = cypressConfig as AllureCypressConfig;\n }\n\n const hasCypressConfig = cypressConfig && \"env\" in cypressConfig;\n\n const allureCypressReporter = new AllureCypress(allureConfig);\n allureCypressReporter.attachToCypress(on);\n\n if (hasCypressConfig) {\n initializeRuntimeState(cypressConfig, allureConfig);\n }\n\n return allureCypressReporter;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAGA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAsCA,IAAAG,MAAA,GAAAH,OAAA;AAA0D,IAAAI,SAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ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AAM,EAAE;IACxB;IACAF,aAAa,CAACE,MAAM,CAACC,MAAM,GAAGF,WAAW;EAC3C;EACA,IAAID,aAAa,CAACI,GAAG,EAAE;IACrB;IACAJ,aAAa,CAACI,GAAG,CAACD,MAAM,GAAGF,WAAW;EACxC;EACA,OAAOD,aAAa;AACtB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMK,aAAa,GAAGA,CAC3BhL,EAAwB,EACxB2K,aAA2C,EAC3ChB,YAAkC,KAC/B;EACH;EACA,IAAI,CAACA,YAAY,IAAIgB,aAAa,IAAI,EAAE,KAAK,IAAIA,aAAa,CAAC,EAAE;IAC/DhB,YAAY,GAAGgB,aAAoC;EACrD;EAEA,IAAMM,gBAAgB,GAAGN,aAAa,IAAI,KAAK,IAAIA,aAAa;EAEhE,IAAMO,qBAAqB,GAAG,IAAIvL,aAAa,CAACgK,YAAY,CAAC;EAC7DuB,qBAAqB,CAACC,eAAe,CAACnL,EAAE,CAAC;EAEzC,IAAIiL,gBAAgB,EAAE;IACpBP,sBAAsB,CAACC,aAAa,EAAEhB,YAAY,CAAC;EACrD;EAEA,OAAOuB,qBAAqB;AAC9B,CAAC;AAACzB,OAAA,CAAAuB,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"reporter.js","names":["_allureJsCommons","require","_sdk","_reporter","_utils","_excluded","_excluded2","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","_excluded8","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","n","indexOf","propertyIsEnumerable","call","hasOwnProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","_classPrivateFieldGet","s","get","_assertClassBrand","_fixtureNames","WeakMap","_screenshotReferencesByPath","_endAllSpecs","_applyAllureCypressMessages","_startRun","_startSuite","_pushNewSuiteScope","_stopSuite","_writeLastSuiteScope","_startHook","_stopHook","_startTest","_addNewTestResult","_failHookAndTest","_passTest","_skipTest","_addSkippedTest","_stopTest","_stopExistingTestResult","_fixFixtureStepStops","_fixStepStops","_startStep","_stopStep","_finalizeStep","_applyRuntimeApiMessages","_emitPreviousTestScope","_resolveRootUuid","_attachSpecVideo","_emitRemainingScopes","_initializeSpecContext","AllureCypress","constructor","config","undefined","Map","on","reportAllureCypressSpecMessages","args","reportFinalAllureCypressSpecMessages","isInteractive","endSpec","absolutePath","onAfterScreenshot","onAfterSpec","onAfterRun","_ref","_classPrivateFieldGet2","path","reference","allureRuntime","emitAttachment","contentType","ContentType","PNG","references","spec","results","_results$video","absolute","video","endRun","writeEnvironmentInfo","writeCategoriesDefinitions","specAbsolutePath","cypressVideoPath","specContext","specContextByAbsolutePath","delete","clear","_ref2","messages","message","type","context","data","_ref3","id","name","root","suiteNames","suiteId","scope","startScope","suiteScopes","suiteIdToScope","suiteScopeToId","_ref4","pop","writeScope","_ref5","scopeType","position","start","isEach","isAfterEach","testScope","last","fixture","startFixture","status","_ref6","duration","fixtureUuid","updateFixture","_fixture$status","Status","PASSED","stopFixture","_ref7","fullNameSuffix","testResultData","test","videoScope","_ref8","scopes","labels","metadataLabels","otherTestData","projectName","getProjectName","posixPath","getPosixPath","specPath","fullNameBase","concat","legacyFullName","titlePath","split","startTest","stage","Stage","RUNNING","getLanguageLabel","getFrameworkLabel","getEnvironmentLabels","getHostLabel","getThreadLabel","getPackageLabel","getFallbackTestCaseIdLabel","md5","fullName","_ref9","statusDetails","setError","result","assign","_classPrivateFieldGet3","applyGlobalRuntimeMessages","toGlobalErrorMessage","details","testUuid","updateTest","failed","testResult","_ref0","SKIPPED","_ref1","suites","retries","map","Boolean","writeTest","_ref10","_ref11","parameters","toString","excluded","FINISHED","stopTest","getDefaultSuiteLabels","_ref12","stop","steps","step","at","_ref13","properties","rootUuid","stepUuid","startStep","stepsByFrontEndId","_ref14","updateStep","stopStep","_ref15","_message$data","options","shift","writeAttachment","applyRuntimeMessages","_context$fixture","shouldVideoBeAttached","videoOnFailOnly","MP4","getRelativePath","resultsDir","rest","ReporterRuntime","writer","createDefaultWriter","exports","createRuntimeState","allureConfig","getRuntimeConfigDefaults","initialized","testPlan","parseTestPlan","projectDir","getProjectRoot","stepStack","stepsToFinalize","nextApiStepId","stepsFromCommands","enabled","DEFAULT_RUNTIME_CONFIG","maxArgumentLength","maxArgumentDepth","initializeRuntimeState","cypressConfig","allureState","expose","allure","env","allureCypress","hasCypressConfig","allureCypressReporter","attachToCypress"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { ContentType, Stage, Status } from \"allure-js-commons\";\nimport type { FixtureResult, TestResult } from \"allure-js-commons\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport { toGlobalErrorMessage } from \"allure-js-commons/sdk\";\nimport {\n type AttachmentReference,\n ReporterRuntime,\n createDefaultWriter,\n getDefaultSuiteLabels,\n getEnvironmentLabels,\n getFallbackTestCaseIdLabel,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getPackageLabel,\n getPosixPath,\n getProjectName,\n getProjectRoot,\n getRelativePath,\n getThreadLabel,\n md5,\n parseTestPlan,\n} from \"allure-js-commons/sdk/reporter\";\nimport type Cypress from \"cypress\";\n\nimport type {\n AllureCypressConfig,\n AllureCypressTaskArgs,\n AllureSpecState,\n CypressFailMessage,\n CypressHookEndMessage,\n CypressHookStartMessage,\n CypressSkippedTestMessage,\n CypressStepFinalizeMessage,\n CypressStepStartMessage,\n CypressStepStopMessage,\n CypressSuiteEndMessage,\n CypressSuiteStartMessage,\n CypressTestEndMessage,\n CypressTestSkipMessage,\n CypressTestStartMessage,\n SpecContext,\n} from \"./types.js\";\nimport { DEFAULT_RUNTIME_CONFIG, last } from \"./utils.js\";\n\nexport class AllureCypress {\n allureRuntime: ReporterRuntime;\n specContextByAbsolutePath = new Map<string, SpecContext>();\n #fixtureNames = new Map<string, string>();\n #screenshotReferencesByPath = new Map<string, AttachmentReference[]>();\n videoOnFailOnly: boolean = false;\n\n constructor(config: AllureCypressConfig = {}) {\n const { resultsDir, videoOnFailOnly = false, ...rest } = config;\n\n this.videoOnFailOnly = videoOnFailOnly;\n this.allureRuntime = new ReporterRuntime({\n writer: createDefaultWriter({ resultsDir }),\n ...rest,\n });\n }\n\n attachToCypress = (on: Cypress.PluginEvents) => {\n on(\"task\", {\n reportAllureCypressSpecMessages: (args: AllureCypressTaskArgs) => {\n this.#applyAllureCypressMessages(args);\n return null;\n },\n reportFinalAllureCypressSpecMessages: (args: AllureCypressTaskArgs) => {\n this.#applyAllureCypressMessages(args);\n if (args.isInteractive) {\n // In non-interactive mode the spec is ended via the 'after:spec' event instead\n // to get the spec's video.\n this.endSpec(args.absolutePath);\n }\n return null;\n },\n });\n\n on(\"after:screenshot\", this.onAfterScreenshot);\n\n // Emits the remaining fixtures and writes the video of the spec.\n // In interactive mode it's invoked through the `reportFinalAllureCypressSpecMessages` task.\n on(\"after:spec\", this.onAfterSpec);\n\n // Emits the categories and env info. Doesn't work in interactive mode unless\n // `experimentalInteractiveRunEvents` is set.\n on(\"after:run\", this.onAfterRun);\n };\n\n /**\n * Forward `after:screenshot` here if you define your own handler. Pass the\n * final screenshot path after any changes made by your handler.\n */\n onAfterScreenshot = ({ path }: Cypress.ScreenshotDetails) => {\n // Snapshot plugins can move or delete the file before the browser flushes\n // its attachment message. Preserve each capture, including overwritten paths.\n const reference = this.allureRuntime.emitAttachment(path, { contentType: ContentType.PNG });\n const references = this.#screenshotReferencesByPath.get(path) ?? [];\n references.push(reference);\n this.#screenshotReferencesByPath.set(path, references);\n };\n\n /**\n * Forward the `after:spec` event into Allure Cypress using this function if\n * you need to define your own handler or combine Allure Cypress with other\n * plugins. More info [here](https://github.com/allure-framework/allure-js/blob/main/packages/allure-cypress/README.md#setupnodeevents-limitations).\n * @param spec The first argument of the `after:spec` event.\n * @param results The second argument of the `after:spec` event. It's `undefined` in interactive mode.\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * setupNodeEvents: (on, config) => {\n * const allureReporter = allureCypress(on, config);\n * on(\"after:spec\", (spec, results) => {\n * allureReporter.onAfterSpec(spec, results);\n * });\n * return config;\n * }\n * // ...\n * });\n * ```\n */\n onAfterSpec = (spec: Cypress.Spec, results: CypressCommandLine.RunResult | undefined) => {\n this.endSpec(spec.absolute, results?.video ?? undefined);\n };\n\n /**\n * Forward the `after:run` event into Allure Cypress using this function if\n * you need to define your own handler or combine Allure Cypress with other\n * plugins. More info [here](https://github.com/allure-framework/allure-js/blob/main/packages/allure-cypress/README.md#setupnodeevents-limitations).\n * @param results The argument of the `after:run` event. It's `undefined` in interactive mode.\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * setupNodeEvents: (on, config) => {\n * const allureReporter = allureCypress(on, config);\n * on(\"after:run\", (results) => {\n * allureReporter.onAfterRun(results);\n * });\n * return config;\n * }\n * // ...\n * });\n * ```\n */\n onAfterRun = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n results: CypressCommandLine.CypressFailedRunResult | CypressCommandLine.CypressRunResult | undefined,\n ) => {\n this.endRun();\n };\n\n endRun = () => {\n this.#endAllSpecs();\n this.allureRuntime.writeEnvironmentInfo();\n this.allureRuntime.writeCategoriesDefinitions();\n };\n\n endSpec = (specAbsolutePath: string, cypressVideoPath?: string) => {\n const specContext = this.specContextByAbsolutePath.get(specAbsolutePath);\n if (specContext) {\n this.#attachSpecVideo(specContext, cypressVideoPath);\n this.#emitRemainingScopes(specContext);\n this.specContextByAbsolutePath.delete(specAbsolutePath);\n }\n this.#screenshotReferencesByPath.clear();\n };\n\n #endAllSpecs = () => {\n for (const specAbsolutePath of this.specContextByAbsolutePath.keys()) {\n this.endSpec(specAbsolutePath);\n }\n };\n\n #applyAllureCypressMessages = ({ messages, absolutePath }: AllureCypressTaskArgs) => {\n messages.forEach((message) => {\n if (message.type === \"cypress_run_start\") {\n this.#startRun(absolutePath);\n return;\n }\n\n const context = this.specContextByAbsolutePath.get(absolutePath);\n if (!context) {\n return;\n }\n\n switch (message.type) {\n case \"cypress_suite_start\":\n this.#startSuite(context, message);\n break;\n case \"cypress_suite_end\":\n this.#stopSuite(context, message);\n break;\n case \"cypress_hook_start\":\n this.#startHook(context, message);\n break;\n case \"cypress_hook_end\":\n this.#stopHook(context, message);\n break;\n case \"cypress_test_start\":\n this.#startTest(context, message);\n break;\n case \"cypress_test_pass\":\n this.#passTest(context);\n break;\n case \"cypress_fail\":\n this.#failHookAndTest(context, message);\n break;\n case \"cypress_test_skip\":\n this.#skipTest(context, message);\n break;\n case \"cypress_skipped_test\":\n this.#addSkippedTest(context, message);\n break;\n case \"cypress_test_end\":\n this.#stopTest(context, message);\n break;\n case \"cypress_step_start\":\n this.#startStep(context, message.data);\n break;\n case \"cypress_step_stop\":\n this.#stopStep(context, message.data);\n break;\n case \"cypress_step_finalize\":\n this.#finalizeStep(context, message.data);\n break;\n default:\n this.#applyRuntimeApiMessages(context, message);\n break;\n }\n });\n };\n\n #startRun = (absolutePath: string) => {\n if (!this.specContextByAbsolutePath.has(absolutePath)) {\n this.#initializeSpecContext(absolutePath);\n }\n };\n\n #startSuite = (context: SpecContext, { data: { id, name, root } }: CypressSuiteStartMessage) => {\n this.#pushNewSuiteScope(context, id);\n if (!root) {\n this.#emitPreviousTestScope(context);\n context.suiteNames.push(name);\n }\n };\n\n #pushNewSuiteScope = (context: SpecContext, suiteId: string) => {\n const scope = this.allureRuntime.startScope();\n context.suiteScopes.push(scope);\n context.suiteIdToScope.set(suiteId, scope);\n context.suiteScopeToId.set(scope, suiteId);\n return scope;\n };\n\n #stopSuite = (context: SpecContext, { data: { root } }: CypressSuiteEndMessage) => {\n this.#emitPreviousTestScope(context);\n if (!root) {\n context.suiteNames.pop();\n }\n this.#writeLastSuiteScope(context);\n };\n\n #writeLastSuiteScope = (context: SpecContext) => {\n const scope = context.suiteScopes.pop();\n if (scope) {\n const suiteId = context.suiteScopeToId.get(scope);\n if (suiteId) {\n context.suiteScopeToId.delete(scope);\n context.suiteIdToScope.delete(suiteId);\n }\n this.allureRuntime.writeScope(scope);\n }\n };\n\n #startHook = (context: SpecContext, { data: { name, scopeType, position, start } }: CypressHookStartMessage) => {\n const isEach = scopeType === \"each\";\n const isAfterEach = position === \"after\" && isEach;\n if (!isAfterEach) {\n this.#emitPreviousTestScope(context);\n }\n\n const scope = isEach ? context.testScope : last(context.suiteScopes);\n if (scope) {\n context.fixture = this.allureRuntime.startFixture(scope, position, {\n name,\n start,\n status: undefined,\n });\n if (context.fixture) {\n this.#fixtureNames.set(context.fixture, name);\n }\n }\n };\n\n #stopHook = (context: SpecContext, { data: { duration } }: CypressHookEndMessage) => {\n const fixtureUuid = context.fixture;\n if (fixtureUuid) {\n this.allureRuntime.updateFixture(fixtureUuid, (fixture) => {\n fixture.status ??= Status.PASSED;\n });\n this.allureRuntime.stopFixture(fixtureUuid, { duration });\n this.#fixFixtureStepStops(fixtureUuid);\n this.#fixtureNames.delete(fixtureUuid);\n context.fixture = undefined;\n }\n };\n\n #startTest = (context: SpecContext, { data: { fullNameSuffix, ...testResultData } }: CypressTestStartMessage) => {\n this.#emitPreviousTestScope(context);\n const testScope = this.allureRuntime.startScope();\n context.testScope = testScope;\n context.test = this.#addNewTestResult(context, fullNameSuffix, testResultData, [\n context.videoScope,\n ...context.suiteScopes,\n testScope,\n ]);\n };\n\n #addNewTestResult = (\n context: SpecContext,\n fullNameSuffix: string,\n { labels: metadataLabels = [], ...otherTestData }: Partial<TestResult>,\n scopes: string[],\n ) => {\n const projectName = getProjectName();\n const posixPath = getPosixPath(context.specPath);\n const fullNameBase = projectName ? `${projectName}:${posixPath}` : posixPath;\n const legacyFullName = `${posixPath}#${fullNameSuffix}`;\n\n const titlePath = posixPath.split(\"/\").concat(context.suiteNames);\n\n return this.allureRuntime.startTest(\n {\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"cypress\"),\n ...metadataLabels,\n ...getEnvironmentLabels(),\n getHostLabel(),\n getThreadLabel(),\n getPackageLabel(context.specPath),\n getFallbackTestCaseIdLabel(md5(legacyFullName)),\n ],\n fullName: `${fullNameBase}#${fullNameSuffix}`,\n titlePath: projectName ? [projectName, ...titlePath] : titlePath,\n ...otherTestData,\n },\n scopes,\n );\n };\n\n #failHookAndTest = (context: SpecContext, { data: { status, statusDetails } }: CypressFailMessage) => {\n const setError = (result: object) => Object.assign(result, { status, statusDetails });\n\n const fixtureUuid = context.fixture;\n if (fixtureUuid) {\n this.allureRuntime.updateFixture(fixtureUuid, setError);\n this.allureRuntime.applyGlobalRuntimeMessages([\n toGlobalErrorMessage({\n name: this.#fixtureNames.get(fixtureUuid) ?? \"hook\",\n details: statusDetails,\n status,\n }),\n ]);\n }\n\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, setError);\n }\n\n context.failed = true;\n };\n\n #passTest = (context: SpecContext) => {\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.status = Status.PASSED;\n });\n }\n };\n\n #skipTest = (context: SpecContext, { data: { statusDetails } }: CypressTestSkipMessage) => {\n const testUuid = context.test;\n if (testUuid) {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.status = Status.SKIPPED;\n if (statusDetails) {\n testResult.statusDetails = statusDetails;\n }\n });\n }\n };\n\n #addSkippedTest = (\n context: SpecContext,\n { data: { fullNameSuffix, suites, duration, retries, ...testResultData } }: CypressSkippedTestMessage,\n ) => {\n // Tests skipped because of a hook error may share all suites of the current context\n // or just a part thereof (if it's from a sibling suite).\n const scopes = suites.map((s) => context.suiteIdToScope.get(s)).filter((s): s is string => Boolean(s));\n\n const testUuid = this.#addNewTestResult(context, fullNameSuffix, testResultData, [context.videoScope, ...scopes]);\n this.#stopExistingTestResult(testUuid, { duration, retries }, context.suiteNames);\n this.allureRuntime.writeTest(testUuid);\n };\n\n #stopTest = (context: SpecContext, { data }: CypressTestEndMessage) => {\n const testUuid = context.test;\n if (testUuid) {\n this.#stopExistingTestResult(testUuid, data, context.suiteNames);\n this.allureRuntime.writeTest(testUuid);\n context.test = undefined;\n }\n };\n\n #stopExistingTestResult = (\n testUuid: string,\n { retries, duration }: CypressTestEndMessage[\"data\"],\n suiteNames: string[],\n ) => {\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n if (retries > 0) {\n testResult.parameters.push({\n name: \"Retry\",\n value: retries.toString(),\n excluded: true,\n });\n }\n testResult.stage = Stage.FINISHED;\n });\n this.allureRuntime.stopTest(testUuid, { duration });\n // Hook metadata is merged by stopTest, so apply defaults only after it.\n this.allureRuntime.updateTest(testUuid, (testResult) => {\n testResult.labels.push(...getDefaultSuiteLabels(testResult, suiteNames));\n this.#fixStepStops(testResult);\n });\n };\n\n #fixFixtureStepStops = (fixtureUuid: string) => {\n this.allureRuntime.updateFixture(fixtureUuid, this.#fixStepStops);\n };\n\n #fixStepStops = ({ stop, steps = [] }: TestResult | FixtureResult) => {\n if (stop) {\n // In some circumstances, steps becomes dangling and are stopped at the test end/hook end events, which happen\n // chronologically after the test or fixture ends. This leads to the steps' stop time being greater than the one\n // of the test/fixture.\n // The only steps that may be affected are the rightmost descendants of the test/fixture.\n for (let step = steps.at(-1); step; step = step.steps.at(-1)) {\n if (step.stop && step.stop > stop) {\n step.stop = stop;\n } else {\n // Steps are always stopped child-to-parent. If a step's stop time is OK, its substeps are also correct.\n return;\n }\n }\n }\n };\n\n #startStep = (context: SpecContext, { id, ...properties }: CypressStepStartMessage[\"data\"]) => {\n const rootUuid = this.#resolveRootUuid(context);\n if (rootUuid) {\n const stepUuid = this.allureRuntime.startStep(rootUuid, undefined, properties);\n if (stepUuid) {\n context.stepsByFrontEndId.set(id, stepUuid);\n }\n }\n };\n\n #stopStep = (context: SpecContext, { id, stop, ...properties }: CypressStepStopMessage[\"data\"]) => {\n const stepUuid = context.stepsByFrontEndId.get(id);\n if (stepUuid) {\n this.allureRuntime.updateStep(stepUuid, (r) => {\n Object.assign(r, properties);\n });\n this.allureRuntime.stopStep(stepUuid, { stop });\n }\n };\n\n #finalizeStep = (context: SpecContext, { id, ...properties }: CypressStepFinalizeMessage[\"data\"]) => {\n const stepUuid = context.stepsByFrontEndId.get(id);\n if (stepUuid) {\n this.allureRuntime.updateStep(stepUuid, (r) => {\n Object.assign(r, properties);\n });\n context.stepsByFrontEndId.delete(id);\n }\n };\n\n #applyRuntimeApiMessages = (context: SpecContext, message: RuntimeMessage) => {\n const rootUuid = this.#resolveRootUuid(context);\n if (message.type === \"attachment_path\") {\n const { path, name, ...options } = message.data;\n const references = this.#screenshotReferencesByPath.get(path);\n const reference = references?.shift();\n if (reference) {\n if (!references?.length) {\n this.#screenshotReferencesByPath.delete(path);\n }\n if (rootUuid) {\n this.allureRuntime.writeAttachment(rootUuid, undefined, name, reference, options);\n }\n return;\n }\n }\n\n if (rootUuid) {\n this.allureRuntime.applyRuntimeMessages(rootUuid, [message]);\n } else {\n this.allureRuntime.applyGlobalRuntimeMessages([message]);\n }\n };\n\n /**\n * We must defer emitting a test's scope until we receive all the test's `afterEach` hooks.\n * At the same time, we should report it as early as we can. That means we should call this\n * method in the following cases:\n * - when an `after` hook of the test starts (`after` hooks are called later than `afterEach`)\n * - when a `before` or `beforeEach` hook of the next test starts (in case the next test has `before`/`beforeEach` hooks)\n * - when the next test starts (in case the next test doesn't have `before`/`beforeEach` hooks)\n * - when the test's suite ends (in case the test is the last one in its suite, including the root suite of the spec)\n * - when a nested suite starts\n * - when the spec ends\n */\n #emitPreviousTestScope = (context: SpecContext) => {\n const testScope = context.testScope;\n\n // Checking the test allows us to tell `beforeEach` and `afterEach` apart.\n // Here we're interested in `afterEach` only.\n if (!context.test && testScope) {\n this.allureRuntime.writeScope(testScope);\n context.testScope = undefined;\n }\n };\n\n #resolveRootUuid = (context: SpecContext) => context.fixture ?? context.test;\n\n #attachSpecVideo = (context: SpecContext, cypressVideoPath?: string) => {\n const shouldVideoBeAttached = (!this.videoOnFailOnly || context.failed) && cypressVideoPath;\n if (shouldVideoBeAttached) {\n const fixtureUuid = this.allureRuntime.startFixture(context.videoScope, \"after\", {\n name: \"Cypress video\",\n status: Status.PASSED,\n stage: Stage.FINISHED,\n })!;\n this.allureRuntime.writeAttachment(fixtureUuid, undefined, \"Cypress video\", cypressVideoPath, {\n contentType: ContentType.MP4,\n });\n this.allureRuntime.stopFixture(fixtureUuid);\n this.allureRuntime.writeScope(context.videoScope);\n }\n };\n\n #emitRemainingScopes = (context: SpecContext) => {\n this.#emitPreviousTestScope(context);\n context.suiteScopes.forEach((scope) => {\n this.allureRuntime.writeScope(scope);\n });\n };\n\n #initializeSpecContext = (absolutePath: string) => {\n const specPath = getRelativePath(absolutePath);\n const context: SpecContext = {\n specPath,\n test: undefined,\n fixture: undefined,\n stepsByFrontEndId: new Map(),\n videoScope: this.allureRuntime.startScope(),\n suiteIdToScope: new Map(),\n suiteScopeToId: new Map(),\n suiteScopes: [],\n testScope: undefined,\n suiteNames: [],\n failed: false,\n };\n this.specContextByAbsolutePath.set(absolutePath, context);\n };\n}\n\nconst createRuntimeState = (allureConfig?: AllureCypressConfig): AllureSpecState => ({\n config: getRuntimeConfigDefaults(allureConfig),\n initialized: false,\n messages: [],\n testPlan: parseTestPlan(),\n projectDir: getProjectRoot(),\n projectName: getProjectName(),\n stepStack: [],\n stepsToFinalize: [],\n nextApiStepId: 0,\n});\n\nconst getRuntimeConfigDefaults = ({\n stepsFromCommands: {\n enabled = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.enabled,\n maxArgumentLength = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength,\n maxArgumentDepth = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth,\n } = DEFAULT_RUNTIME_CONFIG.stepsFromCommands,\n}: AllureCypressConfig = DEFAULT_RUNTIME_CONFIG): AllureSpecState[\"config\"] => ({\n stepsFromCommands: {\n enabled,\n maxArgumentDepth,\n maxArgumentLength,\n },\n});\n\nconst initializeRuntimeState = (cypressConfig: Cypress.PluginConfigOptions, allureConfig?: AllureCypressConfig) => {\n const allureState = createRuntimeState(allureConfig);\n if (cypressConfig.expose) {\n // Cypress 15.10+ uses `expose` instead of `env` to share data between the Node and browser contexts.\n cypressConfig.expose.allure = allureState;\n }\n if (cypressConfig.env) {\n // For legacy Cypress versions.\n cypressConfig.env.allure = allureState;\n }\n return cypressConfig;\n};\n\n/**\n * Sets up Allure Cypress.\n * @param on The function used to subscribe to Cypress Node events (it's the first argument of `setupNodeEvents`).\n * @param cypressConfig The Cypress configuration (the second argument of `setupNodeEvents`). If provided, the selective run feature will be enabled.\n * @param allureConfig An Allure configuration object (optional).\n * @example\n * ```javascript\n * import { defineConfig } from \"cypress\";\n * import { allureCypress } from \"allure-cypress/reporter\";\n *\n * export default defineConfig({\n * e2e: {\n * setupNodeEvents: (on, config) => {\n * allureCypress(on, config, { videoOnFailOnly: true });\n * return config;\n * },\n * // ...\n * }\n * });\n * ```\n */\nexport const allureCypress = (\n on: Cypress.PluginEvents,\n cypressConfig?: Cypress.PluginConfigOptions,\n allureConfig?: AllureCypressConfig,\n) => {\n // Backward compatibility; mainly for JS users who have no type hints\n if (!allureConfig && cypressConfig && !(\"env\" in cypressConfig)) {\n allureConfig = cypressConfig as AllureCypressConfig;\n }\n\n const hasCypressConfig = cypressConfig && \"env\" in cypressConfig;\n\n const allureCypressReporter = new AllureCypress(allureConfig);\n allureCypressReporter.attachToCypress(on);\n\n if (hasCypressConfig) {\n initializeRuntimeState(cypressConfig, allureConfig);\n }\n\n return allureCypressReporter;\n};\n"],"mappings":";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