@testivai/witness 2.5.0 → 2.6.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/README.md +9 -2
- package/dist/baselines/store.d.ts +14 -0
- package/dist/baselines/store.d.ts.map +1 -1
- package/dist/baselines/store.js +12 -4
- package/dist/baselines/store.js.map +1 -1
- package/dist/capture/element-map.d.ts +23 -2
- package/dist/capture/element-map.d.ts.map +1 -1
- package/dist/capture/element-map.js +102 -4
- package/dist/capture/element-map.js.map +1 -1
- package/dist/capture/environment.d.ts +26 -0
- package/dist/capture/environment.d.ts.map +1 -1
- package/dist/capture/environment.js +4 -0
- package/dist/capture/environment.js.map +1 -1
- package/dist/capture/health-limits.d.ts +14 -0
- package/dist/capture/health-limits.d.ts.map +1 -0
- package/dist/capture/health-limits.js +17 -0
- package/dist/capture/health-limits.js.map +1 -0
- package/dist/capture/health.d.ts +124 -0
- package/dist/capture/health.d.ts.map +1 -0
- package/dist/capture/health.js +327 -0
- package/dist/capture/health.js.map +1 -0
- package/dist/capture/native-app.d.ts +77 -0
- package/dist/capture/native-app.d.ts.map +1 -0
- package/dist/capture/native-app.js +172 -0
- package/dist/capture/native-app.js.map +1 -0
- package/dist/capture/shard.d.ts +17 -0
- package/dist/capture/shard.d.ts.map +1 -1
- package/dist/capture/shard.js +8 -1
- package/dist/capture/shard.js.map +1 -1
- package/dist/commands/approve.d.ts.map +1 -1
- package/dist/commands/approve.js +20 -0
- package/dist/commands/approve.js.map +1 -1
- package/dist/commands/merge-captures.d.ts.map +1 -1
- package/dist/commands/merge-captures.js +10 -0
- package/dist/commands/merge-captures.js.map +1 -1
- package/dist/config/local-config.d.ts +13 -0
- package/dist/config/local-config.d.ts.map +1 -1
- package/dist/config/local-config.js.map +1 -1
- package/dist/config/validate-config.d.ts.map +1 -1
- package/dist/config/validate-config.js +10 -0
- package/dist/config/validate-config.js.map +1 -1
- package/dist/diff/attribution.d.ts +16 -2
- package/dist/diff/attribution.d.ts.map +1 -1
- package/dist/diff/attribution.js +5 -4
- package/dist/diff/attribution.js.map +1 -1
- package/dist/diff/dom-diff.d.ts.map +1 -1
- package/dist/diff/dom-diff.js +7 -1
- package/dist/diff/dom-diff.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/dist/report/compare.d.ts +11 -1
- package/dist/report/compare.d.ts.map +1 -1
- package/dist/report/compare.js +86 -15
- package/dist/report/compare.js.map +1 -1
- package/dist/report/environment.d.ts.map +1 -1
- package/dist/report/environment.js +25 -2
- package/dist/report/environment.js.map +1 -1
- package/dist/report/generator.d.ts +15 -2
- package/dist/report/generator.d.ts.map +1 -1
- package/dist/report/generator.js +15 -2
- package/dist/report/generator.js.map +1 -1
- package/dist/report/health.d.ts +115 -0
- package/dist/report/health.d.ts.map +1 -0
- package/dist/report/health.js +279 -0
- package/dist/report/health.js.map +1 -0
- package/dist/report/index.d.ts +5 -1
- package/dist/report/index.d.ts.map +1 -1
- package/dist/report/index.js +15 -1
- package/dist/report/index.js.map +1 -1
- package/dist/report/results.d.ts +40 -1
- package/dist/report/results.d.ts.map +1 -1
- package/dist/report/shift-check.d.ts +40 -0
- package/dist/report/shift-check.d.ts.map +1 -0
- package/dist/report/shift-check.js +109 -0
- package/dist/report/shift-check.js.map +1 -0
- package/dist/report/template.d.ts.map +1 -1
- package/dist/report/template.js +53 -2
- package/dist/report/template.js.map +1 -1
- package/dist/report/thumbnail.d.ts +76 -0
- package/dist/report/thumbnail.d.ts.map +1 -0
- package/dist/report/thumbnail.js +166 -0
- package/dist/report/thumbnail.js.map +1 -0
- package/dist/report/validate.d.ts +5 -2
- package/dist/report/validate.d.ts.map +1 -1
- package/dist/report/validate.js +42 -2
- package/dist/report/validate.js.map +1 -1
- package/dist/standalone/run.d.ts +27 -1
- package/dist/standalone/run.d.ts.map +1 -1
- package/dist/standalone/run.js +105 -2
- package/dist/standalone/run.js.map +1 -1
- package/package.json +1 -1
|
@@ -49,7 +49,14 @@ const RENDERING_FIELDS = new Set([
|
|
|
49
49
|
'adapter.captureMethod',
|
|
50
50
|
'container',
|
|
51
51
|
'label',
|
|
52
|
+
'device.platform',
|
|
53
|
+
'device.osVersion',
|
|
54
|
+
'device.model',
|
|
55
|
+
'device.screen',
|
|
56
|
+
'device.density',
|
|
52
57
|
]);
|
|
58
|
+
/** A native app capture: the device draws the screen, not the machine running the tests. */
|
|
59
|
+
const isNativeApp = (env) => env.browser?.name === 'native-app';
|
|
53
60
|
/** Platforms whose os.release is the OS version (and so the text renderer). */
|
|
54
61
|
const RELEASE_IS_OS_VERSION = new Set(['darwin', 'win32']);
|
|
55
62
|
function flatten(env) {
|
|
@@ -81,6 +88,8 @@ function flatten(env) {
|
|
|
81
88
|
function isRenderingField(field, baseline, candidate) {
|
|
82
89
|
if (field.startsWith('render.'))
|
|
83
90
|
return true;
|
|
91
|
+
if (field.startsWith('os.') && isNativeApp(baseline) && isNativeApp(candidate))
|
|
92
|
+
return false;
|
|
84
93
|
if (field === 'os.release') {
|
|
85
94
|
return baseline.os.platform === candidate.os.platform && RELEASE_IS_OS_VERSION.has(candidate.os.platform);
|
|
86
95
|
}
|
|
@@ -116,19 +125,26 @@ const MECHANISMS = {
|
|
|
116
125
|
stitched: 'scroll and stitch',
|
|
117
126
|
firefox: 'Firefox',
|
|
118
127
|
webdriver: 'WebDriver',
|
|
128
|
+
appium: 'Appium',
|
|
119
129
|
};
|
|
130
|
+
const EXTENTS = { 'full-page': 'full page', viewport: 'viewport', screen: 'full screen' };
|
|
120
131
|
/** "full-page:cdp" → "full page (CDP)"; an unknown method passes through. */
|
|
121
132
|
function describeCaptureMethod(method) {
|
|
122
|
-
const m = /^(full-page|viewport):([a-z0-9-]+)$/.exec(method);
|
|
133
|
+
const m = /^(full-page|viewport|screen):([a-z0-9-]+)$/.exec(method);
|
|
123
134
|
if (!m)
|
|
124
135
|
return method;
|
|
125
|
-
return `${m[1]
|
|
136
|
+
return `${EXTENTS[m[1]]} (${MECHANISMS[m[2]] ?? m[2]})`;
|
|
126
137
|
}
|
|
127
138
|
/** The order changes are listed in: what renders first, context last. */
|
|
128
139
|
const ORDER = [
|
|
129
140
|
'browser',
|
|
130
141
|
'browser.channel',
|
|
131
142
|
'browser.headless',
|
|
143
|
+
'device.platform',
|
|
144
|
+
'device.model',
|
|
145
|
+
'device.osVersion',
|
|
146
|
+
'device.screen',
|
|
147
|
+
'device.density',
|
|
132
148
|
'os.platform',
|
|
133
149
|
'os.distro',
|
|
134
150
|
'os.release',
|
|
@@ -155,6 +171,13 @@ const LABELS = {
|
|
|
155
171
|
'render.reducedMotion': 'reduced motion',
|
|
156
172
|
'render.locale': 'locale',
|
|
157
173
|
'render.timezone': 'time zone',
|
|
174
|
+
'device.platform': 'device platform',
|
|
175
|
+
'device.model': 'device',
|
|
176
|
+
'device.osVersion': 'device OS',
|
|
177
|
+
'device.screen': 'screen',
|
|
178
|
+
'device.density': 'density',
|
|
179
|
+
'device.name': 'device name',
|
|
180
|
+
'device.automation': 'Appium driver',
|
|
158
181
|
'ci.provider': 'CI',
|
|
159
182
|
'ci.runnerImage': 'runner image',
|
|
160
183
|
project: 'project',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/report/environment.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AA2FH,4CAiBC;AAWD,sDAIC;AA8CD,8DA6CC;AAcD,4CAQC;AAGD,8DAIC;AAmBD,8CAqBC;AAiBD,0DAYC;AASD,sDAkBC;AAhVD,6CAA8D;AAuB9D,0EAA0E;AAC1E,MAAM,iBAAiB,GAA2B,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC;AAE3G,wDAAwD;AACxD,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,cAAc;IACd,iBAAiB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CAAC;IACjM,CAAC;IACD,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CACL,GAAG,IAAI,QAAQ,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,wDAAwD;QACzI,GAAG,IAAI,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,sDAAsD,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,OAAO,CACtK,CAAC;AACJ,CAAC"}
|
|
@@ -36,7 +36,20 @@ export interface GenerateReportOptions {
|
|
|
36
36
|
* @returns The report data
|
|
37
37
|
*/
|
|
38
38
|
/**
|
|
39
|
-
* results.json schema version. 2.
|
|
39
|
+
* results.json schema version. 2.9.0 adds native app captures (experimental):
|
|
40
|
+
* capture method `screen:appium` and the `device` section of a snapshot's
|
|
41
|
+
* `environment.baseline` / `environment.candidate` (platform, OS version,
|
|
42
|
+
* model, name, Appium driver, screen, density), with `browser.name:
|
|
43
|
+
* "native-app"`. 2.8.0 added `captureHealth.sameOnBothSides`:
|
|
44
|
+
* true when both sides are unhealthy with the same failures (a permanently
|
|
45
|
+
* broken asset), and the pass tolerances (maxDiffPercent, maxDiffPixels,
|
|
46
|
+
* shiftTolerance) then still apply; noise auto-pass never does. 2.7.0 added capture health: per-snapshot
|
|
47
|
+
* `captureHealth` (what failed to load in the baseline and the current
|
|
48
|
+
* capture, which side is unhealthy, and why in plain words), present when
|
|
49
|
+
* either side recorded `health` in its metadata.json. 2.6.0 added per-snapshot
|
|
50
|
+
* `thumbPath`: thumb.png, the changed area of the baseline, the current
|
|
51
|
+
* capture and the diff side by side (at most 800×400 px), for 'changed'
|
|
52
|
+
* snapshots. 2.5.0 added capture provenance: per-snapshot
|
|
40
53
|
* `environment` (what changed between the environment the baseline was
|
|
41
54
|
* captured in and the current capture's: `delta`, `renderingDelta`, both
|
|
42
55
|
* blocks when they differ, and `policy: "strict"` when that policy made the
|
|
@@ -50,7 +63,7 @@ export interface GenerateReportOptions {
|
|
|
50
63
|
* diff bounding boxes), `masks[]` (applied masks with their source — the
|
|
51
64
|
* audit trail), and `maskWarnings[]`. All additive.
|
|
52
65
|
*/
|
|
53
|
-
export declare const RESULTS_SCHEMA_VERSION = "2.
|
|
66
|
+
export declare const RESULTS_SCHEMA_VERSION = "2.9.0";
|
|
54
67
|
/**
|
|
55
68
|
* Write results.json for an already-computed set of snapshot results.
|
|
56
69
|
* Exposed for callers that manage comparison and rendering separately.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/report/generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAmC,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAiB,cAAc,EAAC,MAAM,WAAW,CAAC;AAO1E,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/report/generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAmC,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAiB,cAAc,EAAC,MAAM,WAAW,CAAC;AAO1E,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,cAAc,EAAE,EACzB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,MAA+B,GACvC,IAAI,CAGN;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,UAAU,CAqFzE;AA0BD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAoB3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOzF"}
|
package/dist/report/generator.js
CHANGED
|
@@ -65,7 +65,20 @@ const environment_2 = require("./environment");
|
|
|
65
65
|
* @returns The report data
|
|
66
66
|
*/
|
|
67
67
|
/**
|
|
68
|
-
* results.json schema version. 2.
|
|
68
|
+
* results.json schema version. 2.9.0 adds native app captures (experimental):
|
|
69
|
+
* capture method `screen:appium` and the `device` section of a snapshot's
|
|
70
|
+
* `environment.baseline` / `environment.candidate` (platform, OS version,
|
|
71
|
+
* model, name, Appium driver, screen, density), with `browser.name:
|
|
72
|
+
* "native-app"`. 2.8.0 added `captureHealth.sameOnBothSides`:
|
|
73
|
+
* true when both sides are unhealthy with the same failures (a permanently
|
|
74
|
+
* broken asset), and the pass tolerances (maxDiffPercent, maxDiffPixels,
|
|
75
|
+
* shiftTolerance) then still apply; noise auto-pass never does. 2.7.0 added capture health: per-snapshot
|
|
76
|
+
* `captureHealth` (what failed to load in the baseline and the current
|
|
77
|
+
* capture, which side is unhealthy, and why in plain words), present when
|
|
78
|
+
* either side recorded `health` in its metadata.json. 2.6.0 added per-snapshot
|
|
79
|
+
* `thumbPath`: thumb.png, the changed area of the baseline, the current
|
|
80
|
+
* capture and the diff side by side (at most 800×400 px), for 'changed'
|
|
81
|
+
* snapshots. 2.5.0 added capture provenance: per-snapshot
|
|
69
82
|
* `environment` (what changed between the environment the baseline was
|
|
70
83
|
* captured in and the current capture's: `delta`, `renderingDelta`, both
|
|
71
84
|
* blocks when they differ, and `policy: "strict"` when that policy made the
|
|
@@ -79,7 +92,7 @@ const environment_2 = require("./environment");
|
|
|
79
92
|
* diff bounding boxes), `masks[]` (applied masks with their source — the
|
|
80
93
|
* audit trail), and `maskWarnings[]`. All additive.
|
|
81
94
|
*/
|
|
82
|
-
exports.RESULTS_SCHEMA_VERSION = '2.
|
|
95
|
+
exports.RESULTS_SCHEMA_VERSION = '2.9.0';
|
|
83
96
|
/**
|
|
84
97
|
* Write results.json for an already-computed set of snapshot results.
|
|
85
98
|
* Exposed for callers that manage comparison and rendering separately.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/report/generator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/report/generator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EH,0CAOC;AAED,wCAqFC;AAm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,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAElC,IAAI,GAAW,CAAC;IAChB,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1B,GAAG,GAAG,SAAS,GAAG,GAAG,CAAC;IACxB,CAAC;SAAM,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QAChC,GAAG,GAAG,aAAa,GAAG,GAAG,CAAC;IAC5B,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,aAAa,GAAG,GAAG,CAAC;IAC5B,CAAC;IAED,IAAA,oBAAI,EAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;QAChB,IAAI,GAAG,EAAE,CAAC;YACR,yDAAyD;QAC3D,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TestivAI Report — capture health: when a capture is unhealthy, and the words
|
|
3
|
+
*
|
|
4
|
+
* A capture is UNHEALTHY when what it shows is not the page as built: web
|
|
5
|
+
* fonts were still loading, a web font failed to load (the page rendered with
|
|
6
|
+
* a fallback font), a stylesheet failed to load, or a stylesheet request
|
|
7
|
+
* answered 400 or more. Such a diff is a glitch of the capture or a broken
|
|
8
|
+
* asset, never render noise: the DOM can be identical and the computed styles
|
|
9
|
+
* match (the style digest hashes the declared font-family, not the font that
|
|
10
|
+
* rendered), so without this the diff read "likely render noise".
|
|
11
|
+
*
|
|
12
|
+
* A font request that answered 400 or more makes the capture unhealthy only
|
|
13
|
+
* with a web font that failed, or with no Font Loading API to say none did: a
|
|
14
|
+
* face whose first `src` 404s and whose next one loads rendered as built.
|
|
15
|
+
*
|
|
16
|
+
* Broken images, failed scripts and other requests, and a failed font request
|
|
17
|
+
* while no web font failed, are WARNINGS: recorded and shown, but they do not
|
|
18
|
+
* make a capture unhealthy on their own. A broken image shows as a changed
|
|
19
|
+
* region where it sits, which the pixel and DOM layers already read; telling a
|
|
20
|
+
* broken image that matters from a tracking pixel needs its position compared
|
|
21
|
+
* with the diff's regions (a follow-up).
|
|
22
|
+
*
|
|
23
|
+
* An unhealthy capture is never render noise, and no pass criterion passes
|
|
24
|
+
* one whose pixels differ, with one exception: when both sides failed in
|
|
25
|
+
* exactly the same way (a permanently broken asset, `sameOnBothSides`), the
|
|
26
|
+
* pass tolerances (maxDiffPercent, maxDiffPixels, shiftTolerance) still
|
|
27
|
+
* apply, because both images miss the same assets. Noise auto-pass never does.
|
|
28
|
+
*
|
|
29
|
+
* Deterministic and read from results.json fields only (`captureHealth`), so
|
|
30
|
+
* the report, @testivai/mcp and the GitHub Action agree. No Node dependencies.
|
|
31
|
+
*/
|
|
32
|
+
import type { CaptureHealth } from '../capture/health';
|
|
33
|
+
import type { SnapshotCaptureHealth } from './results';
|
|
34
|
+
export interface HealthAssessment {
|
|
35
|
+
/** True when the capture does not show the page as built (see the module comment). */
|
|
36
|
+
unhealthy: boolean;
|
|
37
|
+
/** What made it unhealthy, short: "a failed web font", "a failed stylesheet", "web fonts still loading". */
|
|
38
|
+
problems: string[];
|
|
39
|
+
/** Why it is unhealthy, in plain words, most important first. */
|
|
40
|
+
reasons: string[];
|
|
41
|
+
/** What else failed to load (images, scripts, other requests, a font file a face fell back from): shown, not unhealthy. */
|
|
42
|
+
warnings: string[];
|
|
43
|
+
}
|
|
44
|
+
/** Judge one capture's health: unhealthy or not, why, and what else failed. */
|
|
45
|
+
export declare function assessHealth(health: CaptureHealth): HealthAssessment;
|
|
46
|
+
/**
|
|
47
|
+
* Whether two captures failed in exactly the same way, on everything that can
|
|
48
|
+
* make a capture unhealthy: the same web font faces (family, weight, style),
|
|
49
|
+
* the same stylesheets, and the same stylesheet and font requests (host and
|
|
50
|
+
* path, and status). A permanently broken asset (a font that 404s on every
|
|
51
|
+
* run) then shows in both images alike, so the diff compares like with like.
|
|
52
|
+
*
|
|
53
|
+
* Never the same when web fonts were still loading on either side (what
|
|
54
|
+
* rendered depends on timing), when the two sides could not see the same
|
|
55
|
+
* things (Font Loading API or request statuses available on one side only),
|
|
56
|
+
* or when a list may have been cut at HEALTH_LIMITS.list: what is not
|
|
57
|
+
* recorded cannot be proven the same. Broken images and failed scripts and
|
|
58
|
+
* other requests are warnings and do not count.
|
|
59
|
+
*/
|
|
60
|
+
export declare function sameHealthFailures(a: CaptureHealth, b: CaptureHealth): boolean;
|
|
61
|
+
/** Prefix of a reason or warning that is the baseline's, in results.json. */
|
|
62
|
+
export declare const BASELINE_HEALTH_PREFIX = "baseline: ";
|
|
63
|
+
/**
|
|
64
|
+
* The per-snapshot `captureHealth` (schema 2.7.0): both recorded blocks, which
|
|
65
|
+
* side is unhealthy, and the reasons and warnings (the baseline's marked
|
|
66
|
+
* "baseline: "), the current capture's first. Undefined when neither side
|
|
67
|
+
* recorded health: not checked, which is neither healthy nor unhealthy.
|
|
68
|
+
* `sameOnBothSides: true` (schema 2.8.0) when both sides are unhealthy with
|
|
69
|
+
* the same failures (sameHealthFailures): the pass tolerances then still
|
|
70
|
+
* apply, noise auto-pass never does.
|
|
71
|
+
*/
|
|
72
|
+
export declare function snapshotCaptureHealth(baseline: CaptureHealth | null, candidate: CaptureHealth | null): SnapshotCaptureHealth | undefined;
|
|
73
|
+
/** The fields of a snapshot result the health rules read. */
|
|
74
|
+
export interface HealthSnapshotInput {
|
|
75
|
+
captureHealth?: Pick<SnapshotCaptureHealth, 'unhealthy' | 'sameOnBothSides'> | null;
|
|
76
|
+
}
|
|
77
|
+
/** Whether either side of the snapshot was captured unhealthy. */
|
|
78
|
+
export declare function isUnhealthyCapture(snapshot: HealthSnapshotInput): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the pass tolerances (maxDiffPercent, maxDiffPixels, shiftTolerance)
|
|
81
|
+
* may judge the snapshot: always for a healthy or unrecorded one, and for an
|
|
82
|
+
* unhealthy one only when both sides failed the same way (sameOnBothSides).
|
|
83
|
+
* Noise auto-pass never judges an unhealthy one: see isUnhealthyCapture.
|
|
84
|
+
*/
|
|
85
|
+
export declare function healthAllowsTolerances(snapshot: HealthSnapshotInput): boolean;
|
|
86
|
+
/** What to do about an unhealthy current capture. */
|
|
87
|
+
export declare const UNHEALTHY_CAPTURE_NEXT = "an unhealthy capture is a glitch of the capture or a broken asset, not render noise: fix the page, the server or the test and re-run; never approve it as a baseline";
|
|
88
|
+
/** What to do about an unhealthy baseline. */
|
|
89
|
+
export declare const UNHEALTHY_BASELINE_NEXT = "re-baseline from a healthy run";
|
|
90
|
+
/** What to do when both sides failed the same way (sameOnBothSides). */
|
|
91
|
+
export declare const SAME_FAILURES_NEXT = "the same assets failed in both captures, so the pass tolerances (maxDiffPercent, maxDiffPixels, shiftTolerance) still apply, but this is never render noise and noise auto-pass never applies: fix the broken asset, then re-baseline from a healthy run";
|
|
92
|
+
export interface CaptureHealthReading {
|
|
93
|
+
side: 'candidate' | 'baseline' | 'both';
|
|
94
|
+
/** Present (true) when both sides failed the same way: the tolerances still apply, noise auto-pass never does. */
|
|
95
|
+
sameOnBothSides?: true;
|
|
96
|
+
/** The reasons, in plain words: the current capture's, then the baseline called out. */
|
|
97
|
+
detail: string;
|
|
98
|
+
/** What to do next. */
|
|
99
|
+
next: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The "Unhealthy capture" reading every surface shows, or null when neither
|
|
103
|
+
* side is unhealthy. An unhealthy current capture names what failed and says
|
|
104
|
+
* it is a glitch or a broken asset to fix, never to approve; an unhealthy
|
|
105
|
+
* baseline is called out on every compare against it, with "re-baseline from
|
|
106
|
+
* a healthy run".
|
|
107
|
+
*/
|
|
108
|
+
export declare function captureHealthReading(health: SnapshotCaptureHealth | null | undefined): CaptureHealthReading | null;
|
|
109
|
+
/**
|
|
110
|
+
* The warning for approving a capture that is unhealthy (`testivai approve`,
|
|
111
|
+
* the approve action's reply), or null for a healthy capture or one that
|
|
112
|
+
* recorded no health. Approving still happens: the human decides.
|
|
113
|
+
*/
|
|
114
|
+
export declare function approveHealthWarning(health: CaptureHealth | null | undefined): string | null;
|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G,OAAO,CAG7E;AAED,qDAAqD;AACrD,eAAO,MAAM,sBAAsB,yKACqI,CAAC;AAEzK,8CAA8C;AAC9C,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AAExE,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,6PAC6N,CAAC;AAE7P,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;IACxC,kHAAkH;IAClH,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAgBD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,GAAG,SAAS,GAAG,oBAAoB,GAAG,IAAI,CAiBlH;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAQ5F"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TestivAI Report — capture health: when a capture is unhealthy, and the words
|
|
4
|
+
*
|
|
5
|
+
* A capture is UNHEALTHY when what it shows is not the page as built: web
|
|
6
|
+
* fonts were still loading, a web font failed to load (the page rendered with
|
|
7
|
+
* a fallback font), a stylesheet failed to load, or a stylesheet request
|
|
8
|
+
* answered 400 or more. Such a diff is a glitch of the capture or a broken
|
|
9
|
+
* asset, never render noise: the DOM can be identical and the computed styles
|
|
10
|
+
* match (the style digest hashes the declared font-family, not the font that
|
|
11
|
+
* rendered), so without this the diff read "likely render noise".
|
|
12
|
+
*
|
|
13
|
+
* A font request that answered 400 or more makes the capture unhealthy only
|
|
14
|
+
* with a web font that failed, or with no Font Loading API to say none did: a
|
|
15
|
+
* face whose first `src` 404s and whose next one loads rendered as built.
|
|
16
|
+
*
|
|
17
|
+
* Broken images, failed scripts and other requests, and a failed font request
|
|
18
|
+
* while no web font failed, are WARNINGS: recorded and shown, but they do not
|
|
19
|
+
* make a capture unhealthy on their own. A broken image shows as a changed
|
|
20
|
+
* region where it sits, which the pixel and DOM layers already read; telling a
|
|
21
|
+
* broken image that matters from a tracking pixel needs its position compared
|
|
22
|
+
* with the diff's regions (a follow-up).
|
|
23
|
+
*
|
|
24
|
+
* An unhealthy capture is never render noise, and no pass criterion passes
|
|
25
|
+
* one whose pixels differ, with one exception: when both sides failed in
|
|
26
|
+
* exactly the same way (a permanently broken asset, `sameOnBothSides`), the
|
|
27
|
+
* pass tolerances (maxDiffPercent, maxDiffPixels, shiftTolerance) still
|
|
28
|
+
* apply, because both images miss the same assets. Noise auto-pass never does.
|
|
29
|
+
*
|
|
30
|
+
* Deterministic and read from results.json fields only (`captureHealth`), so
|
|
31
|
+
* the report, @testivai/mcp and the GitHub Action agree. No Node dependencies.
|
|
32
|
+
*/
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.SAME_FAILURES_NEXT = exports.UNHEALTHY_BASELINE_NEXT = exports.UNHEALTHY_CAPTURE_NEXT = exports.BASELINE_HEALTH_PREFIX = void 0;
|
|
35
|
+
exports.assessHealth = assessHealth;
|
|
36
|
+
exports.sameHealthFailures = sameHealthFailures;
|
|
37
|
+
exports.snapshotCaptureHealth = snapshotCaptureHealth;
|
|
38
|
+
exports.isUnhealthyCapture = isUnhealthyCapture;
|
|
39
|
+
exports.healthAllowsTolerances = healthAllowsTolerances;
|
|
40
|
+
exports.captureHealthReading = captureHealthReading;
|
|
41
|
+
exports.approveHealthWarning = approveHealthWarning;
|
|
42
|
+
const health_limits_1 = require("../capture/health-limits");
|
|
43
|
+
/** Items named per kind before the rest are counted. */
|
|
44
|
+
const NAMED = 3;
|
|
45
|
+
const plural = (n, noun) => `${n} ${noun}${n === 1 ? '' : 's'}`;
|
|
46
|
+
/** "stylesheet example.com/a.css returned 404", or "… failed to load (net::ERR_…)" without a status. */
|
|
47
|
+
function requestLine(noun, entry) {
|
|
48
|
+
const url = entry.url || '(no URL)';
|
|
49
|
+
if (entry.status > 0)
|
|
50
|
+
return `${noun} ${url} returned ${entry.status}`;
|
|
51
|
+
return `${noun} ${url} failed to load${entry.error ? ` (${entry.error})` : ''}`;
|
|
52
|
+
}
|
|
53
|
+
/** One line per named request, then the count of the rest. */
|
|
54
|
+
function requestLines(noun, entries, total) {
|
|
55
|
+
const shown = entries.slice(0, NAMED);
|
|
56
|
+
const lines = shown.map((e) => requestLine(noun, e));
|
|
57
|
+
const rest = total - shown.length;
|
|
58
|
+
if (rest > 0)
|
|
59
|
+
lines.push(`${plural(rest, `more ${noun}`)} failed to load`);
|
|
60
|
+
return lines;
|
|
61
|
+
}
|
|
62
|
+
/** Elements that failed (stylesheets, images), named with their request's status when it is known. */
|
|
63
|
+
function elementLines(noun, urls, total, requests) {
|
|
64
|
+
const byUrl = new Map(requests.map((e) => [e.url, e]));
|
|
65
|
+
const shown = urls.slice(0, NAMED);
|
|
66
|
+
const lines = shown.map((url) => {
|
|
67
|
+
const request = byUrl.get(url);
|
|
68
|
+
return request ? requestLine(noun, request) : `${noun} ${url || '(no URL)'} did not load`;
|
|
69
|
+
});
|
|
70
|
+
const rest = total - shown.length;
|
|
71
|
+
if (rest > 0)
|
|
72
|
+
lines.push(`${plural(rest, `more ${noun}`)} did not load`);
|
|
73
|
+
return lines;
|
|
74
|
+
}
|
|
75
|
+
function fontLine(families) {
|
|
76
|
+
const quoted = families.map((f) => `'${f}'`);
|
|
77
|
+
if (quoted.length === 1)
|
|
78
|
+
return `web font ${quoted[0]} failed to load, so the page rendered with a fallback font`;
|
|
79
|
+
const names = quoted.length === 2 ? `${quoted[0]} and ${quoted[1]}` : `${quoted.slice(0, 2).join(', ')} and ${quoted.length - 2} more`;
|
|
80
|
+
return `web fonts ${names} failed to load, so the page rendered with fallback fonts`;
|
|
81
|
+
}
|
|
82
|
+
/** Judge one capture's health: unhealthy or not, why, and what else failed. */
|
|
83
|
+
function assessHealth(health) {
|
|
84
|
+
const reasons = [];
|
|
85
|
+
const warnings = [];
|
|
86
|
+
const problems = new Set();
|
|
87
|
+
const failed = health.resources.failed;
|
|
88
|
+
if (health.fonts.status === 'loading') {
|
|
89
|
+
reasons.push('web fonts were still loading when the page was captured');
|
|
90
|
+
problems.add('web fonts still loading');
|
|
91
|
+
}
|
|
92
|
+
const families = [...new Set(health.fonts.failed.map((f) => f.family))];
|
|
93
|
+
if (families.length > 0) {
|
|
94
|
+
reasons.push(fontLine(families));
|
|
95
|
+
problems.add('a failed web font');
|
|
96
|
+
}
|
|
97
|
+
// A failed font request on its own is not a fallback font: the face can
|
|
98
|
+
// load from its next `src`. Unhealthy with a face that failed, or when the
|
|
99
|
+
// page had no Font Loading API to say whether one did.
|
|
100
|
+
if (failed.font && failed.font.count > 0) {
|
|
101
|
+
const lines = requestLines('font file', failed.font.entries, failed.font.count);
|
|
102
|
+
if (families.length > 0 || health.fonts.status === 'unavailable') {
|
|
103
|
+
reasons.push(...lines);
|
|
104
|
+
problems.add('a failed web font');
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
warnings.push(...lines);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// A failed <link> stylesheet is named once, with its request's status when
|
|
111
|
+
// the request is known; a failed stylesheet request with no <link> (an
|
|
112
|
+
// @import) gets its own line.
|
|
113
|
+
const css = failed.css ?? { count: 0, entries: [] };
|
|
114
|
+
if (health.stylesheets.failed > 0) {
|
|
115
|
+
reasons.push(...elementLines('stylesheet', health.stylesheets.urls, health.stylesheets.failed, css.entries));
|
|
116
|
+
problems.add('a failed stylesheet');
|
|
117
|
+
}
|
|
118
|
+
const linked = new Set(health.stylesheets.urls);
|
|
119
|
+
const unlinked = css.entries.filter((e) => !linked.has(e.url));
|
|
120
|
+
const unlinkedCount = css.count - (css.entries.length - unlinked.length);
|
|
121
|
+
if (unlinkedCount > 0) {
|
|
122
|
+
reasons.push(...requestLines('stylesheet', unlinked, unlinkedCount));
|
|
123
|
+
problems.add('a failed stylesheet');
|
|
124
|
+
}
|
|
125
|
+
const img = failed.img ?? { count: 0, entries: [] };
|
|
126
|
+
if (health.images.broken > 0)
|
|
127
|
+
warnings.push(...elementLines('image', health.images.urls, health.images.broken, img.entries));
|
|
128
|
+
const shownImages = new Set(health.images.urls);
|
|
129
|
+
const otherImages = img.entries.filter((e) => !shownImages.has(e.url));
|
|
130
|
+
const otherImageCount = img.count - (img.entries.length - otherImages.length);
|
|
131
|
+
if (otherImageCount > 0)
|
|
132
|
+
warnings.push(...requestLines('image', otherImages, otherImageCount));
|
|
133
|
+
if (failed.script && failed.script.count > 0)
|
|
134
|
+
warnings.push(...requestLines('script', failed.script.entries, failed.script.count));
|
|
135
|
+
if (failed.other && failed.other.count > 0)
|
|
136
|
+
warnings.push(...requestLines('request', failed.other.entries, failed.other.count));
|
|
137
|
+
return { unhealthy: problems.size > 0, problems: [...problems], reasons, warnings };
|
|
138
|
+
}
|
|
139
|
+
/** One failed request, as compared between the two sides: host and path, and the status (the error text varies run to run). */
|
|
140
|
+
const requestKey = (e) => `${e.url}\u0000${e.status}`;
|
|
141
|
+
/** The sorted keys of a list, or null when the list may have been cut (a count above its entries, or a list at the cap). */
|
|
142
|
+
function completeKeys(items, total, key) {
|
|
143
|
+
if (items.length !== total || items.length >= health_limits_1.HEALTH_LIMITS.list)
|
|
144
|
+
return null;
|
|
145
|
+
return items.map(key).sort();
|
|
146
|
+
}
|
|
147
|
+
const sameKeys = (a, b) => a !== null && b !== null && a.length === b.length && a.every((k, i) => k === b[i]);
|
|
148
|
+
/**
|
|
149
|
+
* Whether two captures failed in exactly the same way, on everything that can
|
|
150
|
+
* make a capture unhealthy: the same web font faces (family, weight, style),
|
|
151
|
+
* the same stylesheets, and the same stylesheet and font requests (host and
|
|
152
|
+
* path, and status). A permanently broken asset (a font that 404s on every
|
|
153
|
+
* run) then shows in both images alike, so the diff compares like with like.
|
|
154
|
+
*
|
|
155
|
+
* Never the same when web fonts were still loading on either side (what
|
|
156
|
+
* rendered depends on timing), when the two sides could not see the same
|
|
157
|
+
* things (Font Loading API or request statuses available on one side only),
|
|
158
|
+
* or when a list may have been cut at HEALTH_LIMITS.list: what is not
|
|
159
|
+
* recorded cannot be proven the same. Broken images and failed scripts and
|
|
160
|
+
* other requests are warnings and do not count.
|
|
161
|
+
*/
|
|
162
|
+
function sameHealthFailures(a, b) {
|
|
163
|
+
if (a.fonts.status === 'loading' || b.fonts.status === 'loading')
|
|
164
|
+
return false;
|
|
165
|
+
if (a.fonts.status !== b.fonts.status || a.resources.status !== b.resources.status)
|
|
166
|
+
return false;
|
|
167
|
+
const fontKey = (f) => `${f.family}\u0000${f.weight}\u0000${f.style}`;
|
|
168
|
+
const fonts = (h) => completeKeys(h.fonts.failed, h.fonts.failed.length, fontKey);
|
|
169
|
+
const sheets = (h) => completeKeys(h.stylesheets.urls, h.stylesheets.failed, (u) => u);
|
|
170
|
+
const requests = (h, type) => {
|
|
171
|
+
const group = h.resources.failed[type] ?? { count: 0, entries: [] };
|
|
172
|
+
return completeKeys(group.entries, group.count, requestKey);
|
|
173
|
+
};
|
|
174
|
+
return (sameKeys(fonts(a), fonts(b)) &&
|
|
175
|
+
sameKeys(sheets(a), sheets(b)) &&
|
|
176
|
+
sameKeys(requests(a, 'css'), requests(b, 'css')) &&
|
|
177
|
+
sameKeys(requests(a, 'font'), requests(b, 'font')));
|
|
178
|
+
}
|
|
179
|
+
/** Prefix of a reason or warning that is the baseline's, in results.json. */
|
|
180
|
+
exports.BASELINE_HEALTH_PREFIX = 'baseline: ';
|
|
181
|
+
/**
|
|
182
|
+
* The per-snapshot `captureHealth` (schema 2.7.0): both recorded blocks, which
|
|
183
|
+
* side is unhealthy, and the reasons and warnings (the baseline's marked
|
|
184
|
+
* "baseline: "), the current capture's first. Undefined when neither side
|
|
185
|
+
* recorded health: not checked, which is neither healthy nor unhealthy.
|
|
186
|
+
* `sameOnBothSides: true` (schema 2.8.0) when both sides are unhealthy with
|
|
187
|
+
* the same failures (sameHealthFailures): the pass tolerances then still
|
|
188
|
+
* apply, noise auto-pass never does.
|
|
189
|
+
*/
|
|
190
|
+
function snapshotCaptureHealth(baseline, candidate) {
|
|
191
|
+
if (!baseline && !candidate)
|
|
192
|
+
return undefined;
|
|
193
|
+
const c = candidate ? assessHealth(candidate) : null;
|
|
194
|
+
const b = baseline ? assessHealth(baseline) : null;
|
|
195
|
+
const unhealthy = c?.unhealthy && b?.unhealthy ? 'both' : c?.unhealthy ? 'candidate' : b?.unhealthy ? 'baseline' : null;
|
|
196
|
+
const fromBaseline = (lines) => lines.map((l) => `${exports.BASELINE_HEALTH_PREFIX}${l}`);
|
|
197
|
+
return {
|
|
198
|
+
...(candidate ? { candidate } : {}),
|
|
199
|
+
...(baseline ? { baseline } : {}),
|
|
200
|
+
unhealthy,
|
|
201
|
+
...(unhealthy === 'both' && baseline && candidate && sameHealthFailures(baseline, candidate) ? { sameOnBothSides: true } : {}),
|
|
202
|
+
reasons: [...(c?.reasons ?? []), ...fromBaseline(b?.reasons ?? [])],
|
|
203
|
+
warnings: [...(c?.warnings ?? []), ...fromBaseline(b?.warnings ?? [])],
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
/** Whether either side of the snapshot was captured unhealthy. */
|
|
207
|
+
function isUnhealthyCapture(snapshot) {
|
|
208
|
+
return Boolean(snapshot.captureHealth?.unhealthy);
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Whether the pass tolerances (maxDiffPercent, maxDiffPixels, shiftTolerance)
|
|
212
|
+
* may judge the snapshot: always for a healthy or unrecorded one, and for an
|
|
213
|
+
* unhealthy one only when both sides failed the same way (sameOnBothSides).
|
|
214
|
+
* Noise auto-pass never judges an unhealthy one: see isUnhealthyCapture.
|
|
215
|
+
*/
|
|
216
|
+
function healthAllowsTolerances(snapshot) {
|
|
217
|
+
if (!isUnhealthyCapture(snapshot))
|
|
218
|
+
return true;
|
|
219
|
+
return snapshot.captureHealth?.unhealthy === 'both' && snapshot.captureHealth.sameOnBothSides === true;
|
|
220
|
+
}
|
|
221
|
+
/** What to do about an unhealthy current capture. */
|
|
222
|
+
exports.UNHEALTHY_CAPTURE_NEXT = 'an unhealthy capture is a glitch of the capture or a broken asset, not render noise: fix the page, the server or the test and re-run; never approve it as a baseline';
|
|
223
|
+
/** What to do about an unhealthy baseline. */
|
|
224
|
+
exports.UNHEALTHY_BASELINE_NEXT = 're-baseline from a healthy run';
|
|
225
|
+
/** What to do when both sides failed the same way (sameOnBothSides). */
|
|
226
|
+
exports.SAME_FAILURES_NEXT = 'the same assets failed in both captures, so the pass tolerances (maxDiffPercent, maxDiffPixels, shiftTolerance) still apply, but this is never render noise and noise auto-pass never applies: fix the broken asset, then re-baseline from a healthy run';
|
|
227
|
+
const joinAnd = (items) => (items.length <= 1 ? items.join('') : `${items.slice(0, -1).join(', ')} and ${items[items.length - 1]}`);
|
|
228
|
+
/** One side's assessment: from its recorded block, else from the reasons (results written by another tool). */
|
|
229
|
+
function sideAssessment(health, side) {
|
|
230
|
+
const block = side === 'candidate' ? health.candidate : health.baseline;
|
|
231
|
+
if (block)
|
|
232
|
+
return assessHealth(block);
|
|
233
|
+
const isBaseline = (r) => r.startsWith(exports.BASELINE_HEALTH_PREFIX);
|
|
234
|
+
const reasons = side === 'baseline'
|
|
235
|
+
? health.reasons.filter(isBaseline).map((r) => r.slice(exports.BASELINE_HEALTH_PREFIX.length))
|
|
236
|
+
: health.reasons.filter((r) => !isBaseline(r));
|
|
237
|
+
return { problems: [], reasons };
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* The "Unhealthy capture" reading every surface shows, or null when neither
|
|
241
|
+
* side is unhealthy. An unhealthy current capture names what failed and says
|
|
242
|
+
* it is a glitch or a broken asset to fix, never to approve; an unhealthy
|
|
243
|
+
* baseline is called out on every compare against it, with "re-baseline from
|
|
244
|
+
* a healthy run".
|
|
245
|
+
*/
|
|
246
|
+
function captureHealthReading(health) {
|
|
247
|
+
if (!health?.unhealthy)
|
|
248
|
+
return null;
|
|
249
|
+
const side = health.unhealthy;
|
|
250
|
+
if (side === 'both' && health.sameOnBothSides === true) {
|
|
251
|
+
const detail = `${sideAssessment(health, 'candidate').reasons.join('; ')}; the baseline was captured with the same failures`;
|
|
252
|
+
return { side, sameOnBothSides: true, detail, next: exports.SAME_FAILURES_NEXT };
|
|
253
|
+
}
|
|
254
|
+
const parts = [];
|
|
255
|
+
if (side !== 'baseline')
|
|
256
|
+
parts.push(sideAssessment(health, 'candidate').reasons.join('; '));
|
|
257
|
+
if (side !== 'candidate') {
|
|
258
|
+
const b = sideAssessment(health, 'baseline');
|
|
259
|
+
const what = b.problems.length > 0 ? `with ${joinAnd(b.problems)}` : 'unhealthy';
|
|
260
|
+
parts.push(`the baseline was captured ${what}${side === 'both' ? ' too' : ''} (${b.reasons.join('; ')})`);
|
|
261
|
+
}
|
|
262
|
+
const next = side === 'candidate' ? exports.UNHEALTHY_CAPTURE_NEXT : side === 'baseline' ? exports.UNHEALTHY_BASELINE_NEXT : `${exports.UNHEALTHY_CAPTURE_NEXT}, and ${exports.UNHEALTHY_BASELINE_NEXT}`;
|
|
263
|
+
return { side, detail: parts.filter(Boolean).join('; '), next };
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* The warning for approving a capture that is unhealthy (`testivai approve`,
|
|
267
|
+
* the approve action's reply), or null for a healthy capture or one that
|
|
268
|
+
* recorded no health. Approving still happens: the human decides.
|
|
269
|
+
*/
|
|
270
|
+
function approveHealthWarning(health) {
|
|
271
|
+
if (!health)
|
|
272
|
+
return null;
|
|
273
|
+
const assessment = assessHealth(health);
|
|
274
|
+
if (!assessment.unhealthy)
|
|
275
|
+
return null;
|
|
276
|
+
return (`approving an unhealthy capture as the baseline — ${assessment.reasons.join('; ')}. ` +
|
|
277
|
+
'Every compare against it will say so: fix the page, the server or the test, re-run and approve a healthy capture');
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=health.js.map
|