From 8becb31754e5f6377398dde9bbcc51d8951d7d61 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 4 Oct 2018 10:41:38 -0700 Subject: [PATCH] test: add failing test for page.select (#3346) References #3327. --- test/page.spec.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/page.spec.js b/test/page.spec.js index d1b699fe..d9685587 100644 --- a/test/page.spec.js +++ b/test/page.spec.js @@ -1777,6 +1777,14 @@ module.exports.addTests = function({testRunner, expect, headless}) { } expect(error.message).toContain('Values must be strings'); }); + // @see https://github.com/GoogleChrome/puppeteer/issues/3327 + xit('should work when re-defining top-level Event class', async({page, server}) => { + await page.goto(server.PREFIX + '/input/select.html'); + await page.evaluate(() => window.Event = null); + await page.select('select', 'blue'); + expect(await page.evaluate(() => result.onInput)).toEqual(['blue']); + expect(await page.evaluate(() => result.onChange)).toEqual(['blue']); + }); }); describe('Connection', function() {