-
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
Angular component test is not triggering autoDetectChanges #26990
Comments
@NicolasCaous Are you able to create reproducible example of the issue you're encountering with the code you included above? Here are some tips for providing a Short, Self Contained, Correct, Example and our own Troubleshooting Cypress guide. Forking Cypress Test Tiny makes sharing a reproducible example easier to share and easier for our engineers to replicate your issues. This method also keeps the reproduction as simple as possible, which helps us eliminate potential causes and noise from the investigation. That would be a big help to get us to be able to reproduce your issue the quickest. Thanks! |
Hi @warrensplayer, I need to wait for #27030 before doing that. I tried doing it now, but Cypress kept throwing errors for angular 16.1.0. |
Hey @NicolasCaous , just wanted to let you know that Angular 16.1.0 support was released yesterday in Cypress 12.16.0. Looking forward to a reproduction case whenever you have a few minutes to upgrade and take a look |
Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen. |
I have issues with cypress I just don't understand how to await something when its about an observable. I get the points when its about UI but what if I have a subject which I want to await for the next object or I have just a 'store' which I expect a value to be. It seems like somehow the async code executes after the sync. |
@muhamedkarajic Issues in repo are reserved for bug reports and feature requests. Check out the Cypress Discord Community , it can be helpful for debugging or answering questions on how to use Cypress. |
I would like to reopen this issue. I have created a reproducible fork of the cypress-test-tiny repo here. Edit: It seems that it is required to detect changes after navigation, this causes observable changes to update properly |
Current behavior
I encountered the following situation: I had to test what would happen when a component that uses observables as input changed data. Here is the component:
Here is the test:
However, when inputDisabled emits a new value for the second time, the data detection cycle is not starting. Resulting in a broken stale state. The logs show that RxJS processed the data correctly:
However, the result rendered on the DOM is not the latest value emitted
After manually triggering the change detection, it works:
Desired behavior
autoDetectChanges
should workTest code to reproduce
Cypress Version
v12.14.0
Node version
v18.10.0
Operating System
windows 10
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: