allure-playwright 3.3.3 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
3
2
  function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
4
3
  function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
5
4
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
@@ -364,9 +363,9 @@ export var AllureReporter = /*#__PURE__*/function () {
364
363
  _this$beforeHooksAtta,
365
364
  _this$afterHooksAttac,
366
365
  _this$attachmentSteps2;
367
- var testUuid, threadId, thread, error, _test$parent$titlePat, _test$parent$titlePat2, projectSuiteTitle, fileSuiteTitle, suiteTitles, beforeHooksStack, afterHooksStack, attachmentsInBeforeHooks, attachmentsInAfterHooks, hookAttachmentUuids, hookAttachmentNames, attachmentSteps, attachmentsInSteps, onlyHooksAttachments, i, attachment, attachmentStep, _iterator2, _step2, _loop, _t;
368
- return _regenerator().w(function (_context2) {
369
- while (1) switch (_context2.n) {
366
+ var testUuid, threadId, thread, error, _test$parent$titlePat, _test$parent$titlePat2, projectSuiteTitle, fileSuiteTitle, suiteTitles, beforeHooksStack, afterHooksStack, attachmentsInBeforeHooks, attachmentsInAfterHooks, attachmentSteps, attachmentToStepMap, attachmentIndex, _iterator2, _step2, _hookStep, _iterator3, _step3, stepUuid, _iterator4, _step4, _hookStep2, i, attachment, stepInfo, _i, _attachment, _stepInfo, hookStep, isBeforeHook, targetStack, stepResult, fileName;
367
+ return _regenerator().w(function (_context) {
368
+ while (1) switch (_context.n) {
370
369
  case 0:
371
370
  testUuid = this.allureResultsUuids.get(test.id); // We need to check parallelIndex first because pw introduced this field only in v1.30.0
372
371
  threadId = result.parallelIndex !== undefined ? result.parallelIndex : result.workerIndex;
@@ -414,34 +413,87 @@ export var AllureReporter = /*#__PURE__*/function () {
414
413
  });
415
414
  attachmentsInBeforeHooks = (_this$beforeHooksAtta = this.beforeHooksAttachmentsStack.get(test.id)) !== null && _this$beforeHooksAtta !== void 0 ? _this$beforeHooksAtta : [];
416
415
  attachmentsInAfterHooks = (_this$afterHooksAttac = this.afterHooksAttachmentsStack.get(test.id)) !== null && _this$afterHooksAttac !== void 0 ? _this$afterHooksAttac : [];
417
- hookAttachmentUuids = new Set([].concat(_toConsumableArray(attachmentsInBeforeHooks), _toConsumableArray(attachmentsInAfterHooks)).map(function (hookStep) {
418
- return normalizeHookTitle(hookStep.title);
419
- }).filter(Boolean));
420
- hookAttachmentNames = new Set([].concat(_toConsumableArray(attachmentsInBeforeHooks), _toConsumableArray(attachmentsInAfterHooks)).map(function (hookStep) {
421
- return normalizeHookTitle(hookStep.title);
422
- }).filter(Boolean));
423
416
  attachmentSteps = (_this$attachmentSteps2 = this.attachmentSteps.get(testUuid)) !== null && _this$attachmentSteps2 !== void 0 ? _this$attachmentSteps2 : [];
424
- attachmentsInSteps = result.attachments.filter(function (attachment) {
425
- return !hookAttachmentUuids.has(attachment.name);
426
- });
427
- onlyHooksAttachments = result.attachments.filter(function (att) {
428
- return hookAttachmentNames.has(att.name);
429
- });
417
+ attachmentToStepMap = new Map();
418
+ attachmentIndex = 0;
419
+ _iterator2 = _createForOfIteratorHelper(attachmentsInBeforeHooks);
420
+ try {
421
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
422
+ _hookStep = _step2.value;
423
+ attachmentToStepMap.set(attachmentIndex, {
424
+ stepUuid: _hookStep.uuid,
425
+ isHook: true,
426
+ hookStep: _hookStep
427
+ });
428
+ attachmentIndex++;
429
+ }
430
+ } catch (err) {
431
+ _iterator2.e(err);
432
+ } finally {
433
+ _iterator2.f();
434
+ }
435
+ _iterator3 = _createForOfIteratorHelper(attachmentSteps);
436
+ try {
437
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
438
+ stepUuid = _step3.value;
439
+ attachmentToStepMap.set(attachmentIndex, {
440
+ stepUuid: stepUuid,
441
+ isHook: false
442
+ });
443
+ attachmentIndex++;
444
+ }
445
+ } catch (err) {
446
+ _iterator3.e(err);
447
+ } finally {
448
+ _iterator3.f();
449
+ }
450
+ _iterator4 = _createForOfIteratorHelper(attachmentsInAfterHooks);
451
+ try {
452
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
453
+ _hookStep2 = _step4.value;
454
+ attachmentToStepMap.set(attachmentIndex, {
455
+ stepUuid: _hookStep2.uuid,
456
+ isHook: true,
457
+ hookStep: _hookStep2
458
+ });
459
+ attachmentIndex++;
460
+ }
461
+ } catch (err) {
462
+ _iterator4.e(err);
463
+ } finally {
464
+ _iterator4.f();
465
+ }
430
466
  i = 0;
431
467
  case 1:
432
- if (!(i < attachmentsInSteps.length)) {
433
- _context2.n = 3;
468
+ if (!(i < result.attachments.length)) {
469
+ _context.n = 6;
434
470
  break;
435
471
  }
436
- attachment = attachmentsInSteps[i];
437
- attachmentStep = attachmentSteps.length > i ? attachmentSteps[i] : undefined;
438
- _context2.n = 2;
439
- return this.processAttachment(testUuid, attachmentStep, attachment);
472
+ attachment = result.attachments[i];
473
+ stepInfo = attachmentToStepMap.get(i);
474
+ if (!(stepInfo !== null && stepInfo !== void 0 && stepInfo.isHook)) {
475
+ _context.n = 2;
476
+ break;
477
+ }
478
+ return _context.a(3, 5);
440
479
  case 2:
480
+ if (!(stepInfo !== null && stepInfo !== void 0 && stepInfo.stepUuid)) {
481
+ _context.n = 4;
482
+ break;
483
+ }
484
+ _context.n = 3;
485
+ return this.processAttachment(testUuid, stepInfo.stepUuid, attachment);
486
+ case 3:
487
+ _context.n = 5;
488
+ break;
489
+ case 4:
490
+ _context.n = 5;
491
+ return this.processAttachment(testUuid, undefined, attachment);
492
+ case 5:
441
493
  i++;
442
- _context2.n = 1;
494
+ _context.n = 1;
443
495
  break;
444
- case 3:
496
+ case 6:
445
497
  if (result.stdout.length > 0) {
446
498
  this.allureRuntime.writeAttachment(testUuid, undefined, "stdout", Buffer.from(stripAnsi(result.stdout.join("")), "utf-8"), {
447
499
  contentType: ContentType.TEXT
@@ -455,74 +507,45 @@ export var AllureReporter = /*#__PURE__*/function () {
455
507
 
456
508
  // FIXME: temp logic for labels override, we need it here to keep the reporter compatible with v2 API
457
509
  // in next iterations we need to implement the logic for every javascript integration
458
- _iterator2 = _createForOfIteratorHelper(onlyHooksAttachments);
459
- _context2.p = 4;
460
- _loop = /*#__PURE__*/_regenerator().m(function _loop() {
461
- var attachment, matchingBeforeHookStep, matchingAfterHookStep, targetStack, hookStep, stepResult, fileName;
462
- return _regenerator().w(function (_context) {
463
- while (1) switch (_context.n) {
464
- case 0:
465
- attachment = _step2.value;
466
- matchingBeforeHookStep = attachmentsInBeforeHooks.find(function (step) {
467
- return normalizeHookTitle(step.title) === attachment.name;
468
- });
469
- matchingAfterHookStep = attachmentsInAfterHooks.find(function (step) {
470
- return normalizeHookTitle(step.title) === attachment.name;
471
- });
472
- targetStack = matchingBeforeHookStep ? beforeHooksStack : afterHooksStack;
473
- hookStep = matchingBeforeHookStep || matchingAfterHookStep;
474
- if (!(attachment.contentType === ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE)) {
475
- _context.n = 2;
476
- break;
477
- }
478
- _context.n = 1;
479
- return _this.processAttachment(testUuid, hookStep === null || hookStep === void 0 ? void 0 : hookStep.uuid, attachment);
480
- case 1:
481
- return _context.a(2, 1);
482
- case 2:
483
- if (targetStack && hookStep) {
484
- stepResult = targetStack === null || targetStack === void 0 ? void 0 : targetStack.findStepByUuid(hookStep === null || hookStep === void 0 ? void 0 : hookStep.uuid);
485
- if (stepResult) {
486
- fileName = targetStack.addAttachment(attachment, _this.allureRuntime.writer);
487
- stepResult.attachments.push({
488
- name: attachment.name,
489
- type: attachment.contentType,
490
- source: fileName
491
- });
492
- }
493
- }
494
- case 3:
495
- return _context.a(2);
496
- }
497
- }, _loop);
498
- });
499
- _iterator2.s();
500
- case 5:
501
- if ((_step2 = _iterator2.n()).done) {
502
- _context2.n = 8;
510
+ _i = 0;
511
+ case 7:
512
+ if (!(_i < result.attachments.length)) {
513
+ _context.n = 11;
503
514
  break;
504
515
  }
505
- return _context2.d(_regeneratorValues(_loop()), 6);
506
- case 6:
507
- if (!_context2.v) {
508
- _context2.n = 7;
516
+ _attachment = result.attachments[_i];
517
+ _stepInfo = attachmentToStepMap.get(_i);
518
+ if (!(_stepInfo !== null && _stepInfo !== void 0 && _stepInfo.isHook && _stepInfo.hookStep)) {
519
+ _context.n = 10;
509
520
  break;
510
521
  }
511
- return _context2.a(3, 7);
512
- case 7:
513
- _context2.n = 5;
514
- break;
522
+ hookStep = _stepInfo.hookStep;
523
+ isBeforeHook = attachmentsInBeforeHooks.includes(hookStep);
524
+ targetStack = isBeforeHook ? beforeHooksStack : afterHooksStack;
525
+ if (!(_attachment.contentType === ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE)) {
526
+ _context.n = 9;
527
+ break;
528
+ }
529
+ _context.n = 8;
530
+ return this.processAttachment(testUuid, hookStep.uuid, _attachment);
515
531
  case 8:
516
- _context2.n = 10;
517
- break;
532
+ return _context.a(3, 10);
518
533
  case 9:
519
- _context2.p = 9;
520
- _t = _context2.v;
521
- _iterator2.e(_t);
534
+ if (targetStack) {
535
+ stepResult = targetStack.findStepByUuid(hookStep.uuid);
536
+ if (stepResult) {
537
+ fileName = targetStack.addAttachment(_attachment, this.allureRuntime.writer);
538
+ stepResult.attachments.push({
539
+ name: _attachment.name,
540
+ type: _attachment.contentType,
541
+ source: fileName
542
+ });
543
+ }
544
+ }
522
545
  case 10:
523
- _context2.p = 10;
524
- _iterator2.f();
525
- return _context2.f(10);
546
+ _i++;
547
+ _context.n = 7;
548
+ break;
526
549
  case 11:
527
550
  this.allureRuntime.updateTest(testUuid, function (testResult) {
528
551
  var mappedLabels = testResult.labels.reduce(function (acc, label) {
@@ -556,9 +579,9 @@ export var AllureReporter = /*#__PURE__*/function () {
556
579
  });
557
580
  this.allureRuntime.writeTest(testUuid);
558
581
  case 12:
559
- return _context2.a(2);
582
+ return _context.a(2);
560
583
  }
561
- }, _callee, this, [[4, 9, 10, 11]]);
584
+ }, _callee, this);
562
585
  }));
563
586
  function onTestEnd(_x, _x2) {
564
587
  return _onTestEnd.apply(this, arguments);
@@ -570,26 +593,26 @@ export var AllureReporter = /*#__PURE__*/function () {
570
593
  value: function () {
571
594
  var _addSkippedResults = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
572
595
  var _this2 = this;
573
- var unprocessedCases, _iterator3, _step3, testCase, _t2;
574
- return _regenerator().w(function (_context3) {
575
- while (1) switch (_context3.n) {
596
+ var unprocessedCases, _iterator5, _step5, testCase, _t;
597
+ return _regenerator().w(function (_context2) {
598
+ while (1) switch (_context2.n) {
576
599
  case 0:
577
600
  unprocessedCases = this.suite.allTests().filter(function (_ref4) {
578
601
  var title = _ref4.title;
579
602
  var titleMetadata = extractMetadataFromString(title);
580
603
  return !_this2.startedTestCasesTitlesCache.includes(titleMetadata.cleanTitle);
581
604
  });
582
- _iterator3 = _createForOfIteratorHelper(unprocessedCases);
583
- _context3.p = 1;
584
- _iterator3.s();
605
+ _iterator5 = _createForOfIteratorHelper(unprocessedCases);
606
+ _context2.p = 1;
607
+ _iterator5.s();
585
608
  case 2:
586
- if ((_step3 = _iterator3.n()).done) {
587
- _context3.n = 4;
609
+ if ((_step5 = _iterator5.n()).done) {
610
+ _context2.n = 4;
588
611
  break;
589
612
  }
590
- testCase = _step3.value;
613
+ testCase = _step5.value;
591
614
  this.onTestBegin(testCase);
592
- _context3.n = 3;
615
+ _context2.n = 3;
593
616
  return this.onTestEnd(testCase, {
594
617
  status: Status.SKIPPED,
595
618
  attachments: [],
@@ -605,21 +628,21 @@ export var AllureReporter = /*#__PURE__*/function () {
605
628
  annotations: []
606
629
  });
607
630
  case 3:
608
- _context3.n = 2;
631
+ _context2.n = 2;
609
632
  break;
610
633
  case 4:
611
- _context3.n = 6;
634
+ _context2.n = 6;
612
635
  break;
613
636
  case 5:
614
- _context3.p = 5;
615
- _t2 = _context3.v;
616
- _iterator3.e(_t2);
637
+ _context2.p = 5;
638
+ _t = _context2.v;
639
+ _iterator5.e(_t);
617
640
  case 6:
618
- _context3.p = 6;
619
- _iterator3.f();
620
- return _context3.f(6);
641
+ _context2.p = 6;
642
+ _iterator5.f();
643
+ return _context2.f(6);
621
644
  case 7:
622
- return _context3.a(2);
645
+ return _context2.a(2);
623
646
  }
624
647
  }, _callee2, this, [[1, 5, 6, 7]]);
625
648
  }));
@@ -632,16 +655,16 @@ export var AllureReporter = /*#__PURE__*/function () {
632
655
  key: "onEnd",
633
656
  value: function () {
634
657
  var _onEnd = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
635
- return _regenerator().w(function (_context4) {
636
- while (1) switch (_context4.n) {
658
+ return _regenerator().w(function (_context3) {
659
+ while (1) switch (_context3.n) {
637
660
  case 0:
638
- _context4.n = 1;
661
+ _context3.n = 1;
639
662
  return this.addSkippedResults();
640
663
  case 1:
641
664
  this.allureRuntime.writeEnvironmentInfo();
642
665
  this.allureRuntime.writeCategoriesDefinitions();
643
666
  case 2:
644
- return _context4.a(2);
667
+ return _context3.a(2);
645
668
  }
646
669
  }, _callee3, this);
647
670
  }));
@@ -675,36 +698,36 @@ export var AllureReporter = /*#__PURE__*/function () {
675
698
  value: function () {
676
699
  var _processAttachment = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(testUuid, attachmentStepUuid, attachment) {
677
700
  var allureRuntimeMessage, message, parentUuid, contentType, pathWithoutEnd, actualBase64, expectedBase64, diffBase64, diffName;
678
- return _regenerator().w(function (_context5) {
679
- while (1) switch (_context5.n) {
701
+ return _regenerator().w(function (_context4) {
702
+ while (1) switch (_context4.n) {
680
703
  case 0:
681
704
  if (!(!attachment.body && !attachment.path)) {
682
- _context5.n = 1;
705
+ _context4.n = 1;
683
706
  break;
684
707
  }
685
- return _context5.a(2);
708
+ return _context4.a(2);
686
709
  case 1:
687
710
  allureRuntimeMessage = attachment.contentType === ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE;
688
711
  if (!(allureRuntimeMessage && !attachment.body)) {
689
- _context5.n = 2;
712
+ _context4.n = 2;
690
713
  break;
691
714
  }
692
- return _context5.a(2);
715
+ return _context4.a(2);
693
716
  case 2:
694
717
  if (!allureRuntimeMessage) {
695
- _context5.n = 4;
718
+ _context4.n = 4;
696
719
  break;
697
720
  }
698
721
  message = JSON.parse(attachment.body.toString());
699
722
  if (!(message.type === "step_metadata")) {
700
- _context5.n = 3;
723
+ _context4.n = 3;
701
724
  break;
702
725
  }
703
726
  this.processStepMetadataMessage(attachmentStepUuid, message);
704
- return _context5.a(2);
727
+ return _context4.a(2);
705
728
  case 3:
706
729
  this.allureRuntime.applyRuntimeMessages(testUuid, [message]);
707
- return _context5.a(2);
730
+ return _context4.a(2);
708
731
  case 4:
709
732
  parentUuid = this.allureRuntime.startStep(testUuid, attachmentStepUuid, {
710
733
  name: attachment.name
@@ -715,20 +738,20 @@ export var AllureReporter = /*#__PURE__*/function () {
715
738
  this.allureRuntime.stopStep(parentUuid, undefined);
716
739
  }
717
740
  if (!attachment.body) {
718
- _context5.n = 5;
741
+ _context4.n = 5;
719
742
  break;
720
743
  }
721
744
  this.allureRuntime.writeAttachment(testUuid, parentUuid, attachment.name, attachment.body, {
722
745
  contentType: attachment.contentType
723
746
  });
724
- _context5.n = 7;
747
+ _context4.n = 7;
725
748
  break;
726
749
  case 5:
727
750
  if (existsSync(attachment.path)) {
728
- _context5.n = 6;
751
+ _context4.n = 6;
729
752
  break;
730
753
  }
731
- return _context5.a(2);
754
+ return _context4.a(2);
732
755
  case 6:
733
756
  contentType = attachment.name === "trace" && attachment.contentType === "application/zip" ? "application/vnd.allure.playwright-trace" : attachment.contentType;
734
757
  this.allureRuntime.writeAttachment(testUuid, parentUuid, attachment.name, attachment.path, {
@@ -736,30 +759,30 @@ export var AllureReporter = /*#__PURE__*/function () {
736
759
  });
737
760
  case 7:
738
761
  if (attachment.name.match(diffEndRegexp)) {
739
- _context5.n = 8;
762
+ _context4.n = 8;
740
763
  break;
741
764
  }
742
- return _context5.a(2);
765
+ return _context4.a(2);
743
766
  case 8:
744
767
  pathWithoutEnd = attachment.path.replace(diffEndRegexp, "");
745
768
  if (!this.processedDiffs.includes(pathWithoutEnd)) {
746
- _context5.n = 9;
769
+ _context4.n = 9;
747
770
  break;
748
771
  }
749
- return _context5.a(2);
772
+ return _context4.a(2);
750
773
  case 9:
751
- _context5.n = 10;
774
+ _context4.n = 10;
752
775
  return readImageAsBase64("".concat(pathWithoutEnd, "-actual.png"));
753
776
  case 10:
754
- actualBase64 = _context5.v;
755
- _context5.n = 11;
777
+ actualBase64 = _context4.v;
778
+ _context4.n = 11;
756
779
  return readImageAsBase64("".concat(pathWithoutEnd, "-expected.png"));
757
780
  case 11:
758
- expectedBase64 = _context5.v;
759
- _context5.n = 12;
781
+ expectedBase64 = _context4.v;
782
+ _context4.n = 12;
760
783
  return readImageAsBase64("".concat(pathWithoutEnd, "-diff.png"));
761
784
  case 12:
762
- diffBase64 = _context5.v;
785
+ diffBase64 = _context4.v;
763
786
  diffName = attachment.name.replace(diffEndRegexp, "");
764
787
  this.allureRuntime.writeAttachment(testUuid, undefined, diffName, Buffer.from(JSON.stringify({
765
788
  expected: expectedBase64,
@@ -772,7 +795,7 @@ export var AllureReporter = /*#__PURE__*/function () {
772
795
  });
773
796
  this.processedDiffs.push(pathWithoutEnd);
774
797
  case 13:
775
- return _context5.a(2);
798
+ return _context4.a(2);
776
799
  }
777
800
  }, _callee4, this);
778
801
  }));