test(focus): add a failing focus test (#4581)

This commit is contained in:
Pavel Feldman 2020-12-03 10:51:45 -08:00 committed by GitHub
parent 5a537413c9
commit 5002b83b4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,3 +107,13 @@ it('should traverse only form elements', (test, { browserName, platform }) => {
await page.keyboard.press('Alt+Shift+Tab');
expect(await page.evaluate(() => document.activeElement.id)).toBe('input-1');
});
it('clicking checkbox should activate it', (test, { browserName, headful, platform }) => {
test.fixme(browserName === 'webkit' && !headful);
test.fixme(browserName === 'firefox' && !headful && platform === 'darwin');
}, async ({ page }) => {
await page.setContent(`<input type=checkbox></input>`);
await page.click('input');
const nodeName = await page.evaluate(() => document.activeElement.nodeName);
expect(nodeName).toBe('INPUT');
});