From d429b7145ed73760cf64b696debc5cb7223e6044 Mon Sep 17 00:00:00 2001 From: Dinesh Date: Fri, 27 Mar 2020 01:30:05 +0530 Subject: [PATCH] tests: Make puppeteer tests run in full suites and CircleCI. --- tools/ci/frontend | 2 ++ tools/test-all | 1 + tools/test-js-with-puppeteer | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/tools/ci/frontend b/tools/ci/frontend index df531b413a..33abcbac59 100755 --- a/tools/ci/frontend +++ b/tools/ci/frontend @@ -27,6 +27,8 @@ PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate # # ./tools/test-js-with-casper --xunit-export +./tools/test-js-with-puppeteer + # NB: Everything here should be in `tools/test-all`. If there's a # reason not to run it there, it should be there as a comment # explaining why. diff --git a/tools/test-all b/tools/test-all index dbb46e3098..dfb669ff74 100755 --- a/tools/test-all +++ b/tools/test-all @@ -72,6 +72,7 @@ run ./tools/test-js-with-node run ./manage.py makemessages --locale en run env PYTHONWARNINGS=ignore ./tools/check-capitalization --no-generate run env PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate +run ./tools/test-js-with-puppeteer $FORCEARG run ./tools/test-js-with-casper $FORCEARG printf '\n\e[32mAll OK!\e[0m\n' diff --git a/tools/test-js-with-puppeteer b/tools/test-js-with-puppeteer index 3329192c37..9f76e29a21 100755 --- a/tools/test-js-with-puppeteer +++ b/tools/test-js-with-puppeteer @@ -79,6 +79,12 @@ def run_tests(files: Iterable[str], external_host: str) -> None: ret = 1 ret = run_tests() if ret != 0: + print(""" +The Puppeteer frontend tests failed! Please report and ask for help in chat.zulip.org""", file=sys.stderr) + if os.environ.get("CIRCLECI"): + print("", file=sys.stderr) + print("In CircleCI, the Artifacts tab contains screenshots of the failure.", file=sys.stderr) + print("", file=sys.stderr) sys.exit(ret) external_host = "zulipdev.com:9981"