allure-playwright
Advanced tools
Comparing version
@@ -593,3 +593,3 @@ "use strict"; | ||
var _processAttachment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(testUuid, attachmentStepUuid, attachment) { | ||
var allureRuntimeMessage, message, parentUuid, pathWithoutEnd, actualBase64, expectedBase64, diffBase64, diffName; | ||
var allureRuntimeMessage, message, parentUuid, contentType, pathWithoutEnd, actualBase64, expectedBase64, diffBase64, diffName; | ||
return _regeneratorRuntime().wrap(function _callee4$(_context4) { | ||
@@ -641,3 +641,3 @@ while (1) switch (_context4.prev = _context4.next) { | ||
}); | ||
_context4.next = 23; | ||
_context4.next = 24; | ||
break; | ||
@@ -651,31 +651,31 @@ case 18: | ||
case 22: | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion | ||
contentType = attachment.name === "trace" && attachment.contentType === "application/zip" ? "application/vnd.allure.playwright-trace" : attachment.contentType; | ||
this.allureRuntime.writeAttachment(testUuid, parentUuid, attachment.name, attachment.path, { | ||
contentType: attachment.contentType | ||
contentType: contentType | ||
}); | ||
case 23: | ||
case 24: | ||
if (attachment.name.match(diffEndRegexp)) { | ||
_context4.next = 25; | ||
_context4.next = 26; | ||
break; | ||
} | ||
return _context4.abrupt("return"); | ||
case 25: | ||
case 26: | ||
pathWithoutEnd = attachment.path.replace(diffEndRegexp, ""); | ||
if (!this.processedDiffs.includes(pathWithoutEnd)) { | ||
_context4.next = 28; | ||
_context4.next = 29; | ||
break; | ||
} | ||
return _context4.abrupt("return"); | ||
case 28: | ||
_context4.next = 30; | ||
case 29: | ||
_context4.next = 31; | ||
return (0, _reporter.readImageAsBase64)("".concat(pathWithoutEnd, "-actual.png")); | ||
case 30: | ||
case 31: | ||
actualBase64 = _context4.sent; | ||
_context4.next = 33; | ||
_context4.next = 34; | ||
return (0, _reporter.readImageAsBase64)("".concat(pathWithoutEnd, "-expected.png")); | ||
case 33: | ||
case 34: | ||
expectedBase64 = _context4.sent; | ||
_context4.next = 36; | ||
_context4.next = 37; | ||
return (0, _reporter.readImageAsBase64)("".concat(pathWithoutEnd, "-diff.png")); | ||
case 36: | ||
case 37: | ||
diffBase64 = _context4.sent; | ||
@@ -693,3 +693,3 @@ diffName = attachment.name.replace(diffEndRegexp, ""); | ||
this.processedDiffs.push(pathWithoutEnd); | ||
case 40: | ||
case 41: | ||
case "end": | ||
@@ -696,0 +696,0 @@ return _context4.stop(); |
@@ -574,3 +574,3 @@ 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); } | ||
var _processAttachment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(testUuid, attachmentStepUuid, attachment) { | ||
var allureRuntimeMessage, message, parentUuid, pathWithoutEnd, actualBase64, expectedBase64, diffBase64, diffName; | ||
var allureRuntimeMessage, message, parentUuid, contentType, pathWithoutEnd, actualBase64, expectedBase64, diffBase64, diffName; | ||
return _regeneratorRuntime().wrap(function _callee4$(_context4) { | ||
@@ -622,3 +622,3 @@ while (1) switch (_context4.prev = _context4.next) { | ||
}); | ||
_context4.next = 23; | ||
_context4.next = 24; | ||
break; | ||
@@ -632,31 +632,31 @@ case 18: | ||
case 22: | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion | ||
contentType = attachment.name === "trace" && attachment.contentType === "application/zip" ? "application/vnd.allure.playwright-trace" : attachment.contentType; | ||
this.allureRuntime.writeAttachment(testUuid, parentUuid, attachment.name, attachment.path, { | ||
contentType: attachment.contentType | ||
contentType: contentType | ||
}); | ||
case 23: | ||
case 24: | ||
if (attachment.name.match(diffEndRegexp)) { | ||
_context4.next = 25; | ||
_context4.next = 26; | ||
break; | ||
} | ||
return _context4.abrupt("return"); | ||
case 25: | ||
case 26: | ||
pathWithoutEnd = attachment.path.replace(diffEndRegexp, ""); | ||
if (!this.processedDiffs.includes(pathWithoutEnd)) { | ||
_context4.next = 28; | ||
_context4.next = 29; | ||
break; | ||
} | ||
return _context4.abrupt("return"); | ||
case 28: | ||
_context4.next = 30; | ||
case 29: | ||
_context4.next = 31; | ||
return readImageAsBase64("".concat(pathWithoutEnd, "-actual.png")); | ||
case 30: | ||
case 31: | ||
actualBase64 = _context4.sent; | ||
_context4.next = 33; | ||
_context4.next = 34; | ||
return readImageAsBase64("".concat(pathWithoutEnd, "-expected.png")); | ||
case 33: | ||
case 34: | ||
expectedBase64 = _context4.sent; | ||
_context4.next = 36; | ||
_context4.next = 37; | ||
return readImageAsBase64("".concat(pathWithoutEnd, "-diff.png")); | ||
case 36: | ||
case 37: | ||
diffBase64 = _context4.sent; | ||
@@ -674,3 +674,3 @@ diffName = attachment.name.replace(diffEndRegexp, ""); | ||
this.processedDiffs.push(pathWithoutEnd); | ||
case 40: | ||
case 41: | ||
case "end": | ||
@@ -677,0 +677,0 @@ return _context4.stop(); |
{ | ||
"name": "allure-playwright", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "Allure Playwright integration", | ||
@@ -64,3 +64,3 @@ "keywords": [ | ||
"dependencies": { | ||
"allure-js-commons": "3.2.0" | ||
"allure-js-commons": "3.2.1" | ||
}, | ||
@@ -82,5 +82,5 @@ "devDependencies": { | ||
"allure-commandline": "^2.29.0", | ||
"allure-vitest": "3.2.0", | ||
"allure-vitest": "3.2.1", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-config-prettier": "^10.0.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
@@ -87,0 +87,0 @@ "eslint-plugin-jsdoc": "^50.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
366813
0.17%+ Added
- Removed
Updated