Skip to content

Commit f040e72

Browse files
committed
Increase timeout and run assertExists() first
1 parent 5a36e53 commit f040e72

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/src/androidTest/java/com/pcapplusplus/toyvpn/StatsScreenTest.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,11 @@ class StatsScreenTest {
230230

231231
Log.e("StatsScreenTest", composeTestRule.onNodeWithText("Disconnecting...").printToString())
232232

233-
composeTestRule.waitUntil(timeoutMillis = 10000) {
233+
composeTestRule.waitUntil(timeoutMillis = 20000) {
234234
try {
235-
composeTestRule.onNodeWithText("Disconnecting...").assertIsDisplayed()
235+
val node = composeTestRule.onNodeWithText("Disconnecting...")
236+
node.assertExists()
237+
node.assertIsDisplayed()
236238
true
237239
} catch (ex: AssertionError) {
238240
false

0 commit comments

Comments
 (0)