tests/e2e: add alt color for image diffs
Update snapshot config to mask image diffs with colors. Green for
expected pixels and red for unexpected pixels.
Change-Id: I9071155af34051317a998c9574b655b4a6f401e3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/345389
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
diff --git a/tests/e2e/setup.ts b/tests/e2e/setup.ts
index 111de41..e09a493 100644
--- a/tests/e2e/setup.ts
+++ b/tests/e2e/setup.ts
@@ -26,6 +26,9 @@
failureThreshold: 0.001,
failureThresholdType: 'percent',
customSnapshotsDir: snapshotDir,
+ customDiffConfig: {
+ diffColorAlt: [0, 255, 0],
+ },
customSnapshotIdentifier: ({ defaultIdentifier, counter }) => {
return defaultIdentifier.replace('test-ts', '').replace(`-${counter}`, '');
},