Hi i'm trying an android compose UI test with rule that launch activity using declareMock but it's not seem working. The test use original object and not the mock. And no documentation with android compose activity rule
pitpit
10/18/2024, 9:47 AM
Using this :
Copy code
@get:Rule(order = 3)
val composeTestRule = createAndroidComposeRule<MainActivity>()
pitpit
10/21/2024, 12:11 PM
to fix it i must not use rule createAnrdroidComposeRule, replaced with and now declareMock works fine :
Copy code
@Test
fun myTest() = runAndroidComposeUiTest<MainActivity> {...}