test: scroll into view element in cross-origin iframe outside viewport (#27369)

Reference: #27196
This commit is contained in:
Yury Semikhatsky 2023-09-29 17:23:51 -07:00 committed by GitHub
parent bb8a102164
commit ac9d1ec421
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,3 +97,15 @@ it('should scroll into view span element', async ({ page, isAndroid }) => {
await page.locator('#small').scrollIntoViewIfNeeded();
expect(await page.evaluate(() => window.scrollY)).toBeGreaterThan(9000);
});
it('should scroll into view element in iframe', async ({ page, isAndroid, server, browserName }) => {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/27196' });
it.fixme(isAndroid);
it.fixme(browserName === 'chromium', 'rAFs are paused in cross-origin iframes outside viewport');
await page.goto(server.EMPTY_PAGE);
await page.setContent(`
<div id=big style="height: 10000px;"></div>
<iframe src='${server.CROSS_PROCESS_PREFIX}/input/button.html'></iframe>
`);
await page.frameLocator('iframe').getByRole('button').click({ timeout: 5000 });
});