Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(ff): uncomment a couple of firefox tests #1465

Merged
merged 1 commit into from
Mar 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/firefox/ffBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
5 changes: 3 additions & 2 deletions test/click.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMI
await 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);
Expand Down
2 changes: 1 addition & 1 deletion test/popup.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ module.exports.describe = function({testRunner, expect, playwright, CHROMIUM, WE
expect(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
Expand Down