Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix(firefox): enable remaining focus tests (#1803)
Yury Semikhatsky041406a6643c
diff --git a/package.json b/package.jsonindex 48535a8760..3b9cbb1746 100644--- a/package.json+++ b/package.json@@ -9,7 +9,7 @@"main": "index.js","playwright": {"chromium_revision": "754895",- "firefox_revision": "1078",+ "firefox_revision": "1081","webkit_revision": "1193"},"scripts": {diff --git a/test/emulation.spec.js b/test/emulation.spec.jsindex c2c2a0a016..33dd7be6ed 100644--- a/test/emulation.spec.js+++ b/test/emulation.spec.js@@ -450,12 +450,21 @@ describe('focus', function() {it('should think that it is focused by default', async({page}) => {expect(await page.evaluate('document.hasFocus()')).toBe(true);});- it.fail(FFOX)('should think that all pages are focused', async({page}) => {+ it('should think that all pages are focused', async({page}) => {const page2 = await page.context().newPage();expect(await page.evaluate('document.hasFocus()')).toBe(true);expect(await page2.evaluate('document.hasFocus()')).toBe(true);await page2.close();});+ it('should focus popups by default', async({page, server}) => {+ await page.goto(server.EMPTY_PAGE);+ const [popup] = await Promise.all([+ page.waitForEvent('popup'),+ page.evaluate(url => { window.open(url); }, server.EMPTY_PAGE),+ ]);+ expect(await popup.evaluate('document.hasFocus()')).toBe(true);+ expect(await page.evaluate('document.hasFocus()')).toBe(true);+ });it('should provide target for keyboard events', async({page, server}) => {const page2 = await page.context().newPage();await Promise.all([