From 940ea07772eb95563978e571932a272186307cb6 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 7 Mar 2018 10:49:56 +0100 Subject: Unit test for icon component --- .../test/pl/treksoft/kvision/html/IconSpec.kt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt (limited to 'src') diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt new file mode 100644 index 00000000..5672083c --- /dev/null +++ b/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2018. Robert Jaros + */ +package test.pl.treksoft.kvision.html + +import pl.treksoft.kvision.html.Icon +import pl.treksoft.kvision.panel.Root +import test.pl.treksoft.kvision.DomSpec +import kotlin.browser.document +import kotlin.test.Test + +class IconSpec : DomSpec { + + @Test + fun render() { + run { + val root = Root("test") + val icon = Icon("fa-check") + root.add(icon) + val element = document.getElementById("test") + assertEqualsHtml("", element?.innerHTML, "Should render correct icon") + } + } + +} -- cgit