mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: apply test workaround only for Firefox (#12552)
This commit is contained in:
parent
de42e20d85
commit
b74addd452
@ -223,7 +223,7 @@ describe('Mouse', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('should set ctrlKey on the wheel event', async () => {
|
it('should set ctrlKey on the wheel event', async () => {
|
||||||
const {page, server} = await getTestState();
|
const {page, server, isFirefox} = await getTestState();
|
||||||
await page.goto(server.EMPTY_PAGE);
|
await page.goto(server.EMPTY_PAGE);
|
||||||
const ctrlKey = page.evaluate(() => {
|
const ctrlKey = page.evaluate(() => {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
@ -242,7 +242,9 @@ describe('Mouse', function () {
|
|||||||
await page.mouse.wheel({deltaY: -100});
|
await page.mouse.wheel({deltaY: -100});
|
||||||
// Scroll back to work around
|
// Scroll back to work around
|
||||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1901211.
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1901211.
|
||||||
await page.mouse.wheel({deltaY: 100});
|
if (isFirefox) {
|
||||||
|
await page.mouse.wheel({deltaY: 100});
|
||||||
|
}
|
||||||
await page.keyboard.up('Control');
|
await page.keyboard.up('Control');
|
||||||
expect(await ctrlKey).toBeTruthy();
|
expect(await ctrlKey).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user