mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-11 04:30:17 +03:00
test: scroll and click with smooth scroll behavior (#13884)
This commit is contained in:
parent
a919414553
commit
4db5677e11
@ -251,6 +251,19 @@ it('should scroll and click the button', async ({ page, server }) => {
|
||||
expect(await page.evaluate(() => document.querySelector('#button-80').textContent)).toBe('clicked');
|
||||
});
|
||||
|
||||
it('should scroll and click the button with smooth scroll behavior', async ({ page, server, browserName, headless, isLinux }) => {
|
||||
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/12370' });
|
||||
it.skip(browserName === 'webkit' && !headless && isLinux);
|
||||
await page.goto(server.PREFIX + '/input/scrollable.html');
|
||||
await page.addStyleTag({ content: 'html { scroll-behavior: smooth; }' });
|
||||
for (let i = 0; i < 10; i++) {
|
||||
await page.click('#button-80');
|
||||
expect(await page.evaluate(() => document.querySelector('#button-80').textContent)).toBe('clicked');
|
||||
await page.click('#button-20');
|
||||
expect(await page.evaluate(() => document.querySelector('#button-20').textContent)).toBe('clicked');
|
||||
}
|
||||
});
|
||||
|
||||
it('should double click the button', async ({ page, server }) => {
|
||||
await page.goto(server.PREFIX + '/input/button.html');
|
||||
await page.evaluate(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user