File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
app/src/androidTest/java/com/pcapplusplus/toyvpn Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package com.pcapplusplus.toyvpn
33import androidx.compose.material3.Text
44import androidx.compose.ui.test.assertIsDisplayed
55import androidx.compose.ui.test.assertIsEnabled
6- import androidx.compose.ui.test.assertIsNotEnabled
76import androidx.compose.ui.test.assertTextEquals
87import androidx.compose.ui.test.junit4.createComposeRule
98import androidx.compose.ui.test.onNodeWithTag
@@ -204,7 +203,14 @@ class StatsScreenTest {
204203 fun testVpnDisconnecting () {
205204 renderScreen(vpnConnectionState = VpnConnectionState .DISCONNECTING )
206205
207- composeTestRule.onNodeWithText(" Disconnecting..." ).assertIsDisplayed().assertIsNotEnabled()
206+ composeTestRule.waitUntil(timeoutMillis = 10000 ) {
207+ try {
208+ composeTestRule.onNodeWithText(" Disconnecting..." ).fetchSemanticsNode()
209+ true
210+ } catch (ex: AssertionError ) {
211+ false
212+ }
213+ }
208214 }
209215
210216 @Test
You can’t perform that action at this time.
0 commit comments