Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Does not skip 'Galaxy S5' on Firefox: options.isMobile is not supported in Firefox #337

@maurusrv

Description

@maurusrv

Hi, I've tried to use this lib and was able to reproduce the same bug with this example test case:

beforeAll(async () => {
  await page.goto('https://www.google.com/')
})

test.jestPlaywrightSkip({ browsers: ['firefox', 'webkit'], devices: ['Galaxy S5']}, 'should display "google" text on page', async () => {
  const url = await page.url()
  expect(url).toEqual('https://www.google.com/')
})

As you can see in the snippet below, it skipped Galaxy S5 as i intended on webkit but on firefox.

 PASS   browser: chromium  src/example/Example.test.js
  ✓ should display "google" text on page (5 ms)

 PASS   browser: chromium device: Galaxy S5  src/example/Example.test.js
  ✓ should display "google" text on page (1 ms)

 PASS   browser: firefox  src/example/Example.test.js
  ✓ should display "google" text on page (2 ms)

 FAIL   browser: firefox device: Galaxy S5  src/example/Example.test.js
  ● Test suite failed to run

    options.isMobile is not supported in Firefox

      at FFBrowser.newContext (node_modules/playwright/lib/firefox/ffBrowser.js:69:19)
      at FFBrowser.newContext (node_modules/playwright/lib/helper.js:80:31)
      at PlaywrightEnvironment.setup (node_modules/jest-playwright-preset/lib/PlaywrightEnvironment.js:92:49)

 PASS   browser: webkit  src/example/Example.test.js (12.123 s)
  ✓ should display "google" text on page (2 ms)

Test Suites: 1 failed, 1 skipped, 4 passed, 5 of 1 total
Tests:       1 skipped, 4 passed, 5 total

My understanding of the browsers and devices parameter for jestPlaywrightSkip is: it goes through each browser pairing it with each device. If this is right, then here i am reporting this bug. But if there's nothing wrong with the test implementation and my configuration, is this on jest-playwright side of things or on playwright side?

Thank you!

I've run this test, using Github Actions using the following yml file:

name: CI

on:
  push:
    branches:
    - master

env:
  # Force terminal colors. @see https://www.npmjs.com/package/colors
  FORCE_COLOR: 1

jobs:
  e2e-tests:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1
        with:
          node-version: '12'

      - uses: microsoft/playwright-github-action@v1

      - name: Install dependencies and run tests
        run: npm install && npm test Example

As for my configuration,
jest-playwright.config.js:

module.exports = {
  browsers: [
    "chromium",
    "firefox",
    "webkit",
  ],
  devices: [
    null,
    'Galaxy S5',
  ],
}

PS. #332 might be related but i wonder if some change related to jestPlaywrightSkip might solve to really skip the firefox / Galaxy S5 permutation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions