diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt | 18 | ||||
-rw-r--r-- | src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt | 4 |
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" } |