The ability to introspect the actual status of the Conan State can prove very helpful when testing complex actions.
Async actions without transactions
The first use case where this can be very handy is when it comes to waiting for a few async actions to complete.
As you can see, if you have overlapping async actions, you can just run them all together, and wait for the idle status which will be triggered as soon all of them all resolved.
Any action with transactions
For more complex cases, or when you want to bundle synchronous actions, you can leverage transactions.
If you open a transaction, the Conan State machine would not reach IDLE until the transaction should be IDLE AND the transaction is closed.
This could be useful if you are not sure of the nature of the timing of the actions that you are testing. In these cases, you could open a transaction, launch all of your actions, and then, close the transaction and listen for the next IDLE.
The feeling when you can easily test E2E your state