puppeteer_tests: Use casper's webpack setup.

As puppeteer tests are similar to casper i.e both being frontend
screen scraping tests, we need to use the same webpack setup as
that of casper's instead of `build_for_most_tests` which is used
mostly for backend related tests.

This sets env variable `CASPER_TESTS` to `1` which does all the
work to make it use the same setup of casper. We would want to
rename that to `PUPPETEER_TESTS` and make changes to do the
same as casper webpack setup when we completely replace casper
with puppeteer.
This commit is contained in:
Dinesh 2020-05-10 01:56:43 +05:30 committed by Tim Abbott
parent 49f7355f40
commit c915e2c6cf
1 changed files with 8 additions and 1 deletions

View File

@ -7,7 +7,14 @@ import shlex
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
os.environ["PUPPETEER_TESTS"] = "1"
# Request the special webpack setup for frontend integration tests,
# where webpack assets are compiled up front rather than running in
# watch mode. We prefer the same for puppeteer, so the below line
# makes the webpack similar to casper.
#
# TODO: Eventually, we'll want to rename this parameter.
os.environ["CASPER_TESTS"] = "1"
os.environ["CHROMIUM_EXECUTABLE"] = os.path.join(ZULIP_PATH, "node_modules/.bin/chromium")
os.environ.pop("http_proxy", "")
os.environ.pop("https_proxy", "")