refactor: Extract code of running a single puppeteer test into a function.
refactor: Extract code of running a single puppeteer test into a function.

zulip/zulip,andersk/zulip,kou/zulip,rht/zulip,zulip/zulip,rht/zulip,andersk/zulip,kou/zulip,andersk/zulip,kou/zulip,zulip/zulip,zulip/zulip,rht/zulip,rht/zulip,zulip/zulip,andersk/zulip,zulip/zulip,kou/zulip,andersk/zulip,kou/zulip,rht/zulip,zulip/zulip,andersk/zulip,kou/zulip,rht/zulip,kou/zulip,rht/zulip,andersk/zulip