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

CT: cypress doesn't recognize "+" symbol in the path to the Angular component #29493

Open
bobige opened this issue May 9, 2024 · 5 comments
Open
Labels
CT Issue related to component testing good first issue Good for newcomers npm: @cypress/angular @cypress/angular package issues type: bug

Comments

@bobige
Copy link

bobige commented May 9, 2024

Current behavior

Importing an angular component into a test file, when the component folder name starts with a "+" symbol, is not possible.

Desired behavior

Cypress imports components that have the "+" symbol at the start of the containing folder name.

Test code to reproduce

  1. Create a new Angular 15 project.
  2. Create a component in a folder that has the "+" sign in front of it
  3. Create a basic test file for the component and just mount it.
  4. See error

Cypress Version

13.9.0

Node version

v16.18.1

Operating System

Windows 10.0.19045 Build 19045

Debug Logs

No response

Other

I am configuring Cypress to test Angular 15 components. We have a naming convention to put the "+" sign in front of the folder name, containing the component files. When I mount the component, cypress gives a "No tests found" error, which according to the documentation could be caused by a syntax error.

It is easily reproduceable. Create a new Angular 15 project and create a component in a folder that has the "+" sign in front of it. I also use Chrome 124:

image

If I remove the "+" sign or even change the naming to have a different special character, such as "_", it works:

image

@bobige bobige changed the title CT: cypress doesn't recognize "+" symbol in the path to the component CT: cypress doesn't recognize "+" symbol in the path to the Angular component May 9, 2024
@jennifer-shehane jennifer-shehane added type: bug npm: @cypress/angular @cypress/angular package issues good first issue Good for newcomers labels May 9, 2024
@H0onnn
Copy link

H0onnn commented May 9, 2024

@jennifer-shehane Hello ! Can I solve this problem ?

@jennifer-shehane
Copy link
Member

@H0onnn Yes, please follow our contributing guidelines and write a test for the behavior and we could review.

@H0onnn
Copy link

H0onnn commented May 14, 2024

@jennifer-shehane Hello, is there a way to check if the test works properly with the modified code in my local environment?

@jennifer-shehane jennifer-shehane added the CT Issue related to component testing label May 15, 2024
@bobige
Copy link
Author

bobige commented May 22, 2024

@H0onnn @jennifer-shehane Hello, is there any progress on this issue?

@jennifer-shehane
Copy link
Member

@bobige No, this is open to contributors if someone wants to make a PR though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CT Issue related to component testing good first issue Good for newcomers npm: @cypress/angular @cypress/angular package issues type: bug
Projects
None yet
Development

No branches or pull requests

3 participants