-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathGithubScreenTest.kt
48 lines (41 loc) · 1.39 KB
/
GithubScreenTest.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithText
import nextstep.github.data.model.RepositoryModel
import nextstep.github.ui.screen.github.GithubScreen
import org.junit.Rule
import org.junit.Test
class GithubScreenTest {
@get:Rule
val composeTestRule = createComposeRule()
val repositoryList = listOf(
RepositoryModel(
id = 1,
fullName = "next-step/nextstep-docs",
description = "nextstep 매뉴얼 및 문서를 관리하는 저장소",
),
RepositoryModel(
id = 2,
fullName = "next-step/holy-moly",
description = "nextstep 홀리몰리한 저장소",
),
RepositoryModel(
id = 3,
fullName = "next-step/haly-galy",
description = "nextstep 할리갈리한 저장소",
),
)
@Test
fun Github_레포지토리_데이터가_정상적으로_화면에_출력된다() {
composeTestRule.setContent {
GithubScreen(
repositoryList = repositoryList,
)
}
composeTestRule.onNodeWithText("next-step/nextstep-docs")
.assertExists()
composeTestRule.onNodeWithText("next-step/holy-moly")
.assertExists()
composeTestRule.onNodeWithText("next-step/haly-galy")
.assertExists()
}
}