amanda.hinchman-dominguez
01/21/2019, 3:51 AMclass Test: ApplicationTest() {
override fun start(stage: Stage?) {
setInScope(CatScheduleModel(), CatScheduleScope())
val sceneRoot = Editor().root
addAllIdsToDescendents(sceneRoot)
stage?.scene = Scene(sceneRoot, 100.0, 100.0)
stage?.show()
}
.....
@Test fun testTextfield() {
val textfield = lookup("#beep") as TextField
verifyThat("#beep", hasText(textfield.text))
}
}
Carlton Whitehead
01/21/2019, 12:45 PMfind<Editor>()
Carlton Whitehead
01/21/2019, 1:30 PMamanda.hinchman-dominguez
01/21/2019, 3:39 PMamanda.hinchman-dominguez
01/21/2019, 3:42 PMfind<Editor>(CatScheduleScope())
, but what I'd like to be able to do is save the nodes so I can use their properties and methods to test themCarlton Whitehead
01/21/2019, 3:45 PMamanda.hinchman-dominguez
01/21/2019, 3:59 PMval stage = FXToolkit.registerPrimaryStage()
and then find<Editor>(CatScheduleScope())
in the testTextField()
method, but in my debugging, it kind of looked like no stage was being attached because the call to lookup the node kept returning null