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

Only show Codelens for certain test files #60

Open
ThomasStock opened this issue Jul 7, 2021 · 1 comment
Open

Only show Codelens for certain test files #60

ThomasStock opened this issue Jul 7, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@ThomasStock
Copy link

In our project we have both 'normal' unit tests and cypress tests.
With the extension, we get the open cypress | Set "only" codelens options for unit tests as well.

It would be great if we could limit the codelens to a certain folder or filepath filter instead of showing for every it().

@ThomasStock ThomasStock added the enhancement New feature or request label Jul 7, 2021
Shelex added a commit to Shelex/vscode-cy-helper that referenced this issue Jul 27, 2021
@Shelex
Copy link
Contributor

Shelex commented Jul 27, 2021

Hi @ThomasStock
Thank you for opening an issue.
Due to publishing token expiration and missing option to regenerate new one I have published fix for this issue and plugin itself under my personal account from fork.

Basically it is solved by providing a configuration option cypressHelper.cypressCodeLensePattern where you can specify glob pattern for folders which should enable code lenses.
By default it will check files only inside cypress folder with extensions .js, .ts and .feature.
You can customize default pattern by specifying your folder, for example if you have integration/e2e tests inside folder e2e, then you have to change default pattern to:
"cypressHelper.cypressCodeLensePattern": "**/e2e/**/*.+(js|ts|feature)".

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

No branches or pull requests

2 participants