File tree 2 files changed +4
-4
lines changed
JetNews/app/src/androidTest/java/com/example/jetnews 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ class JetnewsUiTest {
50
50
@Ignore(" Ignoring because of https://issuetracker.google.com/154617105" )
51
51
@Test
52
52
fun app_opensArticle () {
53
- findAllBySubstring(" Manuel Vivo" ).first() .doClick()
54
- findAllBySubstring(" July 30 • 3 min read" ).first() .assertIsDisplayed()
53
+ findAllBySubstring(" Manuel Vivo" )[ 0 ] .doClick()
54
+ findAllBySubstring(" July 30 • 3 min read" )[ 0 ] .assertIsDisplayed()
55
55
}
56
56
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import androidx.compose.Composable
21
21
import androidx.ui.material.MaterialTheme
22
22
import androidx.ui.material.Surface
23
23
import androidx.ui.test.ComposeTestRule
24
- import androidx.ui.test.SemanticsNodeInteraction
24
+ import androidx.ui.test.SemanticsNodeInteractionCollection
25
25
import androidx.ui.test.findAll
26
26
import androidx.ui.test.hasSubstring
27
27
import com.example.jetnews.ui.JetnewsApp
@@ -60,7 +60,7 @@ fun ComposeTestRule.setMaterialContent(children: @Composable() () -> Unit) {
60
60
}
61
61
}
62
62
63
- fun findAllBySubstring (text : String , ignoreCase : Boolean = false): List < SemanticsNodeInteraction > {
63
+ fun findAllBySubstring (text : String , ignoreCase : Boolean = false): SemanticsNodeInteractionCollection {
64
64
return findAll(
65
65
hasSubstring(text, ignoreCase)
66
66
)
You can’t perform that action at this time.
0 commit comments