From 85d7cdbf50b65e89809ca2a7f6cf25d4814f55ba Mon Sep 17 00:00:00 2001 From: Dinesh Date: Sat, 28 Nov 2020 18:27:44 +0000 Subject: [PATCH] puppeteer: Add clear success message at end of a test run. Also makes the failure message more noticeable. --- tools/test-js-with-puppeteer | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/test-js-with-puppeteer b/tools/test-js-with-puppeteer index c59ecd94ea..ebd32580cb 100755 --- a/tools/test-js-with-puppeteer +++ b/tools/test-js-with-puppeteer @@ -5,6 +5,9 @@ import shlex import subprocess import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) +from scripts.lib.zulip_tools import ENDC, FAIL, OKGREEN + ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Request the special webpack setup for frontend integration tests, @@ -85,8 +88,9 @@ def run_tests(files: Iterable[str], external_host: str) -> None: ret = 1 ret = run_tests()[0] if ret != 0: - print(""" -The Puppeteer frontend tests failed! For help debugging, read: + print(f""" +{FAIL}The Puppeteer frontend tests failed!{ENDC} +For help debugging, read: https://zulip.readthedocs.io/en/latest/testing/testing-with-puppeteer.html or report and ask for help in chat.zulip.org""", file=sys.stderr) if os.environ.get("CIRCLECI"): @@ -101,4 +105,5 @@ external_host = "zulipdev.com:9981" assert_provisioning_status_ok(options.force) prepare_puppeteer_run() run_tests(options.tests, external_host) +print(f"{OKGREEN}All tests passed!{ENDC}") sys.exit(0)