From 381f872a4daab133ed53e85526281b6e29873007 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 7 Oct 2017 02:19:47 +0200 Subject: New grid component (old renamed to ResponsiveGridPanel). Flex, HPanel, VPanel and DockPanel components. Cache for components attributes. --- .../test/pl/treksoft/kvision/core/ContainerSpec.kt | 18 ------------------ .../kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt | 4 ++-- 2 files changed, 2 insertions(+), 20 deletions(-) (limited to 'src/test') 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 @@ -64,24 +64,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 { 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" } -- cgit