test: add failing test for clicking certain elements (#4282)

References #4281
This commit is contained in:
Andrey Lushnikov 2019-04-13 00:10:48 -04:00 committed by GitHub
parent 8f8e77492d
commit 145e8680b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,19 @@ module.exports.addTests = function({testRunner, expect}) {
await page.click('button'); await page.click('button');
expect(await page.evaluate(() => result)).toBe('Clicked'); 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}) => { it('should click the button after navigation ', async({page, server}) => {
await page.goto(server.PREFIX + '/input/button.html'); await page.goto(server.PREFIX + '/input/button.html');
await page.click('button'); await page.click('button');