@@ -7,8 +7,6 @@ import androidx.compose.ui.test.assertIsDisplayed
77import androidx.compose.ui.test.junit4.createAndroidComposeRule
88import androidx.compose.ui.test.onAllNodesWithText
99import androidx.compose.ui.test.onNodeWithText
10- import androidx.navigation.compose.rememberNavController
11- import com.sample.tmdb.domain.R as domainR
1210import com.sample.tmdb.domain.model.FeedWrapper
1311import com.sample.tmdb.domain.model.Movie
1412import com.sample.tmdb.domain.model.SortType
@@ -17,6 +15,7 @@ import org.junit.Test
1715import org.mockito.ArgumentMatchers.anyDouble
1816import org.mockito.ArgumentMatchers.anyInt
1917import org.mockito.ArgumentMatchers.anyString
18+ import com.sample.tmdb.domain.R as domainR
2019
2120class FeedScreenTest {
2221 @get:Rule
@@ -27,44 +26,44 @@ class FeedScreenTest {
2726 with (composeTestRule) {
2827 setContent {
2928 FeedCollectionList (
30- navController = rememberNavController(),
3129 collection =
32- listOf (
33- FeedWrapper (
34- feeds =
35- listOf (
36- Movie (
37- anyInt(),
38- anyString(),
39- anyString(),
40- anyString(),
41- anyString(),
42- " title" ,
43- anyDouble(),
44- anyInt(),
45- ),
30+ listOf (
31+ FeedWrapper (
32+ feeds =
33+ listOf (
34+ Movie (
35+ anyInt(),
36+ anyString(),
37+ anyString(),
38+ anyString(),
39+ anyString(),
40+ " title" ,
41+ anyDouble(),
42+ anyInt(),
43+ ),
44+ ),
45+ domainR.string.text_trending,
46+ SortType .TRENDING ,
4647 ),
47- domainR.string.text_trending,
48- SortType . TRENDING ,
49- ),
50- FeedWrapper (
51- feeds =
52- listOf (
53- Movie (
54- anyInt (),
55- anyString(),
56- anyString() ,
57- anyString (),
58- anyString (),
59- " name " ,
60- anyDouble( ),
61- anyInt() ,
62- ) ,
48+ FeedWrapper (
49+ feeds =
50+ listOf (
51+ Movie (
52+ anyInt(),
53+ anyString(),
54+ anyString(),
55+ anyString (),
56+ anyString(),
57+ " name " ,
58+ anyDouble (),
59+ anyInt (),
60+ ) ,
61+ ),
62+ domainR.string.text_popular ,
63+ SortType . MOST_POPULAR ,
6364 ),
64- domainR.string.text_popular,
65- SortType .MOST_POPULAR ,
6665 ),
67- ) ,
66+ {} ,
6867 ) {}
6968 }
7069 onNodeWithText(activity.getString(domainR.string.text_trending)).assertIsDisplayed()
@@ -81,24 +80,24 @@ class FeedScreenTest {
8180 setContent {
8281 PagerTMDbItemContainer (
8382 feedWrapper =
84- FeedWrapper (
85- feeds =
86- listOf (
87- Movie (
88- anyInt(),
89- anyString(),
90- anyString(),
91- anyString(),
92- anyString(),
93- " title" ,
94- anyDouble(),
95- anyInt(),
96- ),
83+ FeedWrapper (
84+ feeds =
85+ listOf (
86+ Movie (
87+ anyInt(),
88+ anyString(),
89+ anyString(),
90+ anyString(),
91+ anyString(),
92+ " title" ,
93+ anyDouble(),
94+ anyInt(),
95+ ),
96+ ),
97+ domainR.string.text_popular,
98+ SortType .MOST_POPULAR ,
9799 ),
98- domainR.string.text_popular,
99- SortType .MOST_POPULAR ,
100- ),
101- navController = rememberNavController(),
100+ {},
102101 ) {}
103102 }
104103 onNodeWithText(activity.getString(domainR.string.text_popular)).assertIsDisplayed()
@@ -144,8 +143,7 @@ class FeedScreenTest {
144143 domainR.string.text_popular,
145144 SortType .MOST_POPULAR ,
146145 ),
147- navController = rememberNavController(),
148- )
146+ ) {}
149147 }
150148 onNodeWithText(activity.getString(domainR.string.text_popular)).assertIsDisplayed()
151149 onNodeWithText(" More" ).assertIsDisplayed()
@@ -158,18 +156,18 @@ class FeedScreenTest {
158156 setContent {
159157 Feeds (
160158 feeds =
161- listOf (
162- Movie (
163- anyInt(),
164- anyString(),
165- anyString(),
166- anyString(),
167- anyString(),
168- " title" ,
169- anyDouble(),
170- anyInt(),
159+ listOf (
160+ Movie (
161+ anyInt(),
162+ anyString(),
163+ anyString(),
164+ anyString(),
165+ anyString(),
166+ " title" ,
167+ anyDouble(),
168+ anyInt(),
169+ ),
171170 ),
172- ),
173171 onFeedClick = {},
174172 index = 0 ,
175173 )
0 commit comments