test: add failing test for page.select (#3346)

References #3327.
This commit is contained in:
Andrey Lushnikov 2018-10-04 10:41:38 -07:00 committed by GitHub
parent 5ebfe1a0dc
commit 8becb31754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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() {