From 6676aa2f90c843dcdf489e65e3cf5e085543cb52 Mon Sep 17 00:00:00 2001 From: Riken Shah Date: Mon, 1 Mar 2021 05:29:13 +0000 Subject: [PATCH] puppeteer_test: Change browser default viewport to allow Firefox. When we run puppeteer with Firefox, the `--window-size` option does not work, which makes the bottom part of the page cut off. This commit fixes this issue by setting the screen default viewport to the maximum size of the window. --- frontend_tests/puppeteer_lib/common.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend_tests/puppeteer_lib/common.ts b/frontend_tests/puppeteer_lib/common.ts index 6c448b05f5..2570a57970 100644 --- a/frontend_tests/puppeteer_lib/common.ts +++ b/frontend_tests/puppeteer_lib/common.ts @@ -65,7 +65,10 @@ class CommonUtils { "--no-sandbox", "--disable-setuid-sandbox", ], - defaultViewport: {width: 1280, height: 1024}, + // TODO: Change defaultViewport to 1280x1024 when puppeteer fixes the window size issue with firefox. + // Here is link to the issue that is tracking the above problem https://github.com/puppeteer/puppeteer/issues/6442. + // @ts-expect-error: Because of https://github.com/puppeteer/puppeteer/issues/6885 + defaultViewport: null, headless: true, }); }