aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt25
1 files changed, 25 insertions, 0 deletions
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("<span class=\"fa fa-check\"></span>", element?.innerHTML, "Should render correct icon")
+ }
+ }
+
+}