From f944501ca1b6d923cd7234d0a35bdfad41556c6c Mon Sep 17 00:00:00 2001 From: Diego Assencio Date: Tue, 28 Feb 2023 19:24:06 +0100 Subject: [PATCH] Use Chromium binary from system for capturing screenshots This commit makes screenshot tests work on macOS running on Apple silicon at the cost of adding Chromium as an external dependency. See https://github.com/puppeteer/puppeteer/issues/6622 for more details. --- runScreenshotTests | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runScreenshotTests b/runScreenshotTests index 00717e3..65660f8 100755 --- a/runScreenshotTests +++ b/runScreenshotTests @@ -50,6 +50,8 @@ do test_details="Target path: $(magenta $target_path) | " test_details+="Viewport width: $(magenta $viewport_width)" echo -en "[$(gray ....)] ${test_details} " + PUPPETEER_EXECUTABLE_PATH=$(which chromium) \ + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ ./comparePages $target_path $viewport_width && { echo -e "\r[$(bold_green PASS)] ${test_details}" } || {