Skip to content

Commit

Permalink
test: add failing test for clicking certain elements (puppeteer#4282)
Browse files Browse the repository at this point in the history
References puppeteer#4281
  • Loading branch information
aslushnikov authored Apr 13, 2019
1 parent 8f8e774 commit 145e868
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/click.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ module.exports.addTests = function({testRunner, expect}) {
await page.click('button');
expect(await page.evaluate(() => result)).toBe('Clicked');
});
// @see https://github.com/GoogleChrome/puppeteer/issues/4281
xit('should click on a span with an inline element inside', async({page, server}) => {
await page.setContent(`
<style>
span::before {
content: 'q';
}
</style>
<span onclick='javascript:window.CLICKED=42'></span>
`);
await page.click('span');
expect(await page.evaluate(() => window.CLICKED)).toBe(42);
});
it('should click the button after navigation ', async({page, server}) => {
await page.goto(server.PREFIX + '/input/button.html');
await page.click('button');
Expand Down

0 comments on commit 145e868

Please sign in to comment.