From 66e93ce2c06e6d063e7ad37f698c880b90d2a1b9 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Wed, 11 Dec 2019 22:52:14 -0800 Subject: [PATCH] test: rearrange / uncomment more tests --- test/browser.spec.js | 10 ---------- test/chromium/connect.spec.js | 12 ++++++++++++ test/page.spec.js | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/test/browser.spec.js b/test/browser.spec.js index 345f832b9d..c0c2fd0561 100644 --- a/test/browser.spec.js +++ b/test/browser.spec.js @@ -56,14 +56,4 @@ module.exports.addTests = function({testRunner, expect, headless, playwright, FF remoteBrowser.disconnect(); }); }); - - describe.skip(WEBKIT || FFOX)('Browser.isConnected', () => { - it('should set the browser connected state', async({browser}) => { - const browserWSEndpoint = browser.chromium.wsEndpoint(); - const newBrowser = await playwright.connect({browserWSEndpoint}); - expect(newBrowser.isConnected()).toBe(true); - newBrowser.disconnect(); - expect(newBrowser.isConnected()).toBe(false); - }); - }); }; diff --git a/test/chromium/connect.spec.js b/test/chromium/connect.spec.js index a104e6ba7f..230819b6f4 100644 --- a/test/chromium/connect.spec.js +++ b/test/chromium/connect.spec.js @@ -145,4 +145,16 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, p }); }); + describe('Browser.isConnected', () => { + it('should set the browser connected state', async () => { + const browser = await playwright.launch(defaultBrowserOptions); + const browserWSEndpoint = browser.chromium.wsEndpoint(); + const newBrowser = await playwright.connect({browserWSEndpoint}); + expect(newBrowser.isConnected()).toBe(true); + newBrowser.disconnect(); + expect(newBrowser.isConnected()).toBe(false); + await browser.close(); + }); + }); + }; diff --git a/test/page.spec.js b/test/page.spec.js index d861c860eb..6330d7affd 100644 --- a/test/page.spec.js +++ b/test/page.spec.js @@ -1037,7 +1037,7 @@ module.exports.addTests = function({testRunner, expect, headless, playwright, FF expect(error.message).toContain('Indices must be numbers'); }); // @see https://github.com/GoogleChrome/puppeteer/issues/3327 - it.skip(FFOX || WEBKIT)('should work when re-defining top-level Event class', async({page, server}) => { + it.skip(FFOX)('should work when re-defining top-level Event class', async({page, server}) => { await page.goto(server.PREFIX + '/input/select.html'); await page.evaluate(() => window.Event = null); await page.select('select', 'blue');