alorma
junit.framework.AssertionFailedError: No tests found in com.alorma.coupons.CouponTicketTest
class CouponTicketTest { @get:Rule val composeTestRule = createComposeRule() @Test fun collapsedCouponTicket() { composeTestRule.setContent { CouponsTheme { CouponItem(coupon = COUPON_PERCENTAGE_COLLAPSED, onClick = { /*TODO*/ }) } } composeTestRule.onNodeWithContentDescription("Start date $START_DATE").assertIsDisplayed() composeTestRule.onNodeWithText(PERCENTAGE_DISCOUNT).assertIsDisplayed() composeTestRule.onNodeWithText(START_DATE).assertIsDisplayed() composeTestRule.onNodeWithText(EXPIRE_DATE).assertDoesNotExist() } companion object { private const val PERCENTAGE_DISCOUNT = "3%" private const val START_DATE = "22/07/2021" private const val EXPIRE_DATE = "20/08/2021" private val COUPON_PERCENTAGE_COLLAPSED = CouponItemViewModel( id = CouponId("1"), message = "Por compras superiores a 15€", startDate = START_DATE, expireDate = EXPIRE_DATE, value = "3", type = CouponType.PERCENTAGE, expanded = true, ) } }
Vitaliy Zarubin
A modern programming language that makes developers happier.