Bradleycorn
02/20/2022, 11:20 PMcreateAndroidComposeRule()
?
I do not want or need to load my app’s main activity. That would load all of my application content, and this is a Unit Test for a single composable. But I need to get a string resource to test with.Bradleycorn
02/20/2022, 11:30 PMval context = ApplicationProvider.getApplicationContext<Application>()
val contentDescription = context.getString(R.string.my_button_description)
composeRule.onNodeWithContentDescription(contentDescription).assertIsDisplayed()
allan.conda
02/21/2022, 1:14 AMAlbert Chang
02/21/2022, 1:57 AMcreateAndroidComposeRule<ComponentActivity>()
. This is what createComposeRule()
actually uses internally.Bradleycorn
02/21/2022, 1:48 PM