diff options
Diffstat (limited to 'src/test/kotlin')
3 files changed, 11 insertions, 11 deletions
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/KVManagerSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/KVManagerSpec.kt index d123cf310..9a5861df 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/core/KVManagerSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/core/KVManagerSpec.kt @@ -16,8 +16,8 @@ class KVManagerSpec : DomSpec { fun patch_ById() { run { val vnode = h("span", snOpt { - attrs = snAttrs("id" to "test_new") - style = snStyle("fontWeight" to "bold", "fontStyle" to "italic") + attrs = snAttrs(listOf("id" to "test_new")) + style = snStyle(listOf("fontWeight" to "bold", "fontStyle" to "italic")) }) KVManager.patch("test", vnode) assertTrue("Original container should not exist") { document.getElementById("test") == null } @@ -29,13 +29,13 @@ class KVManagerSpec : DomSpec { fun patch_ByVnode() { run { val vnode1 = h("span", snOpt { - attrs = snAttrs("id" to "test2") - style = snStyle("fontWeight" to "bold", "fontStyle" to "italic") + attrs = snAttrs(listOf("id" to "test2")) + style = snStyle(listOf("fontWeight" to "bold", "fontStyle" to "italic")) }) val vnode2 = KVManager.patch("test", vnode1) val vnode3 = h("span", snOpt { - attrs = snAttrs("id" to "test3") - style = snStyle("fontWeight" to "bold", "fontStyle" to "italic") + attrs = snAttrs(listOf("id" to "test3")) + style = snStyle(listOf("fontWeight" to "bold", "fontStyle" to "italic")) }) KVManager.patch(vnode2, vnode3) assertTrue("First container should not exist") { document.getElementById("test") == null } diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt index 6019b912..5d632b59 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt @@ -1,8 +1,8 @@ package test.pl.treksoft.kvision.html import pl.treksoft.kvision.core.Root -import pl.treksoft.kvision.html.BUTTON_SIZE -import pl.treksoft.kvision.html.BUTTON_STYLE +import pl.treksoft.kvision.html.BUTTONSIZE +import pl.treksoft.kvision.html.BUTTONSTYLE import pl.treksoft.kvision.html.Button import test.pl.treksoft.kvision.DomSpec import kotlin.browser.document @@ -15,7 +15,7 @@ class ButtonSpec : DomSpec { fun render() { run { val root = Root("test") - val button = Button("Cancel", "fa-bars", BUTTON_STYLE.PRIMARY, BUTTON_SIZE.LARGE, true) + val button = Button("Cancel", "fa-bars", BUTTONSTYLE.PRIMARY, BUTTONSIZE.LARGE, true) root.add(button) val element = document.getElementById("test") assertEquals("<button class=\"btn btn-primary btn-lg btn-block\" type=\"button\"><i class=\"fa fa-bars fa-lg\"></i> Cancel</button>", element?.innerHTML, "Should render correct html button") diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt index 7d8e37fe..ebf3aedb 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt @@ -2,7 +2,7 @@ package test.pl.treksoft.kvision.html import pl.treksoft.kvision.core.Img import pl.treksoft.kvision.core.Root -import pl.treksoft.kvision.html.IMAGE_SHAPE +import pl.treksoft.kvision.html.IMAGESHAPE import pl.treksoft.kvision.html.Image import test.pl.treksoft.kvision.DomSpec import kotlin.browser.document @@ -16,7 +16,7 @@ class ImageSpec : DomSpec { run { val root = Root("test") val res = Img("kotlin.png") - val image = Image(res, "Image", true, IMAGE_SHAPE.ROUNDED, true) + val image = Image(res, "Image", true, IMAGESHAPE.ROUNDED, true) root.add(image) val element = document.getElementById("test") assertEquals("<img class=\"img-responsive center-block img-rounded\" src=\"$res\" alt=\"Image\">", element?.innerHTML, "Should render correct html image") |