compose-multiplatform-core
compose-multiplatform-core copied to clipboard
Implement LifecycleOwner in tests
Proposed Changes
- Implement
LifecycleOwner
in tests, provide it inLocalLifecycleOwner
- Provide the means to change
Lifecycle
inrunComposeUiTest
Testing
Test: LifecycleInTestsTest
Does Android provide LifecycleOwner in tests?
Does Android provide LifecycleOwner in tests?
I don't think so.
Delegating the review to m-sasha, as the owner of ui-test
@m-sasha LocalLifecycleOwner
should be available, yes.
For sending events: rule.scenario.moveToState(RESUMED)
If Android's ui-test doesn't include lifecycle stuff, I'm thinking maybe we shouldn't either. Can we provide the same functionality from e.g. lifecycle-test?