allure-cypress 3.14.0 → 3.16.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 (49) hide show
  1. package/README.md +18 -4
  2. package/dist/cjs/browser/commandLog.js +44 -57
  3. package/dist/cjs/browser/commandLog.js.map +1 -1
  4. package/dist/cjs/browser/events/cypress.js +20 -9
  5. package/dist/cjs/browser/events/cypress.js.map +1 -1
  6. package/dist/cjs/browser/lifecycle.js +4 -1
  7. package/dist/cjs/browser/lifecycle.js.map +1 -1
  8. package/dist/cjs/browser/patching.js +16 -9
  9. package/dist/cjs/browser/patching.js.map +1 -1
  10. package/dist/cjs/browser/runtime.js +86 -10
  11. package/dist/cjs/browser/runtime.js.map +1 -1
  12. package/dist/cjs/browser/serialize.js +19 -23
  13. package/dist/cjs/browser/serialize.js.map +1 -1
  14. package/dist/cjs/browser/steps.js +15 -7
  15. package/dist/cjs/browser/steps.js.map +1 -1
  16. package/dist/cjs/browser/testplan.js +13 -11
  17. package/dist/cjs/browser/testplan.js.map +1 -1
  18. package/dist/cjs/browser/utils.js +9 -9
  19. package/dist/cjs/browser/utils.js.map +1 -1
  20. package/dist/cjs/index.js +2 -1
  21. package/dist/cjs/index.js.map +4 -4
  22. package/dist/cjs/reporter.js +123 -123
  23. package/dist/cjs/reporter.js.map +1 -1
  24. package/dist/esm/browser/commandLog.js +44 -57
  25. package/dist/esm/browser/commandLog.js.map +1 -1
  26. package/dist/esm/browser/events/cypress.js +20 -9
  27. package/dist/esm/browser/events/cypress.js.map +1 -1
  28. package/dist/esm/browser/lifecycle.js +3 -1
  29. package/dist/esm/browser/lifecycle.js.map +1 -1
  30. package/dist/esm/browser/patching.js +16 -9
  31. package/dist/esm/browser/patching.js.map +1 -1
  32. package/dist/esm/browser/runtime.js +85 -10
  33. package/dist/esm/browser/runtime.js.map +1 -1
  34. package/dist/esm/browser/serialize.js +19 -23
  35. package/dist/esm/browser/serialize.js.map +1 -1
  36. package/dist/esm/browser/steps.js +14 -7
  37. package/dist/esm/browser/steps.js.map +1 -1
  38. package/dist/esm/browser/testplan.js +13 -11
  39. package/dist/esm/browser/testplan.js.map +1 -1
  40. package/dist/esm/browser/utils.js +8 -9
  41. package/dist/esm/browser/utils.js.map +1 -1
  42. package/dist/esm/index.js +2 -1
  43. package/dist/esm/index.js.map +4 -4
  44. package/dist/esm/reporter.js +124 -124
  45. package/dist/esm/reporter.js.map +1 -1
  46. package/dist/types/browser/lifecycle.d.ts +1 -1
  47. package/dist/types/browser/runtime.d.ts +6 -2
  48. package/dist/types/reporter.d.ts +5 -0
  49. package/package.json +13 -12
@@ -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,22 @@ 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 path = _ref.path;
101
+ // Snapshot plugins can move or delete the file before the browser flushes
102
+ // its attachment message. Preserve each capture, including overwritten paths.
103
+ var reference = this.allureRuntime.emitAttachment(path, {
104
+ contentType: _allureJsCommons.ContentType.PNG
105
+ });
106
+ var references = (_classPrivateFieldGet2 = _classPrivateFieldGet(_screenshotReferencesByPath, this).get(path)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : [];
107
+ references.push(reference);
108
+ _classPrivateFieldGet(_screenshotReferencesByPath, this).set(path, references);
109
+ });
91
110
  /**
92
111
  * Forward the `after:spec` event into Allure Cypress using this function if
93
112
  * you need to define your own handler or combine Allure Cypress with other
@@ -152,17 +171,16 @@ class AllureCypress {
152
171
  _classPrivateFieldGet(_emitRemainingScopes, this).call(this, specContext);
153
172
  this.specContextByAbsolutePath.delete(specAbsolutePath);
154
173
  }
174
+ _classPrivateFieldGet(_screenshotReferencesByPath, this).clear();
155
175
  });
156
176
  _classPrivateFieldInitSpec(this, _endAllSpecs, () => {
157
177
  for (var specAbsolutePath of this.specContextByAbsolutePath.keys()) {
158
178
  this.endSpec(specAbsolutePath);
159
179
  }
160
180
  });
161
- _classPrivateFieldInitSpec(this, _applyAllureCypressMessages, _ref => {
162
- var {
163
- messages,
164
- absolutePath
165
- } = _ref;
181
+ _classPrivateFieldInitSpec(this, _applyAllureCypressMessages, _ref2 => {
182
+ var messages = _ref2.messages,
183
+ absolutePath = _ref2.absolutePath;
166
184
  messages.forEach(message => {
167
185
  if (message.type === "cypress_run_start") {
168
186
  _classPrivateFieldGet(_startRun, this).call(this, absolutePath);
@@ -223,14 +241,11 @@ class AllureCypress {
223
241
  _classPrivateFieldGet(_initializeSpecContext, this).call(this, absolutePath);
224
242
  }
225
243
  });
226
- _classPrivateFieldInitSpec(this, _startSuite, (context, _ref2) => {
227
- var {
228
- data: {
229
- id,
230
- name,
231
- root
232
- }
233
- } = _ref2;
244
+ _classPrivateFieldInitSpec(this, _startSuite, (context, _ref3) => {
245
+ var _ref3$data = _ref3.data,
246
+ id = _ref3$data.id,
247
+ name = _ref3$data.name,
248
+ root = _ref3$data.root;
234
249
  _classPrivateFieldGet(_pushNewSuiteScope, this).call(this, context, id);
235
250
  if (!root) {
236
251
  _classPrivateFieldGet(_emitPreviousTestScope, this).call(this, context);
@@ -244,12 +259,8 @@ class AllureCypress {
244
259
  context.suiteScopeToId.set(scope, suiteId);
245
260
  return scope;
246
261
  });
247
- _classPrivateFieldInitSpec(this, _stopSuite, (context, _ref3) => {
248
- var {
249
- data: {
250
- root
251
- }
252
- } = _ref3;
262
+ _classPrivateFieldInitSpec(this, _stopSuite, (context, _ref4) => {
263
+ var root = _ref4.data.root;
253
264
  _classPrivateFieldGet(_emitPreviousTestScope, this).call(this, context);
254
265
  if (!root) {
255
266
  context.suiteNames.pop();
@@ -267,15 +278,12 @@ class AllureCypress {
267
278
  this.allureRuntime.writeScope(scope);
268
279
  }
269
280
  });
270
- _classPrivateFieldInitSpec(this, _startHook, (context, _ref4) => {
271
- var {
272
- data: {
273
- name,
274
- scopeType,
275
- position,
276
- start
277
- }
278
- } = _ref4;
281
+ _classPrivateFieldInitSpec(this, _startHook, (context, _ref5) => {
282
+ var _ref5$data = _ref5.data,
283
+ name = _ref5$data.name,
284
+ scopeType = _ref5$data.scopeType,
285
+ position = _ref5$data.position,
286
+ start = _ref5$data.start;
279
287
  var isEach = scopeType === "each";
280
288
  var isAfterEach = position === "after" && isEach;
281
289
  if (!isAfterEach) {
@@ -293,12 +301,8 @@ class AllureCypress {
293
301
  }
294
302
  }
295
303
  });
296
- _classPrivateFieldInitSpec(this, _stopHook, (context, _ref5) => {
297
- var {
298
- data: {
299
- duration
300
- }
301
- } = _ref5;
304
+ _classPrivateFieldInitSpec(this, _stopHook, (context, _ref6) => {
305
+ var duration = _ref6.data.duration;
302
306
  var fixtureUuid = context.fixture;
303
307
  if (fixtureUuid) {
304
308
  this.allureRuntime.updateFixture(fixtureUuid, fixture => {
@@ -313,23 +317,19 @@ class AllureCypress {
313
317
  context.fixture = undefined;
314
318
  }
315
319
  });
316
- _classPrivateFieldInitSpec(this, _startTest, (context, _ref6) => {
317
- var {
318
- data: {
319
- fullNameSuffix
320
- }
321
- } = _ref6,
322
- testResultData = _objectWithoutProperties(_ref6.data, _excluded);
320
+ _classPrivateFieldInitSpec(this, _startTest, (context, _ref7) => {
321
+ var _ref7$data = _ref7.data,
322
+ fullNameSuffix = _ref7$data.fullNameSuffix,
323
+ testResultData = _objectWithoutProperties(_ref7$data, _excluded);
323
324
  _classPrivateFieldGet(_emitPreviousTestScope, this).call(this, context);
324
325
  var testScope = this.allureRuntime.startScope();
325
326
  context.testScope = testScope;
326
327
  context.test = _classPrivateFieldGet(_addNewTestResult, this).call(this, context, fullNameSuffix, testResultData, [context.videoScope, ...context.suiteScopes, testScope]);
327
328
  });
328
- _classPrivateFieldInitSpec(this, _addNewTestResult, (context, fullNameSuffix, _ref7, scopes) => {
329
- var {
330
- labels: metadataLabels = []
331
- } = _ref7,
332
- otherTestData = _objectWithoutProperties(_ref7, _excluded2);
329
+ _classPrivateFieldInitSpec(this, _addNewTestResult, (context, fullNameSuffix, _ref8, scopes) => {
330
+ var _ref8$labels = _ref8.labels,
331
+ metadataLabels = _ref8$labels === void 0 ? [] : _ref8$labels,
332
+ otherTestData = _objectWithoutProperties(_ref8, _excluded2);
333
333
  var projectName = (0, _reporter.getProjectName)();
334
334
  var posixPath = (0, _reporter.getPosixPath)(context.specPath);
335
335
  var fullNameBase = projectName ? "".concat(projectName, ":").concat(posixPath) : posixPath;
@@ -337,28 +337,25 @@ class AllureCypress {
337
337
  var titlePath = posixPath.split("/").concat(context.suiteNames);
338
338
  return this.allureRuntime.startTest(_objectSpread({
339
339
  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))],
340
+ 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
341
  fullName: "".concat(fullNameBase, "#").concat(fullNameSuffix),
342
342
  titlePath: projectName ? [projectName, ...titlePath] : titlePath
343
343
  }, otherTestData), scopes);
344
344
  });
345
- _classPrivateFieldInitSpec(this, _failHookAndTest, (context, _ref8) => {
346
- var {
347
- data: {
348
- status,
349
- statusDetails
350
- }
351
- } = _ref8;
345
+ _classPrivateFieldInitSpec(this, _failHookAndTest, (context, _ref9) => {
346
+ var _ref9$data = _ref9.data,
347
+ status = _ref9$data.status,
348
+ statusDetails = _ref9$data.statusDetails;
352
349
  var setError = result => Object.assign(result, {
353
350
  status,
354
351
  statusDetails
355
352
  });
356
353
  var fixtureUuid = context.fixture;
357
354
  if (fixtureUuid) {
358
- var _classPrivateFieldGet2;
355
+ var _classPrivateFieldGet3;
359
356
  this.allureRuntime.updateFixture(fixtureUuid, setError);
360
357
  this.allureRuntime.applyGlobalRuntimeMessages([(0, _sdk.toGlobalErrorMessage)({
361
- name: (_classPrivateFieldGet2 = _classPrivateFieldGet(_fixtureNames, this).get(fixtureUuid)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : "hook",
358
+ name: (_classPrivateFieldGet3 = _classPrivateFieldGet(_fixtureNames, this).get(fixtureUuid)) !== null && _classPrivateFieldGet3 !== void 0 ? _classPrivateFieldGet3 : "hook",
362
359
  details: statusDetails,
363
360
  status
364
361
  })]);
@@ -377,12 +374,8 @@ class AllureCypress {
377
374
  });
378
375
  }
379
376
  });
380
- _classPrivateFieldInitSpec(this, _skipTest, (context, _ref9) => {
381
- var {
382
- data: {
383
- statusDetails
384
- }
385
- } = _ref9;
377
+ _classPrivateFieldInitSpec(this, _skipTest, (context, _ref0) => {
378
+ var statusDetails = _ref0.data.statusDetails;
386
379
  var testUuid = context.test;
387
380
  if (testUuid) {
388
381
  this.allureRuntime.updateTest(testUuid, testResult => {
@@ -393,16 +386,13 @@ class AllureCypress {
393
386
  });
394
387
  }
395
388
  });
396
- _classPrivateFieldInitSpec(this, _addSkippedTest, (context, _ref0) => {
397
- var {
398
- data: {
399
- fullNameSuffix,
400
- suites,
401
- duration,
402
- retries
403
- }
404
- } = _ref0,
405
- testResultData = _objectWithoutProperties(_ref0.data, _excluded3);
389
+ _classPrivateFieldInitSpec(this, _addSkippedTest, (context, _ref1) => {
390
+ var _ref1$data = _ref1.data,
391
+ fullNameSuffix = _ref1$data.fullNameSuffix,
392
+ suites = _ref1$data.suites,
393
+ duration = _ref1$data.duration,
394
+ retries = _ref1$data.retries,
395
+ testResultData = _objectWithoutProperties(_ref1$data, _excluded3);
406
396
  // Tests skipped because of a hook error may share all suites of the current context
407
397
  // or just a part thereof (if it's from a sibling suite).
408
398
  var scopes = suites.map(s => context.suiteIdToScope.get(s)).filter(s => Boolean(s));
@@ -410,25 +400,21 @@ class AllureCypress {
410
400
  _classPrivateFieldGet(_stopExistingTestResult, this).call(this, testUuid, {
411
401
  duration,
412
402
  retries
413
- });
403
+ }, context.suiteNames);
414
404
  this.allureRuntime.writeTest(testUuid);
415
405
  });
416
- _classPrivateFieldInitSpec(this, _stopTest, (context, _ref1) => {
417
- var {
418
- data
419
- } = _ref1;
406
+ _classPrivateFieldInitSpec(this, _stopTest, (context, _ref10) => {
407
+ var data = _ref10.data;
420
408
  var testUuid = context.test;
421
409
  if (testUuid) {
422
- _classPrivateFieldGet(_stopExistingTestResult, this).call(this, testUuid, data);
410
+ _classPrivateFieldGet(_stopExistingTestResult, this).call(this, testUuid, data, context.suiteNames);
423
411
  this.allureRuntime.writeTest(testUuid);
424
412
  context.test = undefined;
425
413
  }
426
414
  });
427
- _classPrivateFieldInitSpec(this, _stopExistingTestResult, (testUuid, _ref10) => {
428
- var {
429
- retries,
430
- duration
431
- } = _ref10;
415
+ _classPrivateFieldInitSpec(this, _stopExistingTestResult, (testUuid, _ref11, suiteNames) => {
416
+ var retries = _ref11.retries,
417
+ duration = _ref11.duration;
432
418
  this.allureRuntime.updateTest(testUuid, testResult => {
433
419
  if (retries > 0) {
434
420
  testResult.parameters.push({
@@ -442,19 +428,19 @@ class AllureCypress {
442
428
  this.allureRuntime.stopTest(testUuid, {
443
429
  duration
444
430
  });
445
- _classPrivateFieldGet(_fixTestStepStops, this).call(this, testUuid);
446
- });
447
- _classPrivateFieldInitSpec(this, _fixTestStepStops, testUuid => {
448
- this.allureRuntime.updateTest(testUuid, _classPrivateFieldGet(_fixStepStops, this));
431
+ // Hook metadata is merged by stopTest, so apply defaults only after it.
432
+ this.allureRuntime.updateTest(testUuid, testResult => {
433
+ testResult.labels.push(...(0, _reporter.getDefaultSuiteLabels)(testResult, suiteNames));
434
+ _classPrivateFieldGet(_fixStepStops, this).call(this, testResult);
435
+ });
449
436
  });
450
437
  _classPrivateFieldInitSpec(this, _fixFixtureStepStops, fixtureUuid => {
451
438
  this.allureRuntime.updateFixture(fixtureUuid, _classPrivateFieldGet(_fixStepStops, this));
452
439
  });
453
- _classPrivateFieldInitSpec(this, _fixStepStops, _ref11 => {
454
- var {
455
- stop,
456
- steps = []
457
- } = _ref11;
440
+ _classPrivateFieldInitSpec(this, _fixStepStops, _ref12 => {
441
+ var stop = _ref12.stop,
442
+ _ref12$steps = _ref12.steps,
443
+ steps = _ref12$steps === void 0 ? [] : _ref12$steps;
458
444
  if (stop) {
459
445
  // In some circumstances, steps becomes dangling and are stopped at the test end/hook end events, which happen
460
446
  // chronologically after the test or fixture ends. This leads to the steps' stop time being greater than the one
@@ -470,11 +456,9 @@ class AllureCypress {
470
456
  }
471
457
  }
472
458
  });
473
- _classPrivateFieldInitSpec(this, _startStep, (context, _ref12) => {
474
- var {
475
- id
476
- } = _ref12,
477
- properties = _objectWithoutProperties(_ref12, _excluded4);
459
+ _classPrivateFieldInitSpec(this, _startStep, (context, _ref13) => {
460
+ var id = _ref13.id,
461
+ properties = _objectWithoutProperties(_ref13, _excluded4);
478
462
  var rootUuid = _classPrivateFieldGet(_resolveRootUuid, this).call(this, context);
479
463
  if (rootUuid) {
480
464
  var stepUuid = this.allureRuntime.startStep(rootUuid, undefined, properties);
@@ -483,12 +467,10 @@ class AllureCypress {
483
467
  }
484
468
  }
485
469
  });
486
- _classPrivateFieldInitSpec(this, _stopStep, (context, _ref13) => {
487
- var {
488
- id,
489
- stop
490
- } = _ref13,
491
- properties = _objectWithoutProperties(_ref13, _excluded5);
470
+ _classPrivateFieldInitSpec(this, _stopStep, (context, _ref14) => {
471
+ var id = _ref14.id,
472
+ stop = _ref14.stop,
473
+ properties = _objectWithoutProperties(_ref14, _excluded5);
492
474
  var stepUuid = context.stepsByFrontEndId.get(id);
493
475
  if (stepUuid) {
494
476
  this.allureRuntime.updateStep(stepUuid, r => {
@@ -499,11 +481,9 @@ class AllureCypress {
499
481
  });
500
482
  }
501
483
  });
502
- _classPrivateFieldInitSpec(this, _finalizeStep, (context, _ref14) => {
503
- var {
504
- id
505
- } = _ref14,
506
- properties = _objectWithoutProperties(_ref14, _excluded6);
484
+ _classPrivateFieldInitSpec(this, _finalizeStep, (context, _ref15) => {
485
+ var id = _ref15.id,
486
+ properties = _objectWithoutProperties(_ref15, _excluded6);
507
487
  var stepUuid = context.stepsByFrontEndId.get(id);
508
488
  if (stepUuid) {
509
489
  this.allureRuntime.updateStep(stepUuid, r => {
@@ -514,6 +494,23 @@ class AllureCypress {
514
494
  });
515
495
  _classPrivateFieldInitSpec(this, _applyRuntimeApiMessages, (context, message) => {
516
496
  var rootUuid = _classPrivateFieldGet(_resolveRootUuid, this).call(this, context);
497
+ if (message.type === "attachment_path") {
498
+ var _message$data = message.data,
499
+ path = _message$data.path,
500
+ name = _message$data.name,
501
+ options = _objectWithoutProperties(_message$data, _excluded7);
502
+ var references = _classPrivateFieldGet(_screenshotReferencesByPath, this).get(path);
503
+ var reference = references === null || references === void 0 ? void 0 : references.shift();
504
+ if (reference) {
505
+ if (!(references !== null && references !== void 0 && references.length)) {
506
+ _classPrivateFieldGet(_screenshotReferencesByPath, this).delete(path);
507
+ }
508
+ if (rootUuid) {
509
+ this.allureRuntime.writeAttachment(rootUuid, undefined, name, reference, options);
510
+ }
511
+ return;
512
+ }
513
+ }
517
514
  if (rootUuid) {
518
515
  this.allureRuntime.applyRuntimeMessages(rootUuid, [message]);
519
516
  } else {
@@ -583,11 +580,10 @@ class AllureCypress {
583
580
  };
584
581
  this.specContextByAbsolutePath.set(absolutePath, context);
585
582
  });
586
- var {
587
- resultsDir,
588
- videoOnFailOnly = false
589
- } = config,
590
- rest = _objectWithoutProperties(config, _excluded7);
583
+ var resultsDir = config.resultsDir,
584
+ _config$videoOnFailOn = config.videoOnFailOnly,
585
+ videoOnFailOnly = _config$videoOnFailOn === void 0 ? false : _config$videoOnFailOn,
586
+ rest = _objectWithoutProperties(config, _excluded8);
591
587
  this.videoOnFailOnly = videoOnFailOnly;
592
588
  this.allureRuntime = new _reporter.ReporterRuntime(_objectSpread({
593
589
  writer: (0, _reporter.createDefaultWriter)({
@@ -601,7 +597,9 @@ var createRuntimeState = allureConfig => ({
601
597
  config: getRuntimeConfigDefaults(allureConfig),
602
598
  initialized: false,
603
599
  messages: [],
604
- testPlan: (0, _reporter.parseTestPlan)(),
600
+ testPlan: (0, _reporter.parseTestPlan)({
601
+ enableExcludedTests: true
602
+ }),
605
603
  projectDir: (0, _reporter.getProjectRoot)(),
606
604
  projectName: (0, _reporter.getProjectName)(),
607
605
  stepStack: [],
@@ -609,13 +607,15 @@ var createRuntimeState = allureConfig => ({
609
607
  nextApiStepId: 0
610
608
  });
611
609
  var getRuntimeConfigDefaults = function getRuntimeConfigDefaults() {
612
- var {
613
- stepsFromCommands: {
614
- enabled = _utils.DEFAULT_RUNTIME_CONFIG.stepsFromCommands.enabled,
615
- maxArgumentLength = _utils.DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength,
616
- maxArgumentDepth = _utils.DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth
617
- } = _utils.DEFAULT_RUNTIME_CONFIG.stepsFromCommands
618
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _utils.DEFAULT_RUNTIME_CONFIG;
610
+ var _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _utils.DEFAULT_RUNTIME_CONFIG,
611
+ _ref16$stepsFromComma = _ref16.stepsFromCommands,
612
+ _ref16$stepsFromComma2 = _ref16$stepsFromComma === void 0 ? _utils.DEFAULT_RUNTIME_CONFIG.stepsFromCommands : _ref16$stepsFromComma,
613
+ _ref16$stepsFromComma3 = _ref16$stepsFromComma2.enabled,
614
+ enabled = _ref16$stepsFromComma3 === void 0 ? _utils.DEFAULT_RUNTIME_CONFIG.stepsFromCommands.enabled : _ref16$stepsFromComma3,
615
+ _ref16$stepsFromComma4 = _ref16$stepsFromComma2.maxArgumentLength,
616
+ maxArgumentLength = _ref16$stepsFromComma4 === void 0 ? _utils.DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength : _ref16$stepsFromComma4,
617
+ _ref16$stepsFromComma5 = _ref16$stepsFromComma2.maxArgumentDepth,
618
+ maxArgumentDepth = _ref16$stepsFromComma5 === void 0 ? _utils.DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth : _ref16$stepsFromComma5;
619
619
  return {
620
620
  stepsFromCommands: {
621
621
  enabled,