Skip to content
Snippets Groups Projects
Commit 0ff73529 authored by Kaj Koivunen's avatar Kaj Koivunen :coffee:
Browse files

käyttöliittymän testit

parent cd95dd6d
No related branches found
No related tags found
No related merge requests found
import guru.kake.ronove.*
import javafx.stage.Modality
import javafx.stage.Stage
import javafx.stage.StageStyle
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.testfx.api.FxRobot
import org.testfx.framework.junit5.ApplicationExtension
import org.testfx.framework.junit5.Start
import tornadofx.*
import kotlin.test.assertEquals
/*
@ExtendWith(ApplicationExtension::class)
class SplashScreenTest {
private val project = Project()
private lateinit var s : SplashScreen
private lateinit var fragment : SplashScreen
@Suppress("Unused")
@Start private fun start(stage: Stage) {
s = SplashScreen(project)
s.openModal(stageStyle = StageStyle.UTILITY, block = false,
fragment = SplashScreen(project)
fragment.openModal(stageStyle = StageStyle.UTILITY, block = false,
modality = Modality.APPLICATION_MODAL, owner = stage)
}
@Test fun splashTest(robot: FxRobot) {
robot.sleep(1000) //test can potentially fail if robot starts performing actions before window opens
}
}
\ No newline at end of file
}
*/
\ No newline at end of file
......@@ -12,7 +12,9 @@ import tornadofx.*
import kotlin.test.assertEquals
class DummyMainWindow : View("Test") {
override val root = pane {}
override val root = pane {
label("Dummy")
}
}
@ExtendWith(ApplicationExtension::class)
......
......@@ -31,7 +31,6 @@ class TranslationSettingsTest {
}
@Test fun translationSettingsTest(robot: FxRobot) {
robot.sleep(1000) //test can potentially fail if robot starts performing actions before window opens
robot.clickOn(".radio")
robot.clickOn(".field")
robot.write("wrong key")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment