Fix tests failing due to missing screen during attempted window dismissal
This commit is contained in:
parent
e92bcd81cb
commit
ed3d2d3621
|
@ -1,5 +1,6 @@
|
||||||
package net.shadowfacts.cacao.view
|
package net.shadowfacts.cacao.view
|
||||||
|
|
||||||
|
import net.shadowfacts.cacao.CacaoScreen
|
||||||
import net.shadowfacts.cacao.Window
|
import net.shadowfacts.cacao.Window
|
||||||
import net.shadowfacts.cacao.geometry.Point
|
import net.shadowfacts.cacao.geometry.Point
|
||||||
import net.shadowfacts.cacao.geometry.Rect
|
import net.shadowfacts.cacao.geometry.Rect
|
||||||
|
@ -14,11 +15,13 @@ import java.util.concurrent.CompletableFuture
|
||||||
*/
|
*/
|
||||||
class ViewClickTests {
|
class ViewClickTests {
|
||||||
|
|
||||||
|
lateinit var screen: CacaoScreen
|
||||||
lateinit var window: Window
|
lateinit var window: Window
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
fun setup() {
|
fun setup() {
|
||||||
window = Window()
|
screen = CacaoScreen()
|
||||||
|
window = screen.addWindow(Window())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package net.shadowfacts.cacao.view.button
|
package net.shadowfacts.cacao.view.button
|
||||||
|
|
||||||
|
import net.shadowfacts.cacao.CacaoScreen
|
||||||
import net.shadowfacts.cacao.Window
|
import net.shadowfacts.cacao.Window
|
||||||
import net.shadowfacts.cacao.geometry.Point
|
import net.shadowfacts.cacao.geometry.Point
|
||||||
import net.shadowfacts.cacao.geometry.Size
|
import net.shadowfacts.cacao.geometry.Size
|
||||||
|
@ -17,11 +18,13 @@ import java.util.concurrent.CompletableFuture
|
||||||
*/
|
*/
|
||||||
class ButtonClickTests {
|
class ButtonClickTests {
|
||||||
|
|
||||||
|
lateinit var screen: CacaoScreen
|
||||||
lateinit var window: Window
|
lateinit var window: Window
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
fun setup() {
|
fun setup() {
|
||||||
window = Window()
|
screen = CacaoScreen()
|
||||||
|
window = screen.addWindow(Window())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package net.shadowfacts.cacao.view.button
|
package net.shadowfacts.cacao.view.button
|
||||||
|
|
||||||
|
import net.shadowfacts.cacao.CacaoScreen
|
||||||
import net.shadowfacts.cacao.Window
|
import net.shadowfacts.cacao.Window
|
||||||
import net.shadowfacts.cacao.geometry.Point
|
import net.shadowfacts.cacao.geometry.Point
|
||||||
import net.shadowfacts.cacao.geometry.Rect
|
import net.shadowfacts.cacao.geometry.Rect
|
||||||
|
@ -28,11 +29,13 @@ class EnumButtonTests {
|
||||||
ONE, TWO, THREE
|
ONE, TWO, THREE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lateinit var screen: CacaoScreen
|
||||||
lateinit var window: Window
|
lateinit var window: Window
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
fun setup() {
|
fun setup() {
|
||||||
window = Window()
|
screen = CacaoScreen()
|
||||||
|
window = screen.addWindow(Window())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue