aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-02-26 13:30:23 +0100
committerRobert Jaros <rjaros@finn.pl>2020-02-26 13:30:23 +0100
commit99dcb8e434d7e0ccf5dada379c1b03e894e6aa82 (patch)
tree25e6a9d47fdbddfc2af2d97eae35e1dba8d44490 /src/test
parent9a8525f2e5cb50071c076032fdcef5a48060108e (diff)
downloadkvision-99dcb8e434d7e0ccf5dada379c1b03e894e6aa82.tar.gz
kvision-99dcb8e434d7e0ccf5dada379c1b03e894e6aa82.tar.bz2
kvision-99dcb8e434d7e0ccf5dada379c1b03e894e6aa82.zip
Major changes in the event handling architecture. Support for multiple event handlers.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt6
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt4
2 files changed, 5 insertions, 5 deletions
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<Widget> { 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<Widget> { 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 }
}
}