Open muhamedkarajic opened 4 months ago
@muhamedkarajic Could you give an example of Cypress running against this component?
@muhamedkarajic Could you give an example of Cypress running against this component?
I'll try to do one tomorrow. Its production code and the component is quit the component. However it should be possible to reproduce this. Ty for the quick response.
@jennifer-shehane I have added for you a minimal demo in the initial comment.
I can confirm that I've experienced the same behavior.
@jennifer-shehane this is only in the component testing environment. Any updates? In case of any questions I will gladly answer them.
Current behavior
When I have a component and that component uses a custom interval which in the below example is called Tick. Once that tick is used in any service cypress is forever awaiting the changes. I assume it forever awaits the function stack to be empty.
Desired behavior
I wonder if cypress could maybe somehow detect such things and give a warrning rather then just not render my component which injects the service which then uses the tick. Ofc I can overcome the issue my making this a factory (service) which will provide me a special Tick when its a testing enviroment.
Test code to reproduce
Tick:
Service:
Component:
Cypress code:
Cypress Version
13.6.4
Node version
v18.16.0
Operating System
macOS 12.6.6
Debug Logs
Chrome version: 121.0.6167.160
Other
Please note its not good enough to simply use isSkippingTick cause it still will schedule to reexecute tryToTick. It really has to be so that there is none macro task scheduled in the que.