From af2b79022729e6dcb81bd92b0ef9d2281043936c Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 3 Aug 2017 22:51:51 -0700 Subject: [PATCH] Add test to reproduce handing touch events (#208) References #161. --- test/test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test.js b/test/test.js index d7bfbdaa6a6..b03b91dfec8 100644 --- a/test/test.js +++ b/test/test.js @@ -918,6 +918,13 @@ describe('Page', function() { expect(error.message).toBe('No node found for selector: button.does-not-exist'); } })); + // @see https://github.com/GoogleChrome/puppeteer/issues/161 + xit('should not hang with touch-enabled viewports', SX(async function() { + await page.setViewport(iPhone.viewport); + await page.mouse.down(); + await page.mouse.move(100, 10); + await page.mouse.up(); + })); it('should type into the textarea', SX(async function() { await page.navigate(PREFIX + '/input/textarea.html'); await page.focus('textarea'); @@ -1159,6 +1166,7 @@ describe('Page', function() { await page.press('a'); expect(await page.evaluate(() => window.lastEvent.repeat)).toBe(true); })); + // @see https://github.com/GoogleChrome/puppeteer/issues/206 xit('should click links which cause navigation', SX(async function() { await page.setContent(`empty.html`); // This await should not hang.