@swmansion/argent 0.28.1-next.4 → 0.28.1-next.5
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/tool-server.cjs +8 -2
- package/package.json +1 -1
package/dist/tool-server.cjs
CHANGED
|
@@ -155741,7 +155741,7 @@ function formatScreenshotDiffSummary(result) {
|
|
|
155741
155741
|
const shownRegions = result.regions.slice(0, MAX_SUMMARY_REGIONS);
|
|
155742
155742
|
const coordinateSpace = coordinateSpaceForSummary(result.imageSize);
|
|
155743
155743
|
const lines = ["Screenshot diff summary", "", "Overall:"];
|
|
155744
|
-
lines.push(
|
|
155744
|
+
lines.push(statusLine(status));
|
|
155745
155745
|
if (result.sizeNormalization) {
|
|
155746
155746
|
const { baseline, current, comparedAt } = result.sizeNormalization;
|
|
155747
155747
|
lines.push(
|
|
@@ -155802,6 +155802,12 @@ function formatScreenshotDiffSummary(result) {
|
|
|
155802
155802
|
}
|
|
155803
155803
|
return lines.join("\n");
|
|
155804
155804
|
}
|
|
155805
|
+
function statusLine(status) {
|
|
155806
|
+
return `- status: ${status}`;
|
|
155807
|
+
}
|
|
155808
|
+
function summaryReportsDimensionMismatch(summary) {
|
|
155809
|
+
return summary.split("\n").includes(statusLine("dimension_mismatch"));
|
|
155810
|
+
}
|
|
155805
155811
|
function screenshotDiffStatus(result) {
|
|
155806
155812
|
if (result.dimensionMismatch) return "dimension_mismatch";
|
|
155807
155813
|
if (!Number.isFinite(result.totalPixels) || !Number.isFinite(result.differentPixels) || !Number.isFinite(result.mismatchPercentage)) {
|
|
@@ -158998,7 +159004,7 @@ var screenshotDiffTool = {
|
|
|
158998
159004
|
id: "screenshot-diff",
|
|
158999
159005
|
interaction: {
|
|
159000
159006
|
startedMsg: () => "Comparing screenshots",
|
|
159001
|
-
completedMsg: () => "Compared screenshots",
|
|
159007
|
+
completedMsg: ({ result }) => summaryReportsDimensionMismatch(result.summary) ? "Skipped comparison - screenshot dimensions differ" : "Compared screenshots",
|
|
159002
159008
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to compare screenshots: ${failureSignal2.error_code}`
|
|
159003
159009
|
},
|
|
159004
159010
|
description: `Compare two PNG screenshots and return a compact visual-diff summary.
|
package/package.json
CHANGED