Mia Clapham
09/28/2022, 6:34 PMMia Clapham
09/28/2022, 6:34 PM@Test
fun priceAlerts_LetsGoButton() {
setUpPriceAlertsComposable()
val button =
composeRule.onNodeWithText(context.getString(
R.string.improved_onboarding_V1_lets_go_button))
.assertExists()
button.assertIsDisplayed()
button.performClick().assertExists()
verify(mockViewModel).letsGoClick(any())
}
Alex Vanyo
09/28/2022, 6:41 PMMia Clapham
09/28/2022, 6:49 PMMia Clapham
09/28/2022, 6:50 PMAlex Vanyo
09/28/2022, 7:03 PMthis is a unit testWith Robolectric perhaps?
I think I need to make the column scrollable for smaller devices.That was going to be my next response: even if it was passing, I’d be suspicious of it not being scrollable. On smaller devices/landscape/multi-window/large fonts, you’re exactly right: that button might not be visible right away, and therefore the
assertIsDisplayed
is letting you know you have an issue.
Thank you for doing your part and considering those cases!Alex Vanyo
09/28/2022, 7:08 PMMia Clapham
09/28/2022, 7:34 PM