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.
This commit is contained in:
Riken Shah 2021-03-01 05:29:13 +00:00 committed by Tim Abbott
parent a3561c15d2
commit 6676aa2f90
1 changed files with 4 additions and 1 deletions

View File

@ -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,
});
}