mattinger
02/12/2025, 7:14 PMrunCompositionTest {
MaterialTheme(colors = darkColors()) {
assertThat(getButtonColors()).isEqualTo(buttonColorsDark())
}
}
It's a bit of hokey colde that has to create it's own composition, recomposer, manage the snapshot system, etc.... I wrote this stuff way back when based on a stackoverflow post. I'm wondering if there's some better way in the testing toolkit as compose has evolved over time. I don't see anyway to do with with runComposeUiTest or any of it's variants.Zach Klippenstein (he/him) [MOD]
02/12/2025, 7:22 PMZach Klippenstein (he/him) [MOD]
02/12/2025, 7:22 PMmattinger
02/12/2025, 7:31 PMZach Klippenstein (he/him) [MOD]
02/12/2025, 7:40 PMmattinger
02/12/2025, 8:49 PMZach Klippenstein (he/him) [MOD]
02/12/2025, 8:53 PMmattinger
02/13/2025, 2:26 PMZach Klippenstein (he/him) [MOD]
02/13/2025, 9:58 PM