From 99dcb8e434d7e0ccf5dada379c1b03e894e6aa82 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 26 Feb 2020 13:30:23 +0100 Subject: Major changes in the event handling architecture. Support for multiple event handlers. --- src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt | 6 +++--- src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/test/kotlin') diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt index cf7c21b2..cac53e90 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt @@ -41,7 +41,7 @@ class StyleSpec : DomSpec { widget { style { margin = 2.px - color = Color(Col.SILVER) + color = Color.name(Col.SILVER) overflow = Overflow.SCROLL } } @@ -62,7 +62,7 @@ class StyleSpec : DomSpec { widget { style("customclass") { margin = 2.px - color = Color(Col.SILVER) + color = Color.name(Col.SILVER) overflow = Overflow.SCROLL } } @@ -83,7 +83,7 @@ class StyleSpec : DomSpec { widget { style("customclass") { margin = 2.px - color = Color(Col.SILVER) + color = Color.name(Col.SILVER) overflow = Overflow.SCROLL style("image") { marginTop = 10.px diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt index 59f5f8e0..42a07ba8 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt @@ -96,7 +96,7 @@ class WidgetSpec : WSpec { fun setEventListener() { runW { widget, _ -> widget.setEventListener { click = { } } - assertTrue("Element should have an event listener") { widget.listeners.size == 1 } + assertTrue("Element should have an event listener") { widget.listenersMap.size == 1 } } } @@ -105,7 +105,7 @@ class WidgetSpec : WSpec { runW { widget, _ -> widget.setEventListener { click = { } } widget.removeEventListeners() - assertTrue("Element should not have any event listener") { widget.listeners.size == 0 } + assertTrue("Element should not have any event listener") { widget.listenersMap.size == 0 } } } -- cgit