playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Bug]: Test explorer search does not work

Open cmyllis opened this issue 1 month ago • 2 comments

Version

1.57

Steps to reproduce

Test explorer is not searching all tests if those have not been expanded.

Image

If i expand all and then search:

Image

Expected behavior

Search should work without having to expand each test file.

Actual behavior

Search does not work when opening Testing Explorer

Additional context

No response

Environment

System:
    OS: Windows 11 10.0.26200
    CPU: (14) x64 Intel(R) Core(TM) Ultra 7 165H
    Memory: 32.28 GB / 48.00 GB
  Binaries:
    Node: 24.10.0 - C:\dev\Node\node.EXE
    npm: 11.6.4 - C:\dev\Node\npm.CMD
  IDEs:
    VSCode: 1.106.3 - C:\Users\CMyllis\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
  npmPackages:
    @playwright/test: ^1.57.0 => 1.57.0

cmyllis avatar Dec 09 '25 09:12 cmyllis

Hi Christos! This is behaviour is intended currently, because scanning all test files might be expensive for some test suites. That's why we scan files when they're first opened in the editor, or when they're updated, so we can ensure that the green triangles in the editor gutter are always visible.

I see how this is suboptimal for your usecase. This is the first report we're getting about this, so i'm hesitant changing our default behaviour because of it. Do you think that https://github.com/microsoft/vscode/issues/95746 would be a good solution to your problem?

Skn0tt avatar Dec 09 '25 11:12 Skn0tt

Thanks for the reply. I was kinda confused because it works correctly in the ui (playwright test --ui). I was expecting to be the same for the vs code. It would be a workaround if it had an expand all like said but then again that might be a problem if the tests grew too much in size. For now my "solution" is opening the ui.

Image

cmyllis avatar Dec 09 '25 11:12 cmyllis