diff --git a/tests/library/browsercontext-viewport.spec.ts b/tests/library/browsercontext-viewport.spec.ts index 6b222bc000..e854e3c011 100644 --- a/tests/library/browsercontext-viewport.spec.ts +++ b/tests/library/browsercontext-viewport.spec.ts @@ -30,6 +30,7 @@ it('should set the proper viewport size', async ({ page, server }) => { }); it('should return correct outerWidth and outerHeight', async ({ page }) => { + await page.setViewportSize({ width: 410, height: 420 }); const size = await page.evaluate(() => { return { innerWidth: window.innerWidth, @@ -38,8 +39,8 @@ it('should return correct outerWidth and outerHeight', async ({ page }) => { outerHeight: window.outerHeight, }; }); - expect(size.innerWidth).toBe(1280); - expect(size.innerHeight).toBe(720); + expect(size.innerWidth).toBe(410); + expect(size.innerHeight).toBe(420); expect(size.outerWidth >= size.innerWidth).toBeTruthy(); expect(size.outerHeight >= size.innerHeight).toBeTruthy(); });