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

[Question] Global setup code not able to access from different folder #27770

Closed
iburahim786 opened this issue Oct 24, 2023 · 4 comments
Closed

Comments

@iburahim786
Copy link

image

The commented line works fine, I am trying globalsetup code from other file not working. Kindly suggest how to handle the globalsetup file in playwright config

@yury-s
Copy link
Member

yury-s commented Oct 24, 2023

Can you share more details about your project structure, which exact file is not matched by the expression? Would be best if you shared the project that is not working.

@iburahim786
Copy link
Author

sure, let me create some dummy project in github and share

@iburahim786
Copy link
Author

iburahim786 commented Oct 30, 2023

I hope the below helps you to find the project structure, If still want me to create a dummy project, I will do that.

And one more question, Why aren't able to ignore the jsonReports folder into git commit, Do we have any specific settings added in config files? If no dependencies, can we possibly ignore them?

image

@yury-s
Copy link
Member

yury-s commented Oct 30, 2023

From what I see you playwright.config.ts is in the top level folder, so the globalSetup.ts is under src/ui/config/globalSetup.ts which would not be matched by the filter from the first screenshot. (../config/globalSetup.ts).

I hope the below helps you to find the project structure, If still want me to create a dummy project, I will do that.

Please do. I'll close this bug to make it easier for the next bug triager to follow, so far all the information points to a misconfiguration. If you find it not be the case, create a new issue and attach your repro there, we'll have a look.

And one more question, Why aren't able to ignore the jsonReports folder into git commit, Do we have any specific settings added in config files? If no dependencies, can we possibly ignore them?

Adding them to .gitignore should work. This is a question to you git setup though, playwright should not affect that. If you think it does, please provide a repro project.

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