Skip to content

[Regression] test.only with project dependency is not working on 1.37.0 #26492

@ortsevlised

Description

@ortsevlised

System info

  • Playwright Version: [v1.37.0]
  • Operating System: [macOS 13.5]
  • Browser: [All]

Config file

// extract from playwright.config.ts
  projects: [
    {
      name: 'setup',
      testMatch: /global.setup\.ts/,
      use: {
        ...devices['Desktop Chrome'],
      },
    },
    {
      name: 'chromium',
      use: devices['Desktop Chrome'],
      dependencies: ['setup'],
    },
  ],

Steps

  • Create a project dependency as shown in playwright.config.ts
  • Add the 'only' annotation to a test (test.only)
  • Run test

Expected

Test run as with previous version.

Actual

Test fails with the following error:
TypeError: Cannot read property '_hasTests' of undefined
When removing the dependency or the tag only tests run without issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions