@@ -42,6 +42,7 @@ import com.jetbrains.toolbox.api.remoteDev.ui.EnvironmentUiPageManager
42
42
import com.jetbrains.toolbox.api.ui.ToolboxUi
43
43
import com.squareup.moshi.JsonEncodingException
44
44
import com.sun.net.httpserver.HttpServer
45
+ import io.mockk.coEvery
45
46
import io.mockk.mockk
46
47
import kotlinx.coroutines.CoroutineScope
47
48
import kotlinx.coroutines.runBlocking
@@ -56,6 +57,7 @@ import java.net.URL
56
57
import java.nio.file.AccessDeniedException
57
58
import java.nio.file.Path
58
59
import java.util.UUID
60
+ import kotlin.test.BeforeTest
59
61
import kotlin.test.Test
60
62
import kotlin.test.assertContains
61
63
import kotlin.test.assertEquals
@@ -68,8 +70,9 @@ private const val VERSION_FOR_PROGRESS_REPORTING = "v2.13.1-devel+de07351b8"
68
70
private val noOpTextProgress: (String ) -> Unit = { _ -> }
69
71
70
72
internal class CoderCLIManagerTest {
73
+ private val ui = mockk<ToolboxUi >(relaxed = true )
71
74
private val context = CoderToolboxContext (
72
- mockk< ToolboxUi >(relaxed = true ) ,
75
+ ui ,
73
76
mockk<EnvironmentUiPageManager >(),
74
77
mockk<EnvironmentStateColorPalette >(),
75
78
mockk<RemoteToolsHelper >(),
@@ -87,6 +90,11 @@ internal class CoderCLIManagerTest {
87
90
mockk<ToolboxProxySettings >()
88
91
)
89
92
93
+ @BeforeTest
94
+ fun setup () {
95
+ coEvery { ui.showYesNoPopup(any(), any(), any(), any()) } returns true
96
+ }
97
+
90
98
/* *
91
99
* Return the contents of a script that contains the string.
92
100
*/
0 commit comments