mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test(focus): add a failing focus test (#4581)
This commit is contained in:
parent
5a537413c9
commit
5002b83b4a
@ -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');
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user