diff options
author | Robert Jaros <rjaros@finn.pl> | 2017-09-03 03:23:34 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2017-09-03 03:23:34 +0200 |
commit | 70bc6412e0b54119d3f0b6a82c1def78a9088d16 (patch) | |
tree | 5df87cf5b18ac4623116851f55bd5244a50a3191 /src/test | |
parent | c056275c522db3f2f391ce44a405da0cedae60ca (diff) | |
download | kvision-70bc6412e0b54119d3f0b6a82c1def78a9088d16.tar.gz kvision-70bc6412e0b54119d3f0b6a82c1def78a9088d16.tar.bz2 kvision-70bc6412e0b54119d3f0b6a82c1def78a9088d16.zip |
DropDown attributes
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt index 878119dc..fec45a47 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt @@ -20,4 +20,15 @@ class DropDownSpec : DomSpec { } } + @Test + fun render_DropUp() { + run { + val root = Root("test") + val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag", dropup = true) + root.add(dd) + val element = document.getElementById("test") + assertEquals("<div class=\"dropup\"><button class=\"dropdown btn btn-default\" id=\"kv_dropdown_1\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\"><span class=\"glyphicon glyphicon-flag\"></span> Dropdown</button><ul class=\"dropdown-menu\" aria-labelledby=\"kv_dropdown_1\"><li><a href=\"#!/x\">abc</a></li><li><a href=\"#!/y\">def</a></li></ul></div>", element?.innerHTML, "Should render correct drop down") + } + } + }
\ No newline at end of file |