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]: Various Project Configurations for different browsers do not show in UI mode when tests are located in sub directory. #34050

Open
ScarletMcLearn opened this issue Dec 17, 2024 · 9 comments

Comments

@ScarletMcLearn
Copy link

Version

1.49.1

Steps to reproduce

Initialize default playwright project typescript
Open UI mode
Tests show up in UI mode with various Project browser configuration.

Move the tests to a subdirectory
Open UI mode
Tests show up in UI mode without the various Project browser configuration.

Expected behavior

Tests show up in UI mode with various Project browser configuration.

Actual behavior

Tests show up in UI mode without the various Project browser configuration.

Additional context

Test path:
src/tests/form_page.ts

PW Config: https://paste.ubuntu.com/p/zhGvv5Zw5W/

Environment

npx envinfo --preset playwright

  System:
    OS: Windows 11 10.0.26100
    CPU: (22) x64 Intel(R) Core(TM) Ultra 7 155H
    Memory: 7.18 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.96.0 - E:\Project\Project_Tools\Microsoft VS Code\bin\code.CMD
  Languages:
    Bash: 5.1.16 - C:\Windows\system32\bash.EXE
  npmPackages:
    @playwright/test: ^1.49.1 => 1.49.1
@pavelfeldman
Copy link
Member

What is "various Project browser configuration"? Please follow the issue template and file something we can reproduce locally.

@ScarletMcLearn
Copy link
Author

I have shared the config in the link above.
I am sharing a demo project which uses the config. CR.zip

@pavelfeldman
Copy link
Member

It is unclear what your expectations are and what the actual behavior is. Could you be more specific? The archive you attach is an empty folder with the git index files.

@ScarletMcLearn
Copy link
Author

Thank you for the support.

For your clarification, this is what I get when the tests are moved to a subdirectory:
https://ibb.co.com/ZMb4Nbd

This is what I get when the tests are moved to the project root directory:
https://ibb.co.com/qmx9bww

I want the different browsers to show even when the tests are in subdirectory.

Please suggest.

@pavelfeldman
Copy link
Member

When you run it in subdirectory it does not see your config file. Run it in the outer directory.

@ScarletMcLearn
Copy link
Author

Can you please tell how to run in outer directory?
I am using ' npx playwright test --ui ` from the root directory.

@pavelfeldman
Copy link
Member

I am using ' npx playwright test --ui ` from the root directory.

That's the right way of running. Sadly I can't help much without a clear minimal repro.

@ScarletMcLearn
Copy link
Author

I am sharing the repo again.
Please suggest.

https://ufile.io/p3r9wrpz

@pavelfeldman
Copy link
Member

Works same way for me in folder and subfolder. Did you enable all the projects? 
Image

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