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

[Feature Request] Allow mechanism to specify how to find project root #10

Open
zakhenry opened this issue Jul 21, 2022 · 3 comments
Open

Comments

@zakhenry
Copy link

I think this relates to the change that closed #3 and #6 - as I understand it Maestro reads up from the current directory the test is in until it finds a dir with a package.json file. This might work for some monorepos, but in my case I am using NX which has only one package.json (at the root), whereas I have multiple applications which have different playwright.config.ts files.

Would it be possible to configure the plugin so that it decides where to stop looking for a project base? In my case (NX) it would be either the existence of project.json, or actually playwright.config.ts.

here's a (cut down) example of the conventional directory structure in NX:

.
├── apps
│   ├── app-a
│   ├── app-a-e2e
│   │   ├── playwright.config.ts
│   │   ├── project.json
│   │   └── tests
│   │       └── example.spec.ts
│   ├── app-b
│   └── app-b-e2e
│       ├── playwright.config.ts
│       ├── project.json
│       └── tests
│           └── example.spec.ts
└── package.json

@zakhenry zakhenry changed the title Allow mechanism to specify how to find project root [Feature Request] Allow mechanism to specify how to find project root Aug 22, 2022
@zakhenry
Copy link
Author

@mbolotov any update on this one? My workaround workflow is quite fustrating - I need to play a test from the margin and let it fail then update the Run configuration program arguments to point to the appropriate path.

There is a workaround for one project which is to set a configuration template which I have done, but that means only one of my many projects in the monorepo works first time when clicking play

@mbolotov
Copy link
Owner

mbolotov commented Jan 4, 2023

Sorry, I have still no time to look into it... (
However, you can create and modify a run configuration with a single click without having to run it before:
image

@zakhenry
Copy link
Author

zakhenry commented Jan 4, 2023

Yep, true, though as it works for some of my tests (I have the base template configured for one project) I forget and am often in the habit of just running it and then remembering to adjust the config

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