mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
parent
42f91e30d1
commit
4046d154ae
@ -188,7 +188,6 @@ browserTest('should focus with more than one page/context', async ({ contextFact
|
|||||||
});
|
});
|
||||||
|
|
||||||
browserTest('should not fire blur events when interacting with more than one page/context', async ({ contextFactory, browserName }) => {
|
browserTest('should not fire blur events when interacting with more than one page/context', async ({ contextFactory, browserName }) => {
|
||||||
it.fixme(browserName === 'firefox', 'Firefox issues blur events for tabs');
|
|
||||||
browserTest.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/30399' });
|
browserTest.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/30399' });
|
||||||
const page1 = await (await contextFactory()).newPage();
|
const page1 = await (await contextFactory()).newPage();
|
||||||
const page2 = await (await contextFactory()).newPage();
|
const page2 = await (await contextFactory()).newPage();
|
||||||
|
@ -265,7 +265,7 @@ it('should not click an element overlaying iframe with the target', async ({ pag
|
|||||||
`);
|
`);
|
||||||
|
|
||||||
const target = page.frameLocator('iframe').frameLocator('iframe').locator('text=inner');
|
const target = page.frameLocator('iframe').frameLocator('iframe').locator('text=inner');
|
||||||
const error = await target.click({ timeout: 1000 }).catch(e => e);
|
const error = await target.click({ timeout: 3000 }).catch(e => e);
|
||||||
expect(await page.evaluate('window._clicked')).toBe(undefined);
|
expect(await page.evaluate('window._clicked')).toBe(undefined);
|
||||||
expect(error.message).toContain(`<div onclick="window.top._clicked=5">PINK OVERLAY</div> intercepts pointer events`);
|
expect(error.message).toContain(`<div onclick="window.top._clicked=5">PINK OVERLAY</div> intercepts pointer events`);
|
||||||
|
|
||||||
|
@ -123,6 +123,8 @@ it('should wait for stable position', async ({ page, server, browserName, platfo
|
|||||||
button.style.transition = 'margin 10000ms linear 0s';
|
button.style.transition = 'margin 10000ms linear 0s';
|
||||||
button.style.marginLeft = '20000px';
|
button.style.marginLeft = '20000px';
|
||||||
});
|
});
|
||||||
|
// rafraf for Firefox to kick in the animation.
|
||||||
|
await page.evaluate(() => new Promise(f => requestAnimationFrame(() => requestAnimationFrame(f))));
|
||||||
let done = false;
|
let done = false;
|
||||||
const promise = button.waitForElementState('stable').then(() => done = true);
|
const promise = button.waitForElementState('stable').then(() => done = true);
|
||||||
await giveItAChanceToResolve(page);
|
await giveItAChanceToResolve(page);
|
||||||
|
@ -24,6 +24,8 @@ it('should timeout waiting for stable position', async ({ page, server }) => {
|
|||||||
button.style.transition = 'margin 5s linear 0s';
|
button.style.transition = 'margin 5s linear 0s';
|
||||||
button.style.marginLeft = '200px';
|
button.style.marginLeft = '200px';
|
||||||
});
|
});
|
||||||
|
// rafraf for Firefox to kick in the animation.
|
||||||
|
await page.evaluate(() => new Promise(f => requestAnimationFrame(() => requestAnimationFrame(f))));
|
||||||
const error = await button.click({ timeout: 3000 }).catch(e => e);
|
const error = await button.click({ timeout: 3000 }).catch(e => e);
|
||||||
expect(error.message).toContain('elementHandle.click: Timeout 3000ms exceeded.');
|
expect(error.message).toContain('elementHandle.click: Timeout 3000ms exceeded.');
|
||||||
expect(error.message).toContain('waiting for element to be visible, enabled and stable');
|
expect(error.message).toContain('waiting for element to be visible, enabled and stable');
|
||||||
|
@ -455,6 +455,8 @@ it('should wait for stable position', async ({ page, server }) => {
|
|||||||
button.style.display = 'block';
|
button.style.display = 'block';
|
||||||
document.body.style.margin = '0';
|
document.body.style.margin = '0';
|
||||||
});
|
});
|
||||||
|
// rafraf for Firefox to kick in the animation.
|
||||||
|
await page.evaluate(() => new Promise(f => requestAnimationFrame(() => requestAnimationFrame(f))));
|
||||||
await page.click('button');
|
await page.click('button');
|
||||||
expect(await page.evaluate(() => window['result'])).toBe('Clicked');
|
expect(await page.evaluate(() => window['result'])).toBe('Clicked');
|
||||||
expect(await page.evaluate('pageX')).toBe(300);
|
expect(await page.evaluate('pageX')).toBe(300);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user