Angular Component Testing Not Working "Cannot GET /__cypress/src/index.html"
See original GitHub issueCurrent behavior
When I try and run a component test with Angular I am getting this on the test runner “Cannot GET /__cypress/src/index.html”:
Along with this in the console:
Desired behavior
It should just load the Dashboard Component and nothing else atm.
Test code to reproduce
This is the spec file contents:
import { DashboardComponent } from "src/app/home/components/dashboard.component"
describe('ComponentName.cy.ts', () => {
it('Test', () => {
cy.mount(DashboardComponent)
})
})
Cypress Version
10.6.0
Node version
v16.14.0
Operating System
Win10
Debug Logs
No response
Other
Cypress is installed inside the ClientApp folder of our Angular application Angular versions:
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Component testing error loading spec - Cannot GET ...
I believe I've followed all the steps given in the docs, but I'm getting an error when loading the spec. Cannot GET /__cypress/src/index.html....
Read more >Component Testing: Nextjs - Cannot GET /__cypress/src/ ...
Getting this message - Cannot GET /__cypress/src/index.html when trying run button.cy.jsx component Testing. What need to do?
Read more >Getting Started with Angular Component Testing - YouTube
We are excited to announce that in Cypress version 10.5 we've added support for Component Testing in Angular ! Cypress Component Testing ......
Read more >Component Testing Config
Component Testing Config. When you launch Cypress for the first time in a project, the app will automatically guide you through setup and...
Read more >Component testing scenarios
For a use case in which TestBed.inject() does not work, see the Override component providers section that explains when and why you must...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I do get the same issue when mounting a component.
Cypress Version: 10.6 Angular
Same when trying to write a component test in this repo https://gitlab.com/winni/angular-sudoku - throws types errors and 404