test: add test for clicking in large viewports (#22322)

Right now we cannot click on the boundaries of the viewports
that are larger than screen size in headed firefox.

https://github.com/microsoft/playwright/issues/22082
This commit is contained in:
Andrey Lushnikov 2023-04-11 08:47:47 +00:00 committed by GitHub
parent 8b8385b6cb
commit 15c6803880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,6 +65,22 @@ it('should not crash when creating second context', async ({ browser }) => {
}
});
it('should click when viewport size is larger than screen', async ({ page, browserName }) => {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/22082' });
it.fixme(browserName === 'firefox');
await page.setViewportSize({
width: 3000,
height: 3000,
});
await page.setContent(`
<style>
html, body { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }
</style>
<button style="position: absolute; right: 0; bottom: 0;">Button in the bottom-right corner</button>
`);
await page.locator('button').click();
});
it('should click background tab', async ({ page, server }) => {
await page.setContent(`<button>Hello</button><a target=_blank href="${server.EMPTY_PAGE}">empty.html</a>`);
await page.click('a');