diff --git a/connector/composeApp/src/desktopMain/kotlin/tab/test/TestRun.kt b/connector/composeApp/src/desktopMain/kotlin/tab/test/TestRun.kt index c92de8a..6fc8fd6 100644 --- a/connector/composeApp/src/desktopMain/kotlin/tab/test/TestRun.kt +++ b/connector/composeApp/src/desktopMain/kotlin/tab/test/TestRun.kt @@ -38,7 +38,7 @@ class TestRun ( if (!running and (tested.size == 0)) { running = true - screenModel.init() + screenModel.init(actions) } when (val s = state) { diff --git a/connector/composeApp/src/desktopMain/kotlin/tab/test/TestScreenModel.kt b/connector/composeApp/src/desktopMain/kotlin/tab/test/TestScreenModel.kt index f45aec3..287fd3e 100644 --- a/connector/composeApp/src/desktopMain/kotlin/tab/test/TestScreenModel.kt +++ b/connector/composeApp/src/desktopMain/kotlin/tab/test/TestScreenModel.kt @@ -5,7 +5,9 @@ import cafe.adriel.voyager.core.model.StateScreenModel import cafe.adriel.voyager.core.model.screenModelScope import io.anthonyberg.connector.shared.TestTransaction import io.anthonyberg.connector.shared.entity.Action +import io.anthonyberg.connector.shared.vdmj.VDMJTransaction import io.anthonyberg.connector.shared.xpc.XPC +import io.github.oshai.kotlinlogging.KotlinLogging import kotlinx.coroutines.delay import kotlinx.coroutines.launch @@ -14,11 +16,12 @@ class TestScreenModel ( private val interfaceState: InterfaceState ) : StateScreenModel(TestState.Init) { private val xpc = XPC() + private val logger = KotlinLogging.logger {} /** * Sets up necessary connections */ - fun init() { + fun init(actions: List) { screenModelScope.launch { mutableState.value = TestState.Init @@ -47,6 +50,11 @@ class TestScreenModel ( xpc.setPOSI(posi) } + val vdm = VDMJTransaction(actions = actions, xpc = xpc) + val expected = vdm.expectedEndState() + + logger.debug { expected } + delay(5000L) // Starts the test in the database