Skip to content

Commit

Permalink
test: add failing test for page.select (#3346)
Browse files Browse the repository at this point in the history
References #3327.
  • Loading branch information
aslushnikov committed Oct 4, 2018
1 parent 5ebfe1a commit 8becb31
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/page.spec.js
Expand Up @@ -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() {
Expand Down

2 comments on commit 8becb31

@jennycai0807
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this bug! It really help me!

@aslushnikov
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jennycai0807 to be clear: it's not fixed yet; but it'll probably be soon'ish.

Please sign in to comment.