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
@@ -4,7 +4,8 @@ var _excluded = ["fullNameSuffix"],
4
4
  _excluded4 = ["id"],
5
5
  _excluded5 = ["id", "stop"],
6
6
  _excluded6 = ["id"],
7
- _excluded7 = ["resultsDir", "videoOnFailOnly"];
7
+ _excluded7 = ["path", "name"],
8
+ _excluded8 = ["resultsDir", "videoOnFailOnly"];
8
9
  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; }
9
10
  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; }
10
11
  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; }
@@ -18,9 +19,10 @@ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
18
19
  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"); }
19
20
  import { ContentType, Stage, Status } from "allure-js-commons";
20
21
  import { toGlobalErrorMessage } from "allure-js-commons/sdk";
21
- import { ReporterRuntime, createDefaultWriter, getEnvironmentLabels, getFallbackTestCaseIdLabel, getFrameworkLabel, getHostLabel, getLanguageLabel, getPackageLabel, getPosixPath, getProjectName, getProjectRoot, getRelativePath, getSuiteLabels, getThreadLabel, md5, parseTestPlan } from "allure-js-commons/sdk/reporter";
22
+ import { ReporterRuntime, createDefaultWriter, getDefaultSuiteLabels, getEnvironmentLabels, getFallbackTestCaseIdLabel, getFrameworkLabel, getHostLabel, getLanguageLabel, getPackageLabel, getPosixPath, getProjectName, getProjectRoot, getRelativePath, getThreadLabel, md5, parseTestPlan } from "allure-js-commons/sdk/reporter";
22
23
  import { DEFAULT_RUNTIME_CONFIG, last } from "./utils.js";
23
24
  var _fixtureNames = /*#__PURE__*/new WeakMap();
25
+ var _screenshotReferencesByPath = /*#__PURE__*/new WeakMap();
24
26
  var _endAllSpecs = /*#__PURE__*/new WeakMap();
25
27
  var _applyAllureCypressMessages = /*#__PURE__*/new WeakMap();
26
28
  var _startRun = /*#__PURE__*/new WeakMap();
@@ -38,7 +40,6 @@ var _skipTest = /*#__PURE__*/new WeakMap();
38
40
  var _addSkippedTest = /*#__PURE__*/new WeakMap();
39
41
  var _stopTest = /*#__PURE__*/new WeakMap();
40
42
  var _stopExistingTestResult = /*#__PURE__*/new WeakMap();
41
- var _fixTestStepStops = /*#__PURE__*/new WeakMap();
42
43
  var _fixFixtureStepStops = /*#__PURE__*/new WeakMap();
43
44
  var _fixStepStops = /*#__PURE__*/new WeakMap();
44
45
  var _startStep = /*#__PURE__*/new WeakMap();
@@ -56,6 +57,7 @@ export class AllureCypress {
56
57
  _defineProperty(this, "allureRuntime", void 0);
57
58
  _defineProperty(this, "specContextByAbsolutePath", new Map());
58
59
  _classPrivateFieldInitSpec(this, _fixtureNames, new Map());
60
+ _classPrivateFieldInitSpec(this, _screenshotReferencesByPath, new Map());
59
61
  _defineProperty(this, "videoOnFailOnly", false);
60
62
  _defineProperty(this, "attachToCypress", on => {
61
63
  on("task", {
@@ -73,6 +75,7 @@ export class AllureCypress {
73
75
  return null;
74
76
  }
75
77
  });
78
+ on("after:screenshot", this.onAfterScreenshot);
76
79
 
77
80
  // Emits the remaining fixtures and writes the video of the spec.
78
81
  // In interactive mode it's invoked through the `reportFinalAllureCypressSpecMessages` task.
@@ -82,6 +85,22 @@ export class AllureCypress {
82
85
  // `experimentalInteractiveRunEvents` is set.
83
86
  on("after:run", this.onAfterRun);
84
87
  });
88
+ /**
89
+ * Forward `after:screenshot` here if you define your own handler. Pass the
90
+ * final screenshot path after any changes made by your handler.
91
+ */
92
+ _defineProperty(this, "onAfterScreenshot", _ref => {
93
+ var _classPrivateFieldGet2;
94
+ var path = _ref.path;
95
+ // Snapshot plugins can move or delete the file before the browser flushes
96
+ // its attachment message. Preserve each capture, including overwritten paths.
97
+ var reference = this.allureRuntime.emitAttachment(path, {
98
+ contentType: ContentType.PNG
99
+ });
100
+ var references = (_classPrivateFieldGet2 = _classPrivateFieldGet(_screenshotReferencesByPath, this).get(path)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : [];
101
+ references.push(reference);
102
+ _classPrivateFieldGet(_screenshotReferencesByPath, this).set(path, references);
103
+ });
85
104
  /**
86
105
  * Forward the `after:spec` event into Allure Cypress using this function if
87
106
  * you need to define your own handler or combine Allure Cypress with other
@@ -146,17 +165,16 @@ export class AllureCypress {
146
165
  _classPrivateFieldGet(_emitRemainingScopes, this).call(this, specContext);
147
166
  this.specContextByAbsolutePath.delete(specAbsolutePath);
148
167
  }
168
+ _classPrivateFieldGet(_screenshotReferencesByPath, this).clear();
149
169
  });
150
170
  _classPrivateFieldInitSpec(this, _endAllSpecs, () => {
151
171
  for (var specAbsolutePath of this.specContextByAbsolutePath.keys()) {
152
172
  this.endSpec(specAbsolutePath);
153
173
  }
154
174
  });
155
- _classPrivateFieldInitSpec(this, _applyAllureCypressMessages, _ref => {
156
- var {
157
- messages,
158
- absolutePath
159
- } = _ref;
175
+ _classPrivateFieldInitSpec(this, _applyAllureCypressMessages, _ref2 => {
176
+ var messages = _ref2.messages,
177
+ absolutePath = _ref2.absolutePath;
160
178
  messages.forEach(message => {
161
179
  if (message.type === "cypress_run_start") {
162
180
  _classPrivateFieldGet(_startRun, this).call(this, absolutePath);
@@ -217,14 +235,11 @@ export class AllureCypress {
217
235
  _classPrivateFieldGet(_initializeSpecContext, this).call(this, absolutePath);
218
236
  }
219
237
  });
220
- _classPrivateFieldInitSpec(this, _startSuite, (context, _ref2) => {
221
- var {
222
- data: {
223
- id,
224
- name,
225
- root
226
- }
227
- } = _ref2;
238
+ _classPrivateFieldInitSpec(this, _startSuite, (context, _ref3) => {
239
+ var _ref3$data = _ref3.data,
240
+ id = _ref3$data.id,
241
+ name = _ref3$data.name,
242
+ root = _ref3$data.root;
228
243
  _classPrivateFieldGet(_pushNewSuiteScope, this).call(this, context, id);
229
244
  if (!root) {
230
245
  _classPrivateFieldGet(_emitPreviousTestScope, this).call(this, context);
@@ -238,12 +253,8 @@ export class AllureCypress {
238
253
  context.suiteScopeToId.set(scope, suiteId);
239
254
  return scope;
240
255
  });
241
- _classPrivateFieldInitSpec(this, _stopSuite, (context, _ref3) => {
242
- var {
243
- data: {
244
- root
245
- }
246
- } = _ref3;
256
+ _classPrivateFieldInitSpec(this, _stopSuite, (context, _ref4) => {
257
+ var root = _ref4.data.root;
247
258
  _classPrivateFieldGet(_emitPreviousTestScope, this).call(this, context);
248
259
  if (!root) {
249
260
  context.suiteNames.pop();
@@ -261,15 +272,12 @@ export class AllureCypress {
261
272
  this.allureRuntime.writeScope(scope);
262
273
  }
263
274
  });
264
- _classPrivateFieldInitSpec(this, _startHook, (context, _ref4) => {
265
- var {
266
- data: {
267
- name,
268
- scopeType,
269
- position,
270
- start
271
- }
272
- } = _ref4;
275
+ _classPrivateFieldInitSpec(this, _startHook, (context, _ref5) => {
276
+ var _ref5$data = _ref5.data,
277
+ name = _ref5$data.name,
278
+ scopeType = _ref5$data.scopeType,
279
+ position = _ref5$data.position,
280
+ start = _ref5$data.start;
273
281
  var isEach = scopeType === "each";
274
282
  var isAfterEach = position === "after" && isEach;
275
283
  if (!isAfterEach) {
@@ -287,12 +295,8 @@ export class AllureCypress {
287
295
  }
288
296
  }
289
297
  });
290
- _classPrivateFieldInitSpec(this, _stopHook, (context, _ref5) => {
291
- var {
292
- data: {
293
- duration
294
- }
295
- } = _ref5;
298
+ _classPrivateFieldInitSpec(this, _stopHook, (context, _ref6) => {
299
+ var duration = _ref6.data.duration;
296
300
  var fixtureUuid = context.fixture;
297
301
  if (fixtureUuid) {
298
302
  this.allureRuntime.updateFixture(fixtureUuid, fixture => {
@@ -307,23 +311,19 @@ export class AllureCypress {
307
311
  context.fixture = undefined;
308
312
  }
309
313
  });
310
- _classPrivateFieldInitSpec(this, _startTest, (context, _ref6) => {
311
- var {
312
- data: {
313
- fullNameSuffix
314
- }
315
- } = _ref6,
316
- testResultData = _objectWithoutProperties(_ref6.data, _excluded);
314
+ _classPrivateFieldInitSpec(this, _startTest, (context, _ref7) => {
315
+ var _ref7$data = _ref7.data,
316
+ fullNameSuffix = _ref7$data.fullNameSuffix,
317
+ testResultData = _objectWithoutProperties(_ref7$data, _excluded);
317
318
  _classPrivateFieldGet(_emitPreviousTestScope, this).call(this, context);
318
319
  var testScope = this.allureRuntime.startScope();
319
320
  context.testScope = testScope;
320
321
  context.test = _classPrivateFieldGet(_addNewTestResult, this).call(this, context, fullNameSuffix, testResultData, [context.videoScope, ...context.suiteScopes, testScope]);
321
322
  });
322
- _classPrivateFieldInitSpec(this, _addNewTestResult, (context, fullNameSuffix, _ref7, scopes) => {
323
- var {
324
- labels: metadataLabels = []
325
- } = _ref7,
326
- otherTestData = _objectWithoutProperties(_ref7, _excluded2);
323
+ _classPrivateFieldInitSpec(this, _addNewTestResult, (context, fullNameSuffix, _ref8, scopes) => {
324
+ var _ref8$labels = _ref8.labels,
325
+ metadataLabels = _ref8$labels === void 0 ? [] : _ref8$labels,
326
+ otherTestData = _objectWithoutProperties(_ref8, _excluded2);
327
327
  var projectName = getProjectName();
328
328
  var posixPath = getPosixPath(context.specPath);
329
329
  var fullNameBase = projectName ? "".concat(projectName, ":").concat(posixPath) : posixPath;
@@ -331,28 +331,25 @@ export class AllureCypress {
331
331
  var titlePath = posixPath.split("/").concat(context.suiteNames);
332
332
  return this.allureRuntime.startTest(_objectSpread({
333
333
  stage: Stage.RUNNING,
334
- labels: [getLanguageLabel(), getFrameworkLabel("cypress"), ...getSuiteLabels(context.suiteNames), ...metadataLabels, ...getEnvironmentLabels(), getHostLabel(), getThreadLabel(), getPackageLabel(context.specPath), getFallbackTestCaseIdLabel(md5(legacyFullName))],
334
+ labels: [getLanguageLabel(), getFrameworkLabel("cypress"), ...metadataLabels, ...getEnvironmentLabels(), getHostLabel(), getThreadLabel(), getPackageLabel(context.specPath), getFallbackTestCaseIdLabel(md5(legacyFullName))],
335
335
  fullName: "".concat(fullNameBase, "#").concat(fullNameSuffix),
336
336
  titlePath: projectName ? [projectName, ...titlePath] : titlePath
337
337
  }, otherTestData), scopes);
338
338
  });
339
- _classPrivateFieldInitSpec(this, _failHookAndTest, (context, _ref8) => {
340
- var {
341
- data: {
342
- status,
343
- statusDetails
344
- }
345
- } = _ref8;
339
+ _classPrivateFieldInitSpec(this, _failHookAndTest, (context, _ref9) => {
340
+ var _ref9$data = _ref9.data,
341
+ status = _ref9$data.status,
342
+ statusDetails = _ref9$data.statusDetails;
346
343
  var setError = result => Object.assign(result, {
347
344
  status,
348
345
  statusDetails
349
346
  });
350
347
  var fixtureUuid = context.fixture;
351
348
  if (fixtureUuid) {
352
- var _classPrivateFieldGet2;
349
+ var _classPrivateFieldGet3;
353
350
  this.allureRuntime.updateFixture(fixtureUuid, setError);
354
351
  this.allureRuntime.applyGlobalRuntimeMessages([toGlobalErrorMessage({
355
- name: (_classPrivateFieldGet2 = _classPrivateFieldGet(_fixtureNames, this).get(fixtureUuid)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : "hook",
352
+ name: (_classPrivateFieldGet3 = _classPrivateFieldGet(_fixtureNames, this).get(fixtureUuid)) !== null && _classPrivateFieldGet3 !== void 0 ? _classPrivateFieldGet3 : "hook",
356
353
  details: statusDetails,
357
354
  status
358
355
  })]);
@@ -371,12 +368,8 @@ export class AllureCypress {
371
368
  });
372
369
  }
373
370
  });
374
- _classPrivateFieldInitSpec(this, _skipTest, (context, _ref9) => {
375
- var {
376
- data: {
377
- statusDetails
378
- }
379
- } = _ref9;
371
+ _classPrivateFieldInitSpec(this, _skipTest, (context, _ref0) => {
372
+ var statusDetails = _ref0.data.statusDetails;
380
373
  var testUuid = context.test;
381
374
  if (testUuid) {
382
375
  this.allureRuntime.updateTest(testUuid, testResult => {
@@ -387,16 +380,13 @@ export class AllureCypress {
387
380
  });
388
381
  }
389
382
  });
390
- _classPrivateFieldInitSpec(this, _addSkippedTest, (context, _ref0) => {
391
- var {
392
- data: {
393
- fullNameSuffix,
394
- suites,
395
- duration,
396
- retries
397
- }
398
- } = _ref0,
399
- testResultData = _objectWithoutProperties(_ref0.data, _excluded3);
383
+ _classPrivateFieldInitSpec(this, _addSkippedTest, (context, _ref1) => {
384
+ var _ref1$data = _ref1.data,
385
+ fullNameSuffix = _ref1$data.fullNameSuffix,
386
+ suites = _ref1$data.suites,
387
+ duration = _ref1$data.duration,
388
+ retries = _ref1$data.retries,
389
+ testResultData = _objectWithoutProperties(_ref1$data, _excluded3);
400
390
  // Tests skipped because of a hook error may share all suites of the current context
401
391
  // or just a part thereof (if it's from a sibling suite).
402
392
  var scopes = suites.map(s => context.suiteIdToScope.get(s)).filter(s => Boolean(s));
@@ -404,25 +394,21 @@ export class AllureCypress {
404
394
  _classPrivateFieldGet(_stopExistingTestResult, this).call(this, testUuid, {
405
395
  duration,
406
396
  retries
407
- });
397
+ }, context.suiteNames);
408
398
  this.allureRuntime.writeTest(testUuid);
409
399
  });
410
- _classPrivateFieldInitSpec(this, _stopTest, (context, _ref1) => {
411
- var {
412
- data
413
- } = _ref1;
400
+ _classPrivateFieldInitSpec(this, _stopTest, (context, _ref10) => {
401
+ var data = _ref10.data;
414
402
  var testUuid = context.test;
415
403
  if (testUuid) {
416
- _classPrivateFieldGet(_stopExistingTestResult, this).call(this, testUuid, data);
404
+ _classPrivateFieldGet(_stopExistingTestResult, this).call(this, testUuid, data, context.suiteNames);
417
405
  this.allureRuntime.writeTest(testUuid);
418
406
  context.test = undefined;
419
407
  }
420
408
  });
421
- _classPrivateFieldInitSpec(this, _stopExistingTestResult, (testUuid, _ref10) => {
422
- var {
423
- retries,
424
- duration
425
- } = _ref10;
409
+ _classPrivateFieldInitSpec(this, _stopExistingTestResult, (testUuid, _ref11, suiteNames) => {
410
+ var retries = _ref11.retries,
411
+ duration = _ref11.duration;
426
412
  this.allureRuntime.updateTest(testUuid, testResult => {
427
413
  if (retries > 0) {
428
414
  testResult.parameters.push({
@@ -436,19 +422,19 @@ export class AllureCypress {
436
422
  this.allureRuntime.stopTest(testUuid, {
437
423
  duration
438
424
  });
439
- _classPrivateFieldGet(_fixTestStepStops, this).call(this, testUuid);
440
- });
441
- _classPrivateFieldInitSpec(this, _fixTestStepStops, testUuid => {
442
- this.allureRuntime.updateTest(testUuid, _classPrivateFieldGet(_fixStepStops, this));
425
+ // Hook metadata is merged by stopTest, so apply defaults only after it.
426
+ this.allureRuntime.updateTest(testUuid, testResult => {
427
+ testResult.labels.push(...getDefaultSuiteLabels(testResult, suiteNames));
428
+ _classPrivateFieldGet(_fixStepStops, this).call(this, testResult);
429
+ });
443
430
  });
444
431
  _classPrivateFieldInitSpec(this, _fixFixtureStepStops, fixtureUuid => {
445
432
  this.allureRuntime.updateFixture(fixtureUuid, _classPrivateFieldGet(_fixStepStops, this));
446
433
  });
447
- _classPrivateFieldInitSpec(this, _fixStepStops, _ref11 => {
448
- var {
449
- stop,
450
- steps = []
451
- } = _ref11;
434
+ _classPrivateFieldInitSpec(this, _fixStepStops, _ref12 => {
435
+ var stop = _ref12.stop,
436
+ _ref12$steps = _ref12.steps,
437
+ steps = _ref12$steps === void 0 ? [] : _ref12$steps;
452
438
  if (stop) {
453
439
  // In some circumstances, steps becomes dangling and are stopped at the test end/hook end events, which happen
454
440
  // chronologically after the test or fixture ends. This leads to the steps' stop time being greater than the one
@@ -464,11 +450,9 @@ export class AllureCypress {
464
450
  }
465
451
  }
466
452
  });
467
- _classPrivateFieldInitSpec(this, _startStep, (context, _ref12) => {
468
- var {
469
- id
470
- } = _ref12,
471
- properties = _objectWithoutProperties(_ref12, _excluded4);
453
+ _classPrivateFieldInitSpec(this, _startStep, (context, _ref13) => {
454
+ var id = _ref13.id,
455
+ properties = _objectWithoutProperties(_ref13, _excluded4);
472
456
  var rootUuid = _classPrivateFieldGet(_resolveRootUuid, this).call(this, context);
473
457
  if (rootUuid) {
474
458
  var stepUuid = this.allureRuntime.startStep(rootUuid, undefined, properties);
@@ -477,12 +461,10 @@ export class AllureCypress {
477
461
  }
478
462
  }
479
463
  });
480
- _classPrivateFieldInitSpec(this, _stopStep, (context, _ref13) => {
481
- var {
482
- id,
483
- stop
484
- } = _ref13,
485
- properties = _objectWithoutProperties(_ref13, _excluded5);
464
+ _classPrivateFieldInitSpec(this, _stopStep, (context, _ref14) => {
465
+ var id = _ref14.id,
466
+ stop = _ref14.stop,
467
+ properties = _objectWithoutProperties(_ref14, _excluded5);
486
468
  var stepUuid = context.stepsByFrontEndId.get(id);
487
469
  if (stepUuid) {
488
470
  this.allureRuntime.updateStep(stepUuid, r => {
@@ -493,11 +475,9 @@ export class AllureCypress {
493
475
  });
494
476
  }
495
477
  });
496
- _classPrivateFieldInitSpec(this, _finalizeStep, (context, _ref14) => {
497
- var {
498
- id
499
- } = _ref14,
500
- properties = _objectWithoutProperties(_ref14, _excluded6);
478
+ _classPrivateFieldInitSpec(this, _finalizeStep, (context, _ref15) => {
479
+ var id = _ref15.id,
480
+ properties = _objectWithoutProperties(_ref15, _excluded6);
501
481
  var stepUuid = context.stepsByFrontEndId.get(id);
502
482
  if (stepUuid) {
503
483
  this.allureRuntime.updateStep(stepUuid, r => {
@@ -508,6 +488,23 @@ export class AllureCypress {
508
488
  });
509
489
  _classPrivateFieldInitSpec(this, _applyRuntimeApiMessages, (context, message) => {
510
490
  var rootUuid = _classPrivateFieldGet(_resolveRootUuid, this).call(this, context);
491
+ if (message.type === "attachment_path") {
492
+ var _message$data = message.data,
493
+ path = _message$data.path,
494
+ name = _message$data.name,
495
+ options = _objectWithoutProperties(_message$data, _excluded7);
496
+ var references = _classPrivateFieldGet(_screenshotReferencesByPath, this).get(path);
497
+ var reference = references === null || references === void 0 ? void 0 : references.shift();
498
+ if (reference) {
499
+ if (!(references !== null && references !== void 0 && references.length)) {
500
+ _classPrivateFieldGet(_screenshotReferencesByPath, this).delete(path);
501
+ }
502
+ if (rootUuid) {
503
+ this.allureRuntime.writeAttachment(rootUuid, undefined, name, reference, options);
504
+ }
505
+ return;
506
+ }
507
+ }
511
508
  if (rootUuid) {
512
509
  this.allureRuntime.applyRuntimeMessages(rootUuid, [message]);
513
510
  } else {
@@ -577,11 +574,10 @@ export class AllureCypress {
577
574
  };
578
575
  this.specContextByAbsolutePath.set(absolutePath, context);
579
576
  });
580
- var {
581
- resultsDir,
582
- videoOnFailOnly = false
583
- } = config,
584
- rest = _objectWithoutProperties(config, _excluded7);
577
+ var resultsDir = config.resultsDir,
578
+ _config$videoOnFailOn = config.videoOnFailOnly,
579
+ videoOnFailOnly = _config$videoOnFailOn === void 0 ? false : _config$videoOnFailOn,
580
+ rest = _objectWithoutProperties(config, _excluded8);
585
581
  this.videoOnFailOnly = videoOnFailOnly;
586
582
  this.allureRuntime = new ReporterRuntime(_objectSpread({
587
583
  writer: createDefaultWriter({
@@ -594,7 +590,9 @@ var createRuntimeState = allureConfig => ({
594
590
  config: getRuntimeConfigDefaults(allureConfig),
595
591
  initialized: false,
596
592
  messages: [],
597
- testPlan: parseTestPlan(),
593
+ testPlan: parseTestPlan({
594
+ enableExcludedTests: true
595
+ }),
598
596
  projectDir: getProjectRoot(),
599
597
  projectName: getProjectName(),
600
598
  stepStack: [],
@@ -602,13 +600,15 @@ var createRuntimeState = allureConfig => ({
602
600
  nextApiStepId: 0
603
601
  });
604
602
  var getRuntimeConfigDefaults = function getRuntimeConfigDefaults() {
605
- var {
606
- stepsFromCommands: {
607
- enabled = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.enabled,
608
- maxArgumentLength = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength,
609
- maxArgumentDepth = DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth
610
- } = DEFAULT_RUNTIME_CONFIG.stepsFromCommands
611
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_RUNTIME_CONFIG;
603
+ var _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_RUNTIME_CONFIG,
604
+ _ref16$stepsFromComma = _ref16.stepsFromCommands,
605
+ _ref16$stepsFromComma2 = _ref16$stepsFromComma === void 0 ? DEFAULT_RUNTIME_CONFIG.stepsFromCommands : _ref16$stepsFromComma,
606
+ _ref16$stepsFromComma3 = _ref16$stepsFromComma2.enabled,
607
+ enabled = _ref16$stepsFromComma3 === void 0 ? DEFAULT_RUNTIME_CONFIG.stepsFromCommands.enabled : _ref16$stepsFromComma3,
608
+ _ref16$stepsFromComma4 = _ref16$stepsFromComma2.maxArgumentLength,
609
+ maxArgumentLength = _ref16$stepsFromComma4 === void 0 ? DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentLength : _ref16$stepsFromComma4,
610
+ _ref16$stepsFromComma5 = _ref16$stepsFromComma2.maxArgumentDepth,
611
+ maxArgumentDepth = _ref16$stepsFromComma5 === void 0 ? DEFAULT_RUNTIME_CONFIG.stepsFromCommands.maxArgumentDepth : _ref16$stepsFromComma5;
612
612
  return {
613
613
  stepsFromCommands: {
614
614
  enabled,