-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cypress component tests not loading assets with Angular #23797
Comments
@lydemann thanks for posting, I can verify that the assets aren't loading properly. I was able to implement a quick hack and get assets to load by editing the <head>
...
<base href="/__cypress/src/" />
</head> Could you give this a try and see if it works? Your image shows that it's failing to load This is definitely something we should be handling on our side but I'm curious if the hack works for you. |
Yes, that does work like that, but should probably also work as domain:port/assets/* Thanks for looking into it. |
Any updates? |
Same problem here. I wanted to add MSW using mockServiceWorker.js in assets, and it doesn't load it. |
The code for this is done in cypress-io/cypress#24106, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
It will not load assets:
Even though the dev server is copying the assets:
Desired behavior
It should load assets from eg.:
http://localhost:8080/assets
Test code to reproduce
https://github.com/lydemann/cypress-assets-bug
Cypress Version
10.7.0
Node version
16.14.2
Operating System
12.3.1
Debug Logs
No response
Other
Assets are not loaded, eg. the image in the repo
The text was updated successfully, but these errors were encountered: