test(#1164): isolate model integration tests from WS singleton
This commit is contained in:
1 parent
be6104b903
commit
f0f63c22cf
1 file changed
+5
-2
@@ -50,6 +50,7 @@ import com.m57.hermescontrol.data.remote.CleartextPolicy
|
|||||||
import com.m57.hermescontrol.data.remote.HermesApiService
|
import com.m57.hermescontrol.data.remote.HermesApiService
|
||||||
import com.m57.hermescontrol.data.remote.ServerEndpoint
|
import com.m57.hermescontrol.data.remote.ServerEndpoint
|
||||||
import com.m57.hermescontrol.data.ws.KanbanEventsClient
|
import com.m57.hermescontrol.data.ws.KanbanEventsClient
|
||||||
|
import com.m57.hermescontrol.data.ws.ModelOptionsRepository
|
||||||
import com.m57.hermescontrol.ui.channels.ChannelsViewModel
|
import com.m57.hermescontrol.ui.channels.ChannelsViewModel
|
||||||
import com.m57.hermescontrol.ui.connect.ConnectViewModel
|
import com.m57.hermescontrol.ui.connect.ConnectViewModel
|
||||||
import com.m57.hermescontrol.ui.cron.CronJobsViewModel
|
import com.m57.hermescontrol.ui.cron.CronJobsViewModel
|
||||||
@@ -1293,7 +1294,8 @@ class E2eIntegrationTest {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
val viewModel = ModelViewModel()
|
// Issue #1164: keep the real WS singleton off this test's mocked IO dispatcher.
|
||||||
|
val viewModel = ModelViewModel(ModelOptionsRepository(connected = { false }))
|
||||||
viewModel.loadAll()
|
viewModel.loadAll()
|
||||||
advanceUntilIdle()
|
advanceUntilIdle()
|
||||||
|
|
||||||
@@ -1352,7 +1354,8 @@ class E2eIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Default loadAll() must call getModelOptions with refresh = false
|
// Default loadAll() must call getModelOptions with refresh = false
|
||||||
val viewModel = ModelViewModel()
|
// Issue #1164: keep the real WS singleton off this test's mocked IO dispatcher.
|
||||||
|
val viewModel = ModelViewModel(ModelOptionsRepository(connected = { false }))
|
||||||
viewModel.loadAll()
|
viewModel.loadAll()
|
||||||
advanceUntilIdle()
|
advanceUntilIdle()
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user