-
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
"Your tests are loading..." shown but no component tests are run #23903
Comments
@JonRossway I was able to reproduce your issue and I was able to fix it by removing the commented code from your This is the result when leaving the comments in there if you're curious, you'll notice the <!-- <!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="lib/vendor/materialize.min.js"></script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Components App</title>
<script defer src="/__cypress/src/main.js"></script></head>
<body class="light materialize striim">
<div data-cy-root id="app"></div>
<div id="react-content"></div>
</body>
</html> -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
</html> |
That worked! Thank you so much for your help, @ZachJW34 !! |
Glad I could help! |
getting same issue, but in my case I can not fixed with that workaround |
getting the same issue, but in my case, I can not fix with that workaround |
I'm also facing the same problem. I have everything updated to the last version and it still does not execute any test. |
Good day I am experiencing the same issue, if there is any advise or pointers, that would be great. We have an existing project that has E2E tests with Cypress and we want to get started with component testing (the project uses React18.1.0 and Vite4.0.4). I followed the guide and did the configuration for component testing. But cannot get past the "Your tests are loading" even when using example code with the stepper. We previously ran Cypress 12.4, but I upgraded it now to Cypress 12.9.0 as I though that might be the issue. Here is my config file (cypress.config.cjs) and also the component.js (what is strange here is that the mount is indicated as an error). Lastly the, component-index.html. Any help would be great. Thank you! |
@victoria-ov Are you able to run your component tests in run mode with |
@victoria-ov is this still an issue? |
Hi, sorry, work priorities shifted and only responding now. So the component test runner opens, but the test only loads. Attached is the network tab and also the error log. Any advise or guidance would be great. |
I was running into this same issue, and for me it was due to an issue in my In my specific case, I'm using a Vite plugin that allows it to work with Rails, so removing that fixed my issue. But I imagine if any of these plugins don't work in the Cypress environment, it would cause this error. |
I'm having the same issue as @victoria-ov. Any tips would be greatly appreciated! In the network tab, the test file gets stuck in pending status. Error log in terminal - could this be iframe related? In my
My
|
@Maxine-Chui Are you able to provide an actual example repo? If I create a new react vite project I'm not getting this issue you are describing. Also if you could check to see if removing any additional plugins like @matt-cratebind fixes the issue? |
My colleague was able to find the solution. He added the following vite configurations to the cypress.config.cjs file. This solved our issue.
Thank you for taking time to assist. |
I had the same issue, but it was because there was kinda a missmatch between my vite config and my cypress config. specifically with the "server" settings. make sure they are hosted on the same host, same port, and ssl certs are still there if using a custom domain other than localhost |
I had tried Victoria's solution but then it didn't seem like the |
Hi, Here is a reproduction repo of my code: https://github.com/carwack/cypress-issue-test-loading |
Thanks for the reproduction @carwack, I was able to reproduce locally, so I am routing to the team to take a closer look at this scenario. |
Hey team! Please add your planning poker estimate with Zenhub @astone123 @jordanpowell88 @lmiller1990 @marktnoonan @mike-plummer |
I may have this same problem on: my tests do not load up, however i also don't see an error, it just hangs forever
i am only just now setting up component tests so this would be new, we have a bunch of stuff in e2e, however i am hoping that stuff isn't pulled into component tests overall. |
We encountered this after upgrading from Cy 6.x to 11.x (after bad experiences in the past with Cy stability, we were trying to avoid the 'bleeding edge' of Cypress). We were able to overcome it for some tests, but not all, after taking the steps below. We haven't yet had the cycles to isolate what is different about the tests which still hang. We do notice that when running the tests via Cy GUI (i.e. in
Adding this snippet to our cypress config object fixed one test
|
A variety of things could cause this - is anyone seeing an error in their console or terminal? If not, please try to make a minimal reproduction - it's likely an issue in our dev server trying to automatically find your dev server configuration (webpack or vite) and something is going wrong somewhere along the line. |
@lmiller1990 I do not got any errors in my console or terminal. This is reproduction I've created before: https://github.com/carwack/cypress-issue-test-loading |
I have the same problem when trying component testing (E2E Testing works great) I am attaching the log
|
I've faced this same issue and after a long research I've identified that my problem is related to webpack build, so I've tried to build(npm run build) and my webpack run out of memory(WSL), I've 32GB of RAM and this still happends, so I just run this export NODE_OPTIONS=--max_old_space_size=8192 and cypress work again, took me some months to discover this as cypress doesn't stop or show errors related to webpack build(just when succeed). Hope I can help you(I've never found that related solution). |
@matheuspellegrini we also use webpack. So we tried your suggestion. Unfortunately doesn't make a difference for us. You did point us in the direction of resource usage. Running |
Sorry friends, there's lots of issues to triage and only so many hours in a day. I'll do my best to reply to each comment here. The "Your test are loading..." means something is not working in the dev server - likely an error that is not correctly caught, so the spec never loads. @mberneis I reproduced your error. I was able to get it to break with either If you just want it to work, and don't actually need the import { defineConfig } from "cypress";
import viteConfig from './vite.config.mjs'
export default defineConfig({
component: {
devServer: {
framework: "vue",
bundler: "vite",
viteConfig: async () => {
const { https, ...server } = viteConfig.server
const plugins = viteConfig.plugins.filter(x => x.name !== 'vite:basic-ssl')
return {
...viteConfig,
plugins,
server,
}
}
},
},
}); I used this to get your Stepper component test to render. @marracuene and @matheuspellegrini sorry you are hitting issues. I suspect something is getting caught in a loop, or there is a silent webpack error not getting caught (some webpack errors cannot be caught, or at least, I haven't found a good way to manifest them in the Cypress UI). I don't think it's a memory issue, 32 GB is huge (I only have 16GB and haven't had any issues, even on big webpack projects). If either of you can strip make your repo and make a minimal reproduction, I can clone it and take a look. Without additional information, I can't provide much insight. |
I am experiencing the same issue. E2E tests run perfectly yet i'm getting the same loading screen trying to setup the component tests. No console errors nothing. This is for Vue3 with Vite |
@whitespacecode please share a minimal reproduction. This is the best way to get help. Alternatively, share your |
@lmiller1990 It's a large project, it's hard to reproduce a minimal reproduction. My vite.config i can share. We use Inertiajs, and laravel but i'm sure for standalone components this wouldn't mater as much as e2e testing.
|
Thanks for sharing. Take a look at:
If you are still having issues, it might be worth opening a dedicated issue. We will need something more than a configuration to go on, is it really not possible to make a new laravel project with a similar config? For now I'm closing this issue, since it's tracking something likely unrelated. Happy to help you in a new issue, ideally with more information. Thanks! |
I am experiencing the same issue as @victoria-ov I am runing cypress version 12.17.2 and I did what @victoria-ov did but there no solution can somebody guide me how to solve it |
I am having the same issue when |
@Daria-22 You've misspelled 'watchForFileChanges'. Probably not related, but I'm unable to reproduce this behavior with your example. What browser are you running? |
Current behavior
I am trying to run a single spec file (any spec file fails to run) and am stuck with "Your tests are loading..." after upgrading to the latest Cypress from v9.6
Desired behavior
Cypress should run the component test
Test code to reproduce
cypress-io/cypress-test-tiny@master...JonRossway:cypress-test-tiny:master
Cypress Version
v10.8.0
Node version
v14.20.0
Operating System
macOS v12.6
Debug Logs
Debug logs don't provide any additional context
Other
No response
The text was updated successfully, but these errors were encountered: