From 0f58606b983a59d6cc79f019d05fa71c90047412 Mon Sep 17 00:00:00 2001 From: Jacky Sun <67350368+JackySun9@users.noreply.github.com> Date: Wed, 11 Sep 2024 00:26:57 -0700 Subject: [PATCH] add script to run screenshot tests together (#433) --- runScreenDiff.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 runScreenDiff.sh diff --git a/runScreenDiff.sh b/runScreenDiff.sh new file mode 100644 index 00000000..44f80615 --- /dev/null +++ b/runScreenDiff.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Replace these variables with your actual values +Config="visual" +Project="chrome,ipad,iphone" + +# Check if category is passed as an argument +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +category="$1" + +# Run each command one by one +node run.js -c ${Config} -p ${Project} -g @${category}-screenshots +node libs/screenshot/merge.js screenshots/${category} +node libs/screenshot/compare.mjs screenshots/${category} +node libs/screenshot/uploads3.js screenshots/${category} + +echo "All commands executed successfully for category: ${category}!"