Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Playwright UI unable to find tests when ran from project root directory. #33745

Open
ScarletMcLearn opened this issue Nov 23, 2024 · 1 comment

Comments

@ScarletMcLearn
Copy link

Version

1.49.0

Steps to reproduce

  1. Given in Project Root
  2. When Tests are in a subdirectory called tests in project root
  3. And discovery for tests is made for any file starting with test_
  4. Run npx playwright test --ui

Expected behavior

  1. Tests should be found in UI mode

Actual behavior

  1. Tests are not found.

Additional context

  1. Tests are found when you go inside the test directory and then run the same command.

Environment

npx envinfo --preset playwright

  System:
    OS: Windows 11 10.0.22631
    CPU: (22) x64 Intel(R) Core(TM) Ultra 7 155H
    Memory: 13.71 GB / 31.58 GB
  Binaries:
    Node: 20.15.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
  IDEs:
    VSCode: 1.95.3 - E:\Project\Project_Tools\Microsoft VS Code\bin\code.CMD
  Languages:
    Bash: 5.1.16 - C:\Windows\system32\bash.EXE
  npmPackages:
    @playwright/test: ^1.48.0 => 1.49.0
@mxschmitt
Copy link
Member

Do you have your playwright.config.ts in a sub-directory? You can specify it when running UI Mode via

npx playwright test --ui --config=./foo/playwright.config.ts

If this doesn't work, we need a small reproduction repository in order to triage this issue further. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants