From 8ce0082687fcc25b1776c787a0a94951e4eb476e Mon Sep 17 00:00:00 2001 From: pluu Date: Fri, 27 Dec 2024 01:19:46 +0900 Subject: [PATCH] Basic EpisodeTopUi Composable test --- .../episode/ui/compose/EpisodeTopUiTest.kt | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 features/ui-episode/src/androidTest/java/com/pluu/webtoon/episode/ui/compose/EpisodeTopUiTest.kt diff --git a/features/ui-episode/src/androidTest/java/com/pluu/webtoon/episode/ui/compose/EpisodeTopUiTest.kt b/features/ui-episode/src/androidTest/java/com/pluu/webtoon/episode/ui/compose/EpisodeTopUiTest.kt new file mode 100644 index 00000000..c96afcfc --- /dev/null +++ b/features/ui-episode/src/androidTest/java/com/pluu/webtoon/episode/ui/compose/EpisodeTopUiTest.kt @@ -0,0 +1,31 @@ +package com.pluu.webtoon.episode.ui.compose + +import androidx.activity.ComponentActivity +import androidx.compose.material3.MaterialTheme +import androidx.compose.ui.test.junit4.createAndroidComposeRule +import androidx.compose.ui.test.onNodeWithText +import org.junit.Rule +import org.junit.Test + +class EpisodeTopUiTest { + @get:Rule + val composeTestRule = createAndroidComposeRule() + + @Test + fun t1() { + composeTestRule.setContent { + EpisodeTopUi( + title = "Test", + backgroundColor = MaterialTheme.colorScheme.background, + contentColor = MaterialTheme.colorScheme.onBackground, + isFavorite = false, + onBackPressed = {}, + onFavoriteClicked = {} + ) + } + + composeTestRule + .onNodeWithText("Test") + .assertExists() + } +} \ No newline at end of file