Skip to content

Commit bce0d2a

Browse files
Manuel Vivomanuelvicnt
Manuel Vivo
authored andcommittedDec 16, 2019
Addresses PR comments
1 parent 02bcdda commit bce0d2a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed
 

‎JetNews/app/src/androidTest/java/com/example/jetnews/JetnewsUiTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class JetnewsUiTest {
4747
@Test
4848
fun app_opensArticle() {
4949
findAllByText("Manuel Vivo").first().doClick()
50-
workForComposeToBeIdle()
50+
waitForComposeToBeIdle()
5151
findByText("July 30 • 3 min read").assertIsDisplayed()
5252
}
5353
}

‎JetNews/app/src/androidTest/java/com/example/jetnews/TestHelper.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ fun JetnewsStatus.resetState() {
5353
fun ComposeTestRule.setMaterialContent(children: @Composable() () -> Unit) {
5454
setContent {
5555
MaterialTheme {
56-
Surface(children = children)
56+
Surface {
57+
children()
58+
}
5759
}
5860
}
5961
}
@@ -62,7 +64,7 @@ fun ComposeTestRule.setMaterialContent(children: @Composable() () -> Unit) {
6264
* Workarounds, these functions should be removed when UI testing improves
6365
*/
6466

65-
fun workForComposeToBeIdle() {
67+
fun waitForComposeToBeIdle() {
6668
// Temporary workaround - use waitForIdle in dev04
6769
Thread.sleep(500)
6870
}

‎JetNews/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Mon Nov 25 14:20:04 GMT 2019
1+
#Mon Dec 16 15:55:18 CET 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)
Please sign in to comment.