mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 11:03:54 +00:00
puppeteer_test: Add support to run tests with Firefox.
This commit introduces the `--firefox` argument, which will allow us to run puppeteer tests with Firefox also.
This commit is contained in:
committed by
Anders Kaseorg
parent
812d563bd4
commit
d6307cc907
@@ -121,8 +121,10 @@ def find_js_test_files(test_dir: str, files: Iterable[str]) -> List[str]:
|
||||
return test_files
|
||||
|
||||
|
||||
def prepare_puppeteer_run() -> None:
|
||||
def prepare_puppeteer_run(is_firefox: bool = False) -> None:
|
||||
os.chdir(ZULIP_PATH)
|
||||
# This will determine if the browser will be firefox or chrome.
|
||||
os.environ["PUPPETEER_PRODUCT"] = "firefox" if is_firefox else "chrome"
|
||||
subprocess.check_call(["node", "node_modules/puppeteer/install.js"])
|
||||
os.makedirs("var/puppeteer", exist_ok=True)
|
||||
for f in glob.glob("var/puppeteer/puppeteer-failure*.png"):
|
||||
|
||||
Reference in New Issue
Block a user