I've set up Cypress and tried to integrate it into our pipeline. So far, I got Cypress up and running and a few working tests that run successfully using the GUI.
Now when trying to integrate it into our Teamcity pipeline and running docker-compuse up --exit-code-from cypress
I am consistently getting: Error: No element found that matches selector [data-cy-root]. Please add a root element with data-cy-root attribute to your "component-index.html" file so that Cypress can attach your component to the DOM.
Desired behavior
It should run successfully, since all the config is set up correctly and there is a component-index.html with a data-cy-root included.
Current behavior
I've set up Cypress and tried to integrate it into our pipeline. So far, I got Cypress up and running and a few working tests that run successfully using the GUI.
Now when trying to integrate it into our Teamcity pipeline and running
docker-compuse up --exit-code-from cypress
I am consistently getting:
Error: No element found that matches selector [data-cy-root]. Please add a root element with data-cy-root attribute to your "component-index.html" file so that Cypress can attach your component to the DOM.
Desired behavior
It should run successfully, since all the config is set up correctly and there is a component-index.html with a data-cy-root included.
Test code to reproduce
docker-compose.yaml located in root
cypress.config.ts located inside root/web-app
inside root/web-app I have a cypress folder containing all the default files untouched: commands.ts component-index.html component.ts e2e.ts
inside root/web-app/cypress/tests I have my test: ChatBody.spec.tsx:
Ive tried the latest version 13.14.2 and 12.17.4 both same error.
Cypress Version
13.14.2
Node version
14.17.2
Operating System
macOs 14.6.1 (23G93)
Debug Logs
No response
Other
No response