~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.17.0 Latest 2 packages, 1 image

1
10

Shots: a shot that misses is taken once more

Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:shots/retry-flake
harness/shots/linux.sh+7−2
@@ -7,7 +7,10 @@
# bash harness/shots/linux.sh check|take [playwright args]
#
# check: pages whose HTML changed are taken again and must match to the
# pixel; each that does not, or has no baseline, is left in
# pixel. A shot that does not is taken once more, as Chromium sometimes
# draws a rounded corner's edge a pixel apart from one run to the next;
# one that then matches passes, and Playwright lists it as flaky. Each
# that still does not, or has no baseline, is left in
# $KNOTLESS_RUN_OUTPUTS, when set, as pictures named for the page and
# project: `1 before`, `2 after` and `3 difference`, as WebP small enough
# to keep (shots/outputs.mjs), or as the PNG should that fail.
@@ -43,13 +46,15 @@ if [ "$mode" = take ]; then
rm -f "$marker"
exit $status
fi
npx playwright test -c $config "$@" && exit 0
npx playwright test -c $config --retries 1 "$@" && exit 0
if [ -n "${KNOTLESS_RUN_OUTPUTS:-}" ]; then
outputs=$PWD/shots/outputs.mjs
cd ../target/shots/results
for shot in */; do
page=${shot%/}
page=${page#views-}
# A retry's pictures replace the first try's.
page=${page%-retry1}
for png in "$shot"*.png; do
kind=$(basename "$png" .png)
case ${kind##*-} in