Skip to content

Commit 7d8c3b4

Browse files
authored
chore: disable Puppeteer default viewport to increase its size (#947)
According to [Puppeteer documentation for launch options](https://github.com/GoogleChrome/puppeteer/blob/v1.14.0/docs/api.md#puppeteerlaunchoptions), setting `defaultViewport` to `null` disables the default viewport size of 800x600. When the default viewport is disabled, the viewport size matches the browser size. This makes failture screenshots more meaningful when debugging flaky E2E tests because they will show more than the top left portion of the page that is being tested.
1 parent 6c6a25e commit 7d8c3b4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/tests/end-to-end/common/browser-factory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ async function launchNewBrowser(): Promise<Puppeteer.Browser> {
6161
const browser = await Puppeteer.launch({
6262
// Headless doesn't support extensions, see https://github.com/GoogleChrome/puppeteer/issues/659
6363
headless: false,
64+
defaultViewport: null,
6465
args: [
6566
// Required to work around https://github.com/GoogleChrome/puppeteer/pull/774
6667
`--disable-extensions-except=${extensionPath}`,

0 commit comments

Comments
 (0)