test: add failing test for Firefox (#1019)

References #1009
This commit is contained in:
Andrey Lushnikov 2020-02-14 17:02:22 -08:00 committed by GitHub
parent bb8d435c5b
commit 5695ade926
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -207,6 +207,16 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT,
await textarea.press('NumpadSubtract');
expect(await page.evaluate('keyLocation')).toBe(3);
});
it.skip(FFOX)('should press Enter', async({page, server}) => {
await page.setContent('<input></input>');
await page.$eval('input', body => body.addEventListener('keydown', event => {
if (event.key === 'Enter')
window.ENTER_DOWN = true;
}, false));
await page.focus('input');
await page.keyboard.press('Enter');
expect(await page.evaluate(() => window.ENTER_DOWN)).toBe(true);
});
it('should throw on unknown keys', async({page, server}) => {
let error = await page.keyboard.press('NotARealKey').catch(e => e);
expect(error.message).toBe('Unknown key: "NotARealKey"');