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.

Wrong tests configuration with useDefaultBrowserType #586

@mmarkelov

Description

@mmarkelov

Wrong tests configuration in this case:

// jest-playwright.config.js

module.exports = {
  browsers: ['chromium', 'webkit', 'firefox'],
  devices: [
    'iPhone 11',
    {
       name: 'Desktop',
       ...
    }
  ],
  useDefaultBrowserType: true,
}

Expected that it will be run 4 times (webkit iPhone 11, webkit Desktop, firefox Desktop, chromium Desktop), but it will run only 2 times (webkit iPhone 11, chromium Desktop).

I suppose that we should run tests for all browsers if custom device don't have useDefaultBrowserType

As weird workaround it will be ok with this config:

// jest-playwright.config.js

module.exports = {
  browsers: ['chromium', 'webkit', 'firefox'],
  devices: [
    'iPhone 11',
    {
       name: 'Desktop',
       defaultBrowserType: 'webkit'
       ...
    },
    {
       name: 'Desktop',
       defaultBrowserType: 'chromium'
       ...
    },
    {
       name: 'Desktop',
       defaultBrowserType: 'firefox'
       ...
    },
  ],
  useDefaultBrowserType: true,
}

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