@applitools/core-base
Advanced tools
Comparing version 1.1.35 to 1.1.36
@@ -392,3 +392,3 @@ "use strict"; | ||
} | ||
const reportPromise = report({ settings, logger }); | ||
await report({ settings, logger }); | ||
resultsPromise = req(`/api/sessions/running/${encodeURIComponent(test.testId)}`, { | ||
@@ -412,3 +412,2 @@ name: 'close', | ||
logger.log('Request "close" finished successfully with body', result); | ||
await reportPromise; | ||
return [result]; | ||
@@ -423,3 +422,3 @@ }); | ||
} | ||
const reportPromise = report({ settings, logger }); | ||
await report({ settings, logger }); | ||
resultsPromise = req(`/api/sessions/running/${encodeURIComponent(test.testId)}`, { | ||
@@ -437,3 +436,2 @@ name: 'abort', | ||
logger.log('Request "abort" finished successfully with body', result); | ||
await reportPromise; | ||
return [result]; | ||
@@ -440,0 +438,0 @@ }); |
@@ -48,6 +48,2 @@ "use strict"; | ||
const image = (0, image_1.makeImage)(target.image); | ||
if (image.height === 0 || image.width === 0) { | ||
await image.debug('image is empty, try to getObject'); | ||
await image.toObject(); | ||
} | ||
if ((settings === null || settings === void 0 ? void 0 : settings.normalization) || (settings === null || settings === void 0 ? void 0 : settings.region)) { | ||
@@ -69,4 +65,5 @@ await image.debug({ ...settings.debugImages, suffix: 'original' }); | ||
if ((_a = settings.normalization) === null || _a === void 0 ? void 0 : _a.limit) { | ||
const height = cropToHeightLimit(image, settings.normalization.limit); | ||
image.crop({ y: 0, x: 0, width: image.width, height }); | ||
const maxHeight = Math.min(image.height, settings.normalization.limit.maxImageArea / image.width, settings.normalization.limit.maxImageHeight); | ||
image.crop({ left: 0, right: 0, top: 0, bottom: image.height - maxHeight }); | ||
await image.debug({ ...settings.debugImages, suffix: 'limited' }); | ||
} | ||
@@ -81,8 +78,1 @@ } | ||
exports.transformTarget = transformTarget; | ||
function cropToHeightLimit(image, limit) { | ||
const { maxImageHeight, maxImageArea } = limit; | ||
if (image.height > maxImageHeight || image.height * image.width > maxImageArea) { | ||
return Math.min(maxImageArea / image.width, maxImageHeight); | ||
} | ||
return image.height; | ||
} |
{ | ||
"name": "@applitools/core-base", | ||
"version": "1.1.35", | ||
"version": "1.1.36", | ||
"homepage": "https://applitools.com", | ||
@@ -53,3 +53,3 @@ "bugs": { | ||
"dependencies": { | ||
"@applitools/image": "1.0.25", | ||
"@applitools/image": "1.0.26", | ||
"@applitools/logger": "1.1.45", | ||
@@ -60,4 +60,4 @@ "@applitools/req": "1.1.30", | ||
"devDependencies": { | ||
"@applitools/bongo": "^2.2.2", | ||
"@applitools/test-server": "^1.1.24", | ||
"@applitools/bongo": "^2.2.5", | ||
"@applitools/test-server": "^1.1.25", | ||
"@applitools/test-utils": "^1.5.12", | ||
@@ -64,0 +64,0 @@ "@types/mocha": "^9.1.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103277
1912
+ Added@applitools/image@1.0.26(transitive)
- Removed@applitools/image@1.0.25(transitive)
Updated@applitools/image@1.0.26