diff --git a/test/emulation.spec.js b/test/emulation.spec.js index f6a659e110..4e4d348495 100644 --- a/test/emulation.spec.js +++ b/test/emulation.spec.js @@ -16,7 +16,7 @@ */ const utils = require('./utils'); -const {FFOX, CHROMIUM, WEBKIT} = utils.testOptions(browserType); +const {FFOX, CHROMIUM, WEBKIT, LINUX} = utils.testOptions(browserType); const iPhone = playwright.devices['iPhone 6']; const iPhoneLandscape = playwright.devices['iPhone 6 landscape']; @@ -206,6 +206,22 @@ describe.skip(FFOX)('Page.emulate', function() { expect(await page.evaluate(() => result)).toBe('Clicked'); await context.close(); }); + it('should scroll to click', async({browser, server}) => { + const context = await browser.newContext({ + viewport: { + width: 400, + height: 400, + }, + deviceScaleFactor: 1, + isMobile: true + }); + const page = await context.newPage(); + await page.goto(server.PREFIX + '/input/scrollable.html'); + const element = await page.$('#button-91'); + await element.click(); + expect(await element.textContent()).toBe('clicked'); + await context.close(); + }); }); describe('Page.emulateMedia type', function() {