allure-playwright 3.3.2 → 3.4.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.
package/dist/cjs/index.js CHANGED
@@ -27,7 +27,6 @@ var _legacy = require("./legacy.js");
27
27
  var _utils = require("./utils.js");
28
28
  var _test = require("@playwright/test");
29
29
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
30
- 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"); }
31
30
  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 }; })(); }
32
31
  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); }
33
32
  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); }
@@ -52,7 +51,7 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
52
51
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
53
52
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
54
53
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
55
- 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"); }
54
+ 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"); } /* eslint max-lines: off */
56
55
  var _AllureReporter_brand = /*#__PURE__*/new WeakSet();
57
56
  var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
58
57
  function AllureReporter(config) {
@@ -382,9 +381,9 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
382
381
  _this$beforeHooksAtta,
383
382
  _this$afterHooksAttac,
384
383
  _this$attachmentSteps2;
385
- var testUuid, threadId, thread, error, _test$parent$titlePat, _test$parent$titlePat2, projectSuiteTitle, fileSuiteTitle, suiteTitles, beforeHooksStack, afterHooksStack, attachmentsInBeforeHooks, attachmentsInAfterHooks, hookAttachmentUuids, attachmentSteps, attachmentsInSteps, i, attachment, attachmentStep, hookAttachmentNames, onlyHooksAttachments, _iterator2, _step2, _loop, _t;
386
- return _regenerator().w(function (_context2) {
387
- while (1) switch (_context2.n) {
384
+ var testUuid, threadId, thread, error, _test$parent$titlePat, _test$parent$titlePat2, projectSuiteTitle, fileSuiteTitle, suiteTitles, beforeHooksStack, afterHooksStack, attachmentsInBeforeHooks, attachmentsInAfterHooks, hookAttachmentCounts, _i, _arr, hookStep, name, attachmentSteps, onlyHooksAttachments, attachmentsInSteps, attachmentCounts, _iterator2, _step2, _attachment2, hookCount, currentCount, i, attachment, attachmentStep, beforeHookIndex, afterHookIndex, _i2, _onlyHooksAttachments, _attachment, matchingBeforeHookStep, matchingAfterHookStep, targetStack, _hookStep, _hookStep2, _targetStack, _hookStep3, stepResult, fileName;
385
+ return _regenerator().w(function (_context) {
386
+ while (1) switch (_context.n) {
388
387
  case 0:
389
388
  testUuid = this.allureResultsUuids.get(test.id); // We need to check parallelIndex first because pw introduced this field only in v1.30.0
390
389
  threadId = result.parallelIndex !== undefined ? result.parallelIndex : result.workerIndex;
@@ -432,26 +431,49 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
432
431
  });
433
432
  attachmentsInBeforeHooks = (_this$beforeHooksAtta = this.beforeHooksAttachmentsStack.get(test.id)) !== null && _this$beforeHooksAtta !== void 0 ? _this$beforeHooksAtta : [];
434
433
  attachmentsInAfterHooks = (_this$afterHooksAttac = this.afterHooksAttachmentsStack.get(test.id)) !== null && _this$afterHooksAttac !== void 0 ? _this$afterHooksAttac : [];
435
- hookAttachmentUuids = new Set([].concat(_toConsumableArray(attachmentsInBeforeHooks), _toConsumableArray(attachmentsInAfterHooks)).map(function (hookStep) {
436
- return (0, _utils.normalizeHookTitle)(hookStep.title);
437
- }).filter(Boolean));
434
+ hookAttachmentCounts = new Map();
435
+ for (_i = 0, _arr = [].concat(_toConsumableArray(attachmentsInBeforeHooks), _toConsumableArray(attachmentsInAfterHooks)); _i < _arr.length; _i++) {
436
+ hookStep = _arr[_i];
437
+ name = (0, _utils.normalizeHookTitle)(hookStep.title);
438
+ if (name) {
439
+ hookAttachmentCounts.set(name, (hookAttachmentCounts.get(name) || 0) + 1);
440
+ }
441
+ }
438
442
  attachmentSteps = (_this$attachmentSteps2 = this.attachmentSteps.get(testUuid)) !== null && _this$attachmentSteps2 !== void 0 ? _this$attachmentSteps2 : [];
439
- attachmentsInSteps = result.attachments.filter(function (attachment) {
440
- return !hookAttachmentUuids.has(attachment.name);
441
- });
443
+ onlyHooksAttachments = [];
444
+ attachmentsInSteps = [];
445
+ attachmentCounts = new Map();
446
+ _iterator2 = _createForOfIteratorHelper(result.attachments);
447
+ try {
448
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
449
+ _attachment2 = _step2.value;
450
+ hookCount = hookAttachmentCounts.get(_attachment2.name) || 0;
451
+ currentCount = attachmentCounts.get(_attachment2.name) || 0;
452
+ if (currentCount < hookCount) {
453
+ onlyHooksAttachments.push(_attachment2);
454
+ } else {
455
+ attachmentsInSteps.push(_attachment2);
456
+ }
457
+ attachmentCounts.set(_attachment2.name, currentCount + 1);
458
+ }
459
+ } catch (err) {
460
+ _iterator2.e(err);
461
+ } finally {
462
+ _iterator2.f();
463
+ }
442
464
  i = 0;
443
465
  case 1:
444
466
  if (!(i < attachmentsInSteps.length)) {
445
- _context2.n = 3;
467
+ _context.n = 3;
446
468
  break;
447
469
  }
448
470
  attachment = attachmentsInSteps[i];
449
471
  attachmentStep = attachmentSteps.length > i ? attachmentSteps[i] : undefined;
450
- _context2.n = 2;
472
+ _context.n = 2;
451
473
  return this.processAttachment(testUuid, attachmentStep, attachment);
452
474
  case 2:
453
475
  i++;
454
- _context2.n = 1;
476
+ _context.n = 1;
455
477
  break;
456
478
  case 3:
457
479
  if (result.stdout.length > 0) {
@@ -467,66 +489,55 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
467
489
 
468
490
  // FIXME: temp logic for labels override, we need it here to keep the reporter compatible with v2 API
469
491
  // in next iterations we need to implement the logic for every javascript integration
470
- hookAttachmentNames = new Set([].concat(_toConsumableArray(attachmentsInBeforeHooks), _toConsumableArray(attachmentsInAfterHooks)).map(function (hookStep) {
471
- return (0, _utils.normalizeHookTitle)(hookStep.title);
472
- }).filter(Boolean));
473
- onlyHooksAttachments = result.attachments.filter(function (att) {
474
- return hookAttachmentNames.has(att.name);
475
- });
476
- _iterator2 = _createForOfIteratorHelper(onlyHooksAttachments);
477
- _context2.p = 4;
478
- _loop = /*#__PURE__*/_regenerator().m(function _loop() {
479
- var attachment, matchingBeforeHookStep, matchingAfterHookStep, targetStack, hookStep, stepResult, fileName;
480
- return _regenerator().w(function (_context) {
481
- while (1) switch (_context.n) {
482
- case 0:
483
- attachment = _step2.value;
484
- matchingBeforeHookStep = attachmentsInBeforeHooks.find(function (step) {
485
- return (0, _utils.normalizeHookTitle)(step.title) === attachment.name;
486
- });
487
- matchingAfterHookStep = attachmentsInAfterHooks.find(function (step) {
488
- return (0, _utils.normalizeHookTitle)(step.title) === attachment.name;
489
- });
490
- targetStack = matchingBeforeHookStep ? beforeHooksStack : afterHooksStack;
491
- hookStep = matchingBeforeHookStep || matchingAfterHookStep;
492
- if (targetStack && hookStep) {
493
- stepResult = targetStack === null || targetStack === void 0 ? void 0 : targetStack.findStepByUuid(hookStep === null || hookStep === void 0 ? void 0 : hookStep.uuid);
494
- if (stepResult) {
495
- fileName = targetStack.addAttachment(attachment, _this.allureRuntime.writer);
496
- stepResult.attachments.push({
497
- name: attachment.name,
498
- type: attachment.contentType,
499
- source: fileName
500
- });
501
- }
502
- }
503
- case 1:
504
- return _context.a(2);
505
- }
506
- }, _loop);
507
- });
508
- _iterator2.s();
509
- case 5:
510
- if ((_step2 = _iterator2.n()).done) {
511
- _context2.n = 7;
492
+ beforeHookIndex = 0;
493
+ afterHookIndex = 0;
494
+ _i2 = 0, _onlyHooksAttachments = onlyHooksAttachments;
495
+ case 4:
496
+ if (!(_i2 < _onlyHooksAttachments.length)) {
497
+ _context.n = 8;
498
+ break;
499
+ }
500
+ _attachment = _onlyHooksAttachments[_i2];
501
+ matchingBeforeHookStep = null;
502
+ matchingAfterHookStep = null;
503
+ targetStack = null;
504
+ _hookStep = null;
505
+ if (beforeHookIndex < attachmentsInBeforeHooks.length) {
506
+ matchingBeforeHookStep = attachmentsInBeforeHooks[beforeHookIndex];
507
+ targetStack = beforeHooksStack;
508
+ _hookStep = matchingBeforeHookStep;
509
+ beforeHookIndex++;
510
+ } else if (afterHookIndex < attachmentsInAfterHooks.length) {
511
+ matchingAfterHookStep = attachmentsInAfterHooks[afterHookIndex];
512
+ targetStack = afterHooksStack;
513
+ _hookStep = matchingAfterHookStep;
514
+ afterHookIndex++;
515
+ }
516
+ if (!(_attachment.contentType === _reporter.ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE)) {
517
+ _context.n = 6;
512
518
  break;
513
519
  }
514
- return _context2.d(_regeneratorValues(_loop()), 6);
520
+ _context.n = 5;
521
+ return this.processAttachment(testUuid, (_hookStep2 = _hookStep) === null || _hookStep2 === void 0 ? void 0 : _hookStep2.uuid, _attachment);
522
+ case 5:
523
+ return _context.a(3, 7);
515
524
  case 6:
516
- _context2.n = 5;
517
- break;
525
+ if (targetStack && _hookStep) {
526
+ stepResult = (_targetStack = targetStack) === null || _targetStack === void 0 ? void 0 : _targetStack.findStepByUuid((_hookStep3 = _hookStep) === null || _hookStep3 === void 0 ? void 0 : _hookStep3.uuid);
527
+ if (stepResult) {
528
+ fileName = targetStack.addAttachment(_attachment, this.allureRuntime.writer);
529
+ stepResult.attachments.push({
530
+ name: _attachment.name,
531
+ type: _attachment.contentType,
532
+ source: fileName
533
+ });
534
+ }
535
+ }
518
536
  case 7:
519
- _context2.n = 9;
537
+ _i2++;
538
+ _context.n = 4;
520
539
  break;
521
540
  case 8:
522
- _context2.p = 8;
523
- _t = _context2.v;
524
- _iterator2.e(_t);
525
- case 9:
526
- _context2.p = 9;
527
- _iterator2.f();
528
- return _context2.f(9);
529
- case 10:
530
541
  this.allureRuntime.updateTest(testUuid, function (testResult) {
531
542
  var mappedLabels = testResult.labels.reduce(function (acc, label) {
532
543
  if (!acc[label.name]) {
@@ -558,10 +569,10 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
558
569
  duration: result.duration
559
570
  });
560
571
  this.allureRuntime.writeTest(testUuid);
561
- case 11:
562
- return _context2.a(2);
572
+ case 9:
573
+ return _context.a(2);
563
574
  }
564
- }, _callee, this, [[4, 8, 9, 10]]);
575
+ }, _callee, this);
565
576
  }));
566
577
  function onTestEnd(_x, _x2) {
567
578
  return _onTestEnd.apply(this, arguments);
@@ -573,9 +584,9 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
573
584
  value: function () {
574
585
  var _addSkippedResults = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
575
586
  var _this2 = this;
576
- var unprocessedCases, _iterator3, _step3, testCase, _t2;
577
- return _regenerator().w(function (_context3) {
578
- while (1) switch (_context3.n) {
587
+ var unprocessedCases, _iterator3, _step3, testCase, _t;
588
+ return _regenerator().w(function (_context2) {
589
+ while (1) switch (_context2.n) {
579
590
  case 0:
580
591
  unprocessedCases = this.suite.allTests().filter(function (_ref4) {
581
592
  var title = _ref4.title;
@@ -583,16 +594,16 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
583
594
  return !_this2.startedTestCasesTitlesCache.includes(titleMetadata.cleanTitle);
584
595
  });
585
596
  _iterator3 = _createForOfIteratorHelper(unprocessedCases);
586
- _context3.p = 1;
597
+ _context2.p = 1;
587
598
  _iterator3.s();
588
599
  case 2:
589
600
  if ((_step3 = _iterator3.n()).done) {
590
- _context3.n = 4;
601
+ _context2.n = 4;
591
602
  break;
592
603
  }
593
604
  testCase = _step3.value;
594
605
  this.onTestBegin(testCase);
595
- _context3.n = 3;
606
+ _context2.n = 3;
596
607
  return this.onTestEnd(testCase, {
597
608
  status: _allureJsCommons.Status.SKIPPED,
598
609
  attachments: [],
@@ -608,21 +619,21 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
608
619
  annotations: []
609
620
  });
610
621
  case 3:
611
- _context3.n = 2;
622
+ _context2.n = 2;
612
623
  break;
613
624
  case 4:
614
- _context3.n = 6;
625
+ _context2.n = 6;
615
626
  break;
616
627
  case 5:
617
- _context3.p = 5;
618
- _t2 = _context3.v;
619
- _iterator3.e(_t2);
628
+ _context2.p = 5;
629
+ _t = _context2.v;
630
+ _iterator3.e(_t);
620
631
  case 6:
621
- _context3.p = 6;
632
+ _context2.p = 6;
622
633
  _iterator3.f();
623
- return _context3.f(6);
634
+ return _context2.f(6);
624
635
  case 7:
625
- return _context3.a(2);
636
+ return _context2.a(2);
626
637
  }
627
638
  }, _callee2, this, [[1, 5, 6, 7]]);
628
639
  }));
@@ -635,16 +646,16 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
635
646
  key: "onEnd",
636
647
  value: function () {
637
648
  var _onEnd = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
638
- return _regenerator().w(function (_context4) {
639
- while (1) switch (_context4.n) {
649
+ return _regenerator().w(function (_context3) {
650
+ while (1) switch (_context3.n) {
640
651
  case 0:
641
- _context4.n = 1;
652
+ _context3.n = 1;
642
653
  return this.addSkippedResults();
643
654
  case 1:
644
655
  this.allureRuntime.writeEnvironmentInfo();
645
656
  this.allureRuntime.writeCategoriesDefinitions();
646
657
  case 2:
647
- return _context4.a(2);
658
+ return _context3.a(2);
648
659
  }
649
660
  }, _callee3, this);
650
661
  }));
@@ -678,36 +689,36 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
678
689
  value: function () {
679
690
  var _processAttachment = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(testUuid, attachmentStepUuid, attachment) {
680
691
  var allureRuntimeMessage, message, parentUuid, contentType, pathWithoutEnd, actualBase64, expectedBase64, diffBase64, diffName;
681
- return _regenerator().w(function (_context5) {
682
- while (1) switch (_context5.n) {
692
+ return _regenerator().w(function (_context4) {
693
+ while (1) switch (_context4.n) {
683
694
  case 0:
684
695
  if (!(!attachment.body && !attachment.path)) {
685
- _context5.n = 1;
696
+ _context4.n = 1;
686
697
  break;
687
698
  }
688
- return _context5.a(2);
699
+ return _context4.a(2);
689
700
  case 1:
690
701
  allureRuntimeMessage = attachment.contentType === _reporter.ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE;
691
702
  if (!(allureRuntimeMessage && !attachment.body)) {
692
- _context5.n = 2;
703
+ _context4.n = 2;
693
704
  break;
694
705
  }
695
- return _context5.a(2);
706
+ return _context4.a(2);
696
707
  case 2:
697
708
  if (!allureRuntimeMessage) {
698
- _context5.n = 4;
709
+ _context4.n = 4;
699
710
  break;
700
711
  }
701
712
  message = JSON.parse(attachment.body.toString());
702
713
  if (!(message.type === "step_metadata")) {
703
- _context5.n = 3;
714
+ _context4.n = 3;
704
715
  break;
705
716
  }
706
717
  this.processStepMetadataMessage(attachmentStepUuid, message);
707
- return _context5.a(2);
718
+ return _context4.a(2);
708
719
  case 3:
709
720
  this.allureRuntime.applyRuntimeMessages(testUuid, [message]);
710
- return _context5.a(2);
721
+ return _context4.a(2);
711
722
  case 4:
712
723
  parentUuid = this.allureRuntime.startStep(testUuid, attachmentStepUuid, {
713
724
  name: attachment.name
@@ -718,20 +729,20 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
718
729
  this.allureRuntime.stopStep(parentUuid, undefined);
719
730
  }
720
731
  if (!attachment.body) {
721
- _context5.n = 5;
732
+ _context4.n = 5;
722
733
  break;
723
734
  }
724
735
  this.allureRuntime.writeAttachment(testUuid, parentUuid, attachment.name, attachment.body, {
725
736
  contentType: attachment.contentType
726
737
  });
727
- _context5.n = 7;
738
+ _context4.n = 7;
728
739
  break;
729
740
  case 5:
730
741
  if ((0, _nodeFs.existsSync)(attachment.path)) {
731
- _context5.n = 6;
742
+ _context4.n = 6;
732
743
  break;
733
744
  }
734
- return _context5.a(2);
745
+ return _context4.a(2);
735
746
  case 6:
736
747
  contentType = attachment.name === "trace" && attachment.contentType === "application/zip" ? "application/vnd.allure.playwright-trace" : attachment.contentType;
737
748
  this.allureRuntime.writeAttachment(testUuid, parentUuid, attachment.name, attachment.path, {
@@ -739,30 +750,30 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
739
750
  });
740
751
  case 7:
741
752
  if (attachment.name.match(_utils.diffEndRegexp)) {
742
- _context5.n = 8;
753
+ _context4.n = 8;
743
754
  break;
744
755
  }
745
- return _context5.a(2);
756
+ return _context4.a(2);
746
757
  case 8:
747
758
  pathWithoutEnd = attachment.path.replace(_utils.diffEndRegexp, "");
748
759
  if (!this.processedDiffs.includes(pathWithoutEnd)) {
749
- _context5.n = 9;
760
+ _context4.n = 9;
750
761
  break;
751
762
  }
752
- return _context5.a(2);
763
+ return _context4.a(2);
753
764
  case 9:
754
- _context5.n = 10;
765
+ _context4.n = 10;
755
766
  return (0, _reporter.readImageAsBase64)("".concat(pathWithoutEnd, "-actual.png"));
756
767
  case 10:
757
- actualBase64 = _context5.v;
758
- _context5.n = 11;
768
+ actualBase64 = _context4.v;
769
+ _context4.n = 11;
759
770
  return (0, _reporter.readImageAsBase64)("".concat(pathWithoutEnd, "-expected.png"));
760
771
  case 11:
761
- expectedBase64 = _context5.v;
762
- _context5.n = 12;
772
+ expectedBase64 = _context4.v;
773
+ _context4.n = 12;
763
774
  return (0, _reporter.readImageAsBase64)("".concat(pathWithoutEnd, "-diff.png"));
764
775
  case 12:
765
- diffBase64 = _context5.v;
776
+ diffBase64 = _context4.v;
766
777
  diffName = attachment.name.replace(_utils.diffEndRegexp, "");
767
778
  this.allureRuntime.writeAttachment(testUuid, undefined, diffName, Buffer.from(JSON.stringify({
768
779
  expected: expectedBase64,
@@ -775,7 +786,7 @@ var AllureReporter = exports.AllureReporter = /*#__PURE__*/function () {
775
786
  });
776
787
  this.processedDiffs.push(pathWithoutEnd);
777
788
  case 13:
778
- return _context5.a(2);
789
+ return _context4.a(2);
779
790
  }
780
791
  }, _callee4, this);
781
792
  }));