cypress-documentation icon indicating copy to clipboard operation
cypress-documentation copied to clipboard

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

Open bobige opened this issue 1 year ago • 2 comments

Description

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

URL of Issue(s)

https://docs.cypress.io/guides/references/error-messages#No-tests-found

Steps to replicate

  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

Browser

Google Chrome 119

Device

  • [X] PC
  • [ ] Mac
  • [ ] iPhone
  • [ ] iPad
  • [ ] Android Phone
  • [ ] Android Tablet

Additional Information

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:

image

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

image

bobige avatar Mar 27 '24 11:03 bobige

Could you share more information? As it stands, it's a bit strange to assert something because I've been using this "+" symbol mapping quite a lot on the platform where I work. It will depend on how it's mapped.

Joao848846 avatar Jun 18 '24 22:06 Joao848846

@Joao848846 What additional information do you need? It is a new Angular 15 project, in which you add the "+" symbol in front of the folder name of a component and that's it. Cypress doesn't detect the path to the test files and displays "No tests found", as seen in the screenshot. It's reproduceable.

bobige avatar Jun 20 '24 07:06 bobige

Is it documentation issue or just cypress issue ???

senpl avatar Jul 09 '24 10:07 senpl

Is it documentation issue or just cypress issue ???

It's a cypress issue. I created it here by mistake, but I added the same issue in the other project as well Link

bobige avatar Jul 11 '24 07:07 bobige

Closing as duplicate

jennifer-shehane avatar Jul 30 '24 18:07 jennifer-shehane