Has there been talk about managing time of coroutines in integrated tests? I would like to manipulate clocks of coroutine schedulers for testing behaviour involving timers (in viewmodels, for example) in a predictable way. I don't want to inject a test scheduler directly because I want to verify UI state before and after delays, but skip them when needed from the test itself. I couldn't find any relevant docs
vide
11/21/2023, 4:31 PM
For example, there's a page with a viewmodel that launches a delay() to a viewModelScope. I want to verify initial UI state, then skip the delay, and then verify the new UI state after changes in the vm.
vide
11/21/2023, 4:32 PM
It seems like the existing test tools are mostly geared towards controlling unit tests
Now the main problem I would see is the test dispatchers will probably not run on the main thread, but I don't know if you need that for you integration tests.