test: make sure zero-width screenshots don't hang (#3214)
References #2672.
This commit is contained in:
parent
9c4b6d06e2
commit
c644a3bbd3
@ -303,6 +303,11 @@ module.exports.addTests = function({testRunner, expect}) {
|
||||
const screenshotError = await elementHandle.screenshot().catch(error => error);
|
||||
expect(screenshotError.message).toBe('Node is either not visible or not an HTMLElement');
|
||||
});
|
||||
xit('should not hang with zero width/height element', async({page, server}) => {
|
||||
await page.setContent('<div style="width: 0; height: 0"></div>');
|
||||
const div = await page.$('div');
|
||||
await div.screenshot();
|
||||
});
|
||||
});
|
||||
|
||||
describe('ElementHandle.$', function() {
|
||||
|
Loading…
Reference in New Issue
Block a user