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
tests(ff): uncomment a couple of firefox tests (#1465)
Pavel Feldman1b08797c6f62
diff --git a/src/firefox/ffBrowser.ts b/src/firefox/ffBrowser.tsindex 687e870996..8e80a0db0e 100644--- a/src/firefox/ffBrowser.ts+++ b/src/firefox/ffBrowser.ts@@ -75,13 +75,11 @@ export class FFBrowser extends platform.EventEmitter implements Browser {// TODO: remove isMobile/hasTouch from the protocol?if (options.isMobile)throw new Error('options.isMobile is not supported in Firefox');- if (options.hasTouch)- throw new Error('options.hasTouch is not supported in Firefox');viewport = {viewportSize: { width: options.viewport.width, height: options.viewport.height },deviceScaleFactor: options.deviceScaleFactor || 1,isMobile: false,- hasTouch: false,+ hasTouch: !!options.hasTouch,};} else if (options.viewport !== null) {viewport = {diff --git a/test/click.spec.js b/test/click.spec.jsindex 9682848523..6ef8eccc68 100644--- a/test/click.spec.js+++ b/test/click.spec.js@@ -228,9 +228,10 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMIawait page.click('label[for="agree"]');expect(await page.evaluate(() => result.check)).toBe(false);});- it.skip(FFOX)('should not hang with touch-enabled viewports', async({server, browser}) => {+ it('should not hang with touch-enabled viewports', async({server, browser}) => {// @see https://github.com/GoogleChrome/puppeteer/issues/161- const context = await browser.newContext({ viewport: playwright.devices['iPhone 6'].viewport });+ const { viewport, hasTouch } = playwright.devices['iPhone 6'];+ const context = await browser.newContext({ viewport, hasTouch });const page = await context.newPage();await page.mouse.down();await page.mouse.move(100, 10);diff --git a/test/popup.spec.js b/test/popup.spec.jsindex 00ac656a36..b754391204 100644--- a/test/popup.spec.js+++ b/test/popup.spec.js@@ -114,7 +114,7 @@ module.exports.describe = function({testRunner, expect, playwright, CHROMIUM, WEexpect(await popup.title()).toBe('Woof-Woof');await context.close();});- it.skip(FFOX)('should inherit touch support from browser context', async function({browser, server}) {+ it('should inherit touch support from browser context', async function({browser, server}) {const context = await browser.newContext({viewport: { width: 400, height: 500 },hasTouch: true