Skip to content

[BUG]. Extension does not recognize tests when using a custom fixture. #38478

@klendathu667

Description

@klendathu667

The Run Test code lens does not appear when using custom fixtures. Our test repository does not use

const { test } = require('@playwright/test')
// or
import { test } from '@playwright/test'

But we use a custom fixture that extends test so our import is

const { test, expect } = require('@qe/fixtures')

According to what I found,
The Playwright extension only recognizes tests imported from @playwright/test. When you use a custom wrapper like @qe/fixtures, the extension can't detect your tests and won't show the "Run Test" code lens.

Can we add a configuration option to the extension to allow us to point the extension to the custom fixture? Or have it auto-detect the import so the code lens is available?

Thanks

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