File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
app/src/androidTest/java/com/pcapplusplus/toyvpn Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package com.pcapplusplus.toyvpn
22
33import androidx.compose.material3.Text
44import androidx.compose.ui.test.assertIsDisplayed
5- import androidx.compose.ui.test.assertIsEnabled
65import androidx.compose.ui.test.assertTextEquals
76import androidx.compose.ui.test.junit4.createComposeRule
87import androidx.compose.ui.test.onNodeWithTag
@@ -102,7 +101,14 @@ class StatsScreenTest {
102101 fun testVpnConnected () {
103102 renderScreen()
104103
105- composeTestRule.onNodeWithText(" Disconnect" ).assertIsDisplayed().assertIsEnabled()
104+ composeTestRule.waitUntil(timeoutMillis = 10000 ) {
105+ try {
106+ composeTestRule.onNodeWithText(" Disconnect" ).assertExists()
107+ true
108+ } catch (ex: AssertionError ) {
109+ false
110+ }
111+ }
106112 }
107113
108114 @Test
@@ -205,7 +211,7 @@ class StatsScreenTest {
205211
206212 composeTestRule.waitUntil(timeoutMillis = 10000 ) {
207213 try {
208- composeTestRule.onNodeWithText(" Disconnecting..." ).fetchSemanticsNode ()
214+ composeTestRule.onNodeWithText(" Disconnecting..." ).assertExists ()
209215 true
210216 } catch (ex: AssertionError ) {
211217 false
You can’t perform that action at this time.
0 commit comments