aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-10-19 12:04:37 +0200
committerRobert Jaros <rjaros@finn.pl>2017-10-19 12:04:37 +0200
commit3ef71f681eeb1a832bbd0f95d01958617529bae7 (patch)
tree7ed5dae4696f24c1a527013ad42b6a5268558ead /src/test/kotlin
parentdaa6f55e70e85c15c55ef06fd2912d95ea4922fc (diff)
downloadkvision-3ef71f681eeb1a832bbd0f95d01958617529bae7.tar.gz
kvision-3ef71f681eeb1a832bbd0f95d01958617529bae7.tar.bz2
kvision-3ef71f681eeb1a832bbd0f95d01958617529bae7.zip
Refactoring styled component
Form controls: input, password, checkbox
Diffstat (limited to 'src/test/kotlin')
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt
index 41c5e346..a053627d 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt
@@ -1,7 +1,7 @@
package test.pl.treksoft.kvision.core
import pl.treksoft.kvision.core.Root
-import pl.treksoft.kvision.css.UNIT
+import pl.treksoft.kvision.core.UNIT
import pl.treksoft.kvision.core.Widget
import pl.treksoft.kvision.core.WidgetWrapper
import test.pl.treksoft.kvision.DomSpec
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 5d632b59..681b3db3 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt
@@ -15,7 +15,9 @@ class ButtonSpec : DomSpec {
fun render() {
run {
val root = Root("test")
- val button = Button("Cancel", "fa-bars", BUTTONSTYLE.PRIMARY, BUTTONSIZE.LARGE, true)
+ val button = Button("Cancel", "fa-bars", BUTTONSTYLE.PRIMARY)
+ button.size = BUTTONSIZE.LARGE
+ button.block = 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")