aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-10-07 02:19:47 +0200
committerRobert Jaros <rjaros@finn.pl>2017-10-07 02:19:47 +0200
commit381f872a4daab133ed53e85526281b6e29873007 (patch)
treeed0a39ef917ccdb43b8ed0ed9b616eaf4f2bf9bf /src/test/kotlin
parenta61948c5b79d2fb3402e14ee69a9a8f2a18c02b4 (diff)
downloadkvision-381f872a4daab133ed53e85526281b6e29873007.tar.gz
kvision-381f872a4daab133ed53e85526281b6e29873007.tar.bz2
kvision-381f872a4daab133ed53e85526281b6e29873007.zip
New grid component (old renamed to ResponsiveGridPanel). Flex, HPanel, VPanel and DockPanel components. Cache for components attributes.
Diffstat (limited to 'src/test/kotlin')
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt18
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt4
2 files changed, 2 insertions, 20 deletions
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt
index baed1372..c39aeb75 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt
@@ -65,24 +65,6 @@ class ContainerSpec : DomSpec {
}
@Test
- fun removeAt() {
- run {
- val root = Root("test")
- val container = Container()
- val child1 = Widget()
- child1.id = "child1"
- val child2 = Widget()
- child2.id = "child2"
- container.add(child1)
- container.add(child2)
- root.add(container)
- container.removeAt(0)
- val elem1 = document.getElementById("child1")
- val elem2 = document.getElementById("child2")
- assertTrue("Container renders children") { elem1 == null && elem2 != null }
- }
- }
- @Test
fun removeAll() {
run {
val root = Root("test")
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 4117b03d..179788d0 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt
@@ -10,11 +10,11 @@ import kotlin.test.assertTrue
class WidgetSpec : WSpec {
@Test
- fun render() {
+ fun renderVNode() {
runW { widget, _ ->
widget.addCssClass("testClass")
widget.title = "test_title"
- val vnode = widget.render()
+ val vnode = widget.renderVNode()
assertTrue("VNode has correct class attribute") { vnode.data.`class`.testClass == true }
assertTrue("VNode has correct id attribute") { vnode.data.attrs.id == "test_id" }
assertTrue("VNode has correct title attribute") { vnode.data.attrs.title == "test_title" }