aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-03-22 12:43:49 +0100
committerRobert Jaros <rjaros@finn.pl>2018-03-22 12:43:49 +0100
commit6b77ea5c82d0806cc697e9a269f9f64fbff96273 (patch)
treea9029e354f8e38c85bd9446a693e7700cd834906 /src
parent567a42eb216381b951fe5c6bcc199bcba835ffa6 (diff)
downloadkvision-6b77ea5c82d0806cc697e9a269f9f64fbff96273.tar.gz
kvision-6b77ea5c82d0806cc697e9a269f9f64fbff96273.tar.bz2
kvision-6b77ea5c82d0806cc697e9a269f9f64fbff96273.zip
Fix incorrect padding with container-fluid root.
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/Root.kt11
-rw-r--r--src/main/resources/css/style.css9
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt10
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/data/DataContainerSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt22
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/FieldLabelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/HelpBlockSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckInputSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerInputSpec.kt6
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt6
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/DivSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/LabelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/LinkSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/ListSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/TagSpec.kt6
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/DockPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/FlexPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/GridPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/HPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/RootSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/SplitPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/StackPanelSpec.kt8
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt6
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/VPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/table/CellSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/table/HeaderCellSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/table/RowSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt2
57 files changed, 95 insertions, 95 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt
index 4bbca9dd..edcf5789 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/ResponsiveGridPanel.kt
@@ -57,7 +57,7 @@ open class ResponsiveGridPanel(
private val gridSize: GridSize = GridSize.MD,
private var rows: Int = 0, private var cols: Int = 0, align: Align? = null,
classes: Set<String> = setOf(), init: (ResponsiveGridPanel.() -> Unit)? = null
-) : SimplePanel(classes) {
+) : SimplePanel(classes + "container-fluid") {
/**
* Text align of grid cells.
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
index 8223023e..a51191d4 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
@@ -22,9 +22,12 @@
package pl.treksoft.kvision.panel
import com.github.snabbdom.VNode
+import com.github.snabbdom.h
import pl.treksoft.kvision.KVManager
import pl.treksoft.kvision.core.StringBoolPair
import pl.treksoft.kvision.modal.Modal
+import pl.treksoft.kvision.utils.snClasses
+import pl.treksoft.kvision.utils.snOpt
/**
* Root container.
@@ -54,7 +57,13 @@ class Root(id: String, private val fixed: Boolean = false, init: (Root.() -> Uni
}
override fun render(): VNode {
- return render("div#$id", childrenVNodes() + modalsVNodes())
+ return if (!fixed) {
+ render("div#$id", arrayOf(h("div", snOpt {
+ `class` = snClasses(listOf("row" to true))
+ }, childrenVNodes() + modalsVNodes())))
+ } else {
+ render("div#$id", childrenVNodes() + modalsVNodes())
+ }
}
internal fun addModal(modal: Modal) {
diff --git a/src/main/resources/css/style.css b/src/main/resources/css/style.css
index 82747e59..9df9960b 100644
--- a/src/main/resources/css/style.css
+++ b/src/main/resources/css/style.css
@@ -1,12 +1,3 @@
-.container-fluid {
- padding: 0px;
-}
-
-.navbar .container-fluid {
- padding-left: 15px;
- padding-right: 15px;
-}
-
.splitpanel-vertical {
display: flex;
flex-direction: row;
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index b67ab307..1da1fe1a 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -85,7 +85,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test")
+ val root = Root("test", true)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt
index 22735a64..3e16fff8 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt
@@ -34,7 +34,7 @@ class ContainerSpec : DomSpec {
@Test
fun add() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val container = SimplePanel()
val child1 = Widget()
child1.id = "child1"
@@ -52,7 +52,7 @@ class ContainerSpec : DomSpec {
@Test
fun addAll() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val container = SimplePanel()
val child1 = Widget()
child1.id = "child1"
@@ -69,7 +69,7 @@ class ContainerSpec : DomSpec {
@Test
fun remove() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val container = SimplePanel()
val child1 = Widget()
child1.id = "child1"
@@ -88,7 +88,7 @@ class ContainerSpec : DomSpec {
@Test
fun removeAll() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val container = SimplePanel()
val child1 = Widget()
child1.id = "child1"
@@ -107,7 +107,7 @@ class ContainerSpec : DomSpec {
@Test
fun getChildren() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val container = SimplePanel()
val child1 = Widget()
child1.id = "child1"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt
index ceda72a9..a68011d1 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt
@@ -130,7 +130,7 @@ class WidgetSpec : WSpec {
@Test
fun getRoot() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val widget = Widget()
root.add(widget)
val r = widget.getRoot()
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 e2e6ef70..aac92c50 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt
@@ -35,7 +35,7 @@ class WidgetWrapperSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val widget = Widget()
val wrapper = WidgetWrapper(widget)
wrapper.width = 100 to UNIT.em
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/data/DataContainerSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/data/DataContainerSpec.kt
index 9e5c769f..3f07626d 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/data/DataContainerSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/data/DataContainerSpec.kt
@@ -35,7 +35,7 @@ class DataContainerSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
class Model(value: String) : BaseDataComponent() {
var value: String by obs(value)
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 4d1b9334..8001ba95 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt
@@ -34,14 +34,14 @@ class DropDownSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag")
root.add(dd)
dd.toggle()
val element = document.getElementById("test")
val id = dd.button.id
assertEqualsHtml(
- "<div class=\"dropdown open\"><button class=\"dropdown btn btn-default\" id=\"$id\" 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=\"$id\" aria-expanded=\"true\"><li><a href=\"#!/x\">abc</a></li><li><a href=\"#!/y\">def</a></li></ul></div>",
+ "<div class=\"dropdown open\"><button class=\"dropdown btn btn-default\" id=\"$id\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" role=\"button\" href=\"#\"><span class=\"glyphicon glyphicon-flag\"></span> Dropdown</button><ul class=\"dropdown-menu\" aria-labelledby=\"$id\" aria-expanded=\"true\"><li><a href=\"#!/x\">abc</a></li><li><a href=\"#!/y\">def</a></li></ul></div>",
element?.innerHTML,
"Should render correct drop down"
)
@@ -51,14 +51,14 @@ class DropDownSpec : DomSpec {
@Test
fun renderDropUp() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag").apply { dropup = true }
root.add(dd)
dd.toggle()
val element = document.getElementById("test")
val id = dd.button.id
assertEqualsHtml(
- "<div class=\"dropup open\"><button class=\"dropdown btn btn-default\" id=\"$id\" 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=\"$id\" aria-expanded=\"true\"><li><a href=\"#!/x\">abc</a></li><li><a href=\"#!/y\">def</a></li></ul></div>",
+ "<div class=\"dropup open\"><button class=\"dropdown btn btn-default\" id=\"$id\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" role=\"button\" href=\"#\"><span class=\"glyphicon glyphicon-flag\"></span> Dropdown</button><ul class=\"dropdown-menu\" aria-labelledby=\"$id\" aria-expanded=\"true\"><li><a href=\"#!/x\">abc</a></li><li><a href=\"#!/y\">def</a></li></ul></div>",
element?.innerHTML,
"Should render correct drop down"
)
@@ -68,14 +68,14 @@ class DropDownSpec : DomSpec {
@Test
fun renderHeaderElement() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val dd = DropDown("Dropdown", listOf("abc" to DD.HEADER.option), "flag")
root.add(dd)
dd.toggle()
val element = document.getElementById("test")
val id = dd.button.id
assertEqualsHtml(
- "<div class=\"dropdown open\"><button class=\"dropdown btn btn-default\" id=\"$id\" 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=\"$id\" aria-expanded=\"true\"><li class=\"dropdown-header\">abc</li></ul></div>",
+ "<div class=\"dropdown open\"><button class=\"dropdown btn btn-default\" id=\"$id\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" role=\"button\" href=\"#\"><span class=\"glyphicon glyphicon-flag\"></span> Dropdown</button><ul class=\"dropdown-menu\" aria-labelledby=\"$id\" aria-expanded=\"true\"><li class=\"dropdown-header\">abc</li></ul></div>",
element?.innerHTML,
"Should render correct drop down"
)
@@ -85,14 +85,14 @@ class DropDownSpec : DomSpec {
@Test
fun renderSeparatorElement() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val dd = DropDown("Dropdown", listOf("abc" to DD.SEPARATOR.option), "flag")
root.add(dd)
dd.toggle()
val element = document.getElementById("test")
val id = dd.button.id
assertEqualsHtml(
- "<div class=\"dropdown open\"><button class=\"dropdown btn btn-default\" id=\"$id\" 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=\"$id\" aria-expanded=\"true\"><li class=\"divider\" role=\"separator\">abc</li></ul></div>",
+ "<div class=\"dropdown open\"><button class=\"dropdown btn btn-default\" id=\"$id\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" role=\"button\" href=\"#\"><span class=\"glyphicon glyphicon-flag\"></span> Dropdown</button><ul class=\"dropdown-menu\" aria-labelledby=\"$id\" aria-expanded=\"true\"><li class=\"divider\" role=\"separator\">abc</li></ul></div>",
element?.innerHTML,
"Should render correct drop down"
)
@@ -102,14 +102,14 @@ class DropDownSpec : DomSpec {
@Test
fun renderDisabledElement() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val dd = DropDown("Dropdown", listOf("abc" to DD.DISABLED.option), "flag")
root.add(dd)
dd.toggle()
val element = document.getElementById("test")
val id = dd.button.id
assertEqualsHtml(
- "<div class=\"dropdown open\"><button class=\"dropdown btn btn-default\" id=\"$id\" 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=\"$id\" aria-expanded=\"true\"><li class=\"disabled\"><a href=\"#\">abc</a></li></ul></div>",
+ "<div class=\"dropdown open\"><button class=\"dropdown btn btn-default\" id=\"$id\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" role=\"button\" href=\"#\"><span class=\"glyphicon glyphicon-flag\"></span> Dropdown</button><ul class=\"dropdown-menu\" aria-labelledby=\"$id\" aria-expanded=\"true\"><li class=\"disabled\"><a href=\"#\">abc</a></li></ul></div>",
element?.innerHTML,
"Should render correct drop down"
)
@@ -119,7 +119,7 @@ class DropDownSpec : DomSpec {
@Test
fun toggle() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag")
root.add(dd)
val visible = dd.getElementJQuery()?.hasClass("open") ?: false
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/FieldLabelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/FieldLabelSpec.kt
index 91a5d084..d13bc920 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/FieldLabelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/FieldLabelSpec.kt
@@ -32,7 +32,7 @@ class FieldLabelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val fl = FieldLabel("input", "Label")
root.add(fl)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/HelpBlockSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/HelpBlockSpec.kt
index 69e7b8df..c7d0b0da 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/HelpBlockSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/HelpBlockSpec.kt
@@ -32,7 +32,7 @@ class HelpBlockSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val fl = HelpBlock("Form Error")
root.add(fl)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt
index 95d53b3b..9a178abb 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt
@@ -33,7 +33,7 @@ class CheckBoxSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ci = CheckBox(value = true, label = "Label").apply {
name = "name"
style = CheckBoxStyle.DANGER
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckInputSpec.kt
index 6b163047..6cb1cd3e 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckInputSpec.kt
@@ -33,7 +33,7 @@ class CheckInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ci = CheckInput(value = true).apply {
name = "name"
id = "idti"
@@ -52,7 +52,7 @@ class CheckInputSpec : DomSpec {
@Test
fun renderAsRadio() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ci = CheckInput(type = CheckInputType.RADIO, value = true).apply {
name = "name"
id = "idti"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt
index 21a9bf41..e55e9913 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt
@@ -33,7 +33,7 @@ class RadioGroupSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ci = RadioGroup(options = listOf("a" to "A", "b" to "B"), value = "a", label = "Label").apply {
disabled = true
inline = true
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt
index b43c2caa..09763cc7 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt
@@ -33,7 +33,7 @@ class RadioSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ci = Radio(value = true, label = "Label", extraValue = "abc").apply {
name = "name"
style = RadioStyle.DANGER
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
index 740c4032..30f42e9c 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
@@ -34,7 +34,7 @@ class SelectInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val selectInput = SelectInput(listOf("test1" to "Test 1", "test2" to "Test 2"), "test1", true).apply {
liveSearch = true
placeholder = "Choose ..."
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt
index b906d09e..bd88f560 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt
@@ -33,7 +33,7 @@ class SelectOptGroupSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val selectOptGroup = SelectOptGroup("Group", listOf("test1" to "Test 1", "test2" to "Test 2"), 2)
root.add(selectOptGroup)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
index bbdfcd61..f7e07d42 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
@@ -32,7 +32,7 @@ class SelectOptionSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val selectOption = SelectOption("testValue", "testLabel")
root.add(selectOption)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
index 15a01542..19634125 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
@@ -34,7 +34,7 @@ class SelectSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val select = Select(listOf("test1" to "Test 1", "test2" to "Test 2"), "test1", true, null, "Label").apply {
liveSearch = true
placeholder = "Choose ..."
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerInputSpec.kt
index 4e4151d7..a240bfd8 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerInputSpec.kt
@@ -32,7 +32,7 @@ class SpinnerInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val si = SpinnerInput(value = 13).apply {
placeholder = "place"
id = "idti"
@@ -46,7 +46,7 @@ class SpinnerInputSpec : DomSpec {
@Test
fun spinUp() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val si = SpinnerInput(value = 13).apply {
placeholder = "place"
id = "idti"
@@ -61,7 +61,7 @@ class SpinnerInputSpec : DomSpec {
@Test
fun spinDown() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val si = SpinnerInput(value = 13).apply {
placeholder = "place"
id = "idti"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt
index fe2424f4..e2eec3f9 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt
@@ -33,7 +33,7 @@ class SpinnerSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ti = Spinner(value = 13, label = "Label").apply {
placeholder = "place"
name = "name"
@@ -59,7 +59,7 @@ class SpinnerSpec : DomSpec {
@Test
fun spinUp() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val si = Spinner(value = 13)
root.add(si)
assertEquals(13, si.value, "Should return initial value before spinUp")
@@ -71,7 +71,7 @@ class SpinnerSpec : DomSpec {
@Test
fun spinDown() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val si = Spinner(value = 13)
root.add(si)
assertEquals(13, si.value, "Should return initial value before spinDown")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt
index 3d1a90b7..dc46782b 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt
@@ -32,7 +32,7 @@ class PasswordSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ti = Password(value = "abc", label = "Label").apply {
placeholder = "place"
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextInputSpec.kt
index e94af8d4..21b7dc39 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextInputSpec.kt
@@ -34,7 +34,7 @@ class RichTextInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val hai = RichTextInput(value = "abc").apply {
placeholder = "place"
id = "idti"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextSpec.kt
index 7e922118..844b7e94 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextSpec.kt
@@ -34,7 +34,7 @@ class RichTextSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val hai = RichText(value = "abc", label = "Field").apply {
placeholder = "place"
id = "idti"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt
index ac2aba28..0e8257ff 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt
@@ -32,7 +32,7 @@ class TextAreaInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ti = TextAreaInput(cols = 5, rows = 2, value = "abc").apply {
placeholder = "place"
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt
index 8ee0a0f9..c948628b 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt
@@ -32,7 +32,7 @@ class TextAreaSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ti = TextArea(cols = 5, rows = 2, value = "abc", label = "Label").apply {
placeholder = "place"
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt
index 4ceefc16..bd8c9786 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt
@@ -33,7 +33,7 @@ class TextInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ti = TextInput(type = TextInputType.PASSWORD, value = "abc").apply {
placeholder = "place"
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt
index 5ee99907..071bf35b 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt
@@ -32,7 +32,7 @@ class TextSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ti = Text(value = "abc", label = "Label").apply {
placeholder = "place"
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt
index 3a0f8773..fed0a1f4 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt
@@ -34,7 +34,7 @@ class DateTimeInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val data = Date()
val dti = DateTimeInput(value = data).apply {
placeholder = "place"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt
index ba4ed7cf..76dc273b 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt
@@ -34,7 +34,7 @@ class DateTimeSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val data = Date()
val ti = DateTime(value = data, label = "Label").apply {
placeholder = "place"
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 9c989156..de2ea036 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt
@@ -34,7 +34,7 @@ class ButtonSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val button = Button("Cancel", "fa-bars", ButtonStyle.PRIMARY)
button.size = ButtonSize.LARGE
button.block = true
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/DivSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/DivSpec.kt
index 7ee008ad..4fd64478 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/DivSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/DivSpec.kt
@@ -32,7 +32,7 @@ class DivSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val div = Div("This is a div")
root.add(div)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt
index 5672083c..f1705ae0 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt
@@ -14,7 +14,7 @@ class IconSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val icon = Icon("fa-check")
root.add(icon)
val element = document.getElementById("test")
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 be53c128..fa32a24f 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt
@@ -34,7 +34,7 @@ class ImageSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val res = require("./img/placeholder.png")
@Suppress("UnsafeCastFromDynamic")
val image = Image(res, "Image", true, ImageShape.ROUNDED, true)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/LabelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/LabelSpec.kt
index 99f1b01c..a9f06349 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/LabelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/LabelSpec.kt
@@ -32,7 +32,7 @@ class LabelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val label = Label("This is a label")
root.add(label)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/LinkSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/LinkSpec.kt
index 4e3dec2d..7a37106e 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/LinkSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/LinkSpec.kt
@@ -32,7 +32,7 @@ class LinkSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val link = Link("Google", "http://www.google.com")
root.add(link)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/ListSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/ListSpec.kt
index b691ab1a..5f0aac69 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/ListSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ListSpec.kt
@@ -35,7 +35,7 @@ class ListSpec : DomSpec {
@Test
fun renderElements() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val list = ListTag(ListType.DL_HORIZ, listOf("a1", "a2", "b1", "b2"))
root.add(list)
val element = document.getElementById("test")
@@ -50,7 +50,7 @@ class ListSpec : DomSpec {
@Test
fun renderAsContainer() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val list = ListTag(ListType.UL)
list.add(Tag(TAG.PRE, "pre"))
list.add(Tag(TAG.DEL, "del"))
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/TagSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/TagSpec.kt
index 4ef79069..91c6df81 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/TagSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/TagSpec.kt
@@ -35,7 +35,7 @@ class TagSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val tag = Tag(TAG.H1, "This is <b>h1</b>", rich = false, align = Align.CENTER)
root.add(tag)
val element = document.getElementById("test")
@@ -50,7 +50,7 @@ class TagSpec : DomSpec {
@Test
fun renderRich() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val tag = Tag(TAG.H1, "This is <b>h1</b>", rich = true, align = Align.RIGHT)
root.add(tag)
val element = document.getElementById("test")
@@ -65,7 +65,7 @@ class TagSpec : DomSpec {
@Test
fun renderAsContainer() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val tag = Tag(TAG.P, align = Align.RIGHT)
tag.add(Tag(TAG.DEL, "This is test"))
tag.add(Link("abc", "/x"))
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt
index 8f6e79bc..807f837a 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt
@@ -36,7 +36,7 @@ class AlertSpec : DomSpec {
@Test
fun render() {
run {
- Root("test")
+ Root("test", true)
Alert.show("Alert caption", "Alert content")
val alert = document.getElementById("test")?.let { jQuery(it).find(".modal")[0] }
assertNotNull(alert, "Should show alert window")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt
index 49e359a7..2e3ea3ef 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt
@@ -32,7 +32,7 @@ class CloseIconSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val ci = CloseIcon()
root.add(ci)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt
index b327fdb3..dc734e10 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt
@@ -36,7 +36,7 @@ class ConfirmSpec : DomSpec {
@Test
fun render() {
run {
- Root("test")
+ Root("test", true)
Confirm.show("Confirm caption", "Confirm content")
val confirm = document.getElementById("test")?.let { jQuery(it).find(".modal")[0] }
assertNotNull(confirm, "Should show confirm window")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt
index d886a574..523abfd5 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt
@@ -35,7 +35,7 @@ class ModalSpec : DomSpec {
@Test
fun render() {
run {
- Root("test")
+ Root("test", true)
val modal = Modal("Modal")
modal.show()
val content = document.getElementById("test")?.let { jQuery(it).find(".modal-title").html() }
@@ -47,7 +47,7 @@ class ModalSpec : DomSpec {
@Test
fun toggle() {
run {
- Root("test")
+ Root("test", true)
val modal = Modal("Modal")
modal.toggle()
val content = document.getElementById("test")?.let { jQuery(it).find(".modal-title").html() }
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/DockPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/DockPanelSpec.kt
index 1eff4042..8704353d 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/DockPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/DockPanelSpec.kt
@@ -34,7 +34,7 @@ class DockPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val dockPanel = DockPanel()
root.add(dockPanel)
dockPanel.add(Label("abc"), Side.UP)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/FlexPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/FlexPanelSpec.kt
index 60012891..d9074dae 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/FlexPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/FlexPanelSpec.kt
@@ -35,7 +35,7 @@ class FlexPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val flexPanel = FlexPanel(FlexDir.ROWREV, justify = FlexJustify.SPACEEVENLY)
root.add(flexPanel)
flexPanel.add(Label("abc"), 1)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/GridPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/GridPanelSpec.kt
index e59f0977..f244b02f 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/GridPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/GridPanelSpec.kt
@@ -33,7 +33,7 @@ class GridPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val gridPanel = GridPanel()
root.add(gridPanel)
gridPanel.add(Label("abc"), 1, 1)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/HPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/HPanelSpec.kt
index 192be8b7..da403d44 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/HPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/HPanelSpec.kt
@@ -34,7 +34,7 @@ class HPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val hPanel = HPanel(justify = FlexJustify.SPACEBETWEEN)
root.add(hPanel)
hPanel.add(Label("abc"), 1)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt
index 03af514b..b2e2d4e3 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt
@@ -33,7 +33,7 @@ class ResponsiveGridPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val rgPanel = ResponsiveGridPanel()
root.add(rgPanel)
rgPanel.add(Label("abc"), 1, 1)
@@ -41,7 +41,7 @@ class ResponsiveGridPanelSpec : DomSpec {
rgPanel.add(Label("ghi"), 3, 3)
val element = document.getElementById("test")
assertEqualsHtml(
- "<div><div class=\"row\"></div><div class=\"row\"><div class=\"col-md-3\"></div><div class=\"col-md-3\"><span>abc</span></div><div class=\"col-md-3\"></div><div class=\"col-md-3\"></div></div><div class=\"row\"><div class=\"col-md-3\"></div><div class=\"col-md-3\"></div><div class=\"col-md-3\"><span>def</span></div><div class=\"col-md-3\"></div></div><div class=\"row\"><div class=\"col-md-3\"></div><div class=\"col-md-3\"></div><div class=\"col-md-3\"></div><div class=\"col-md-3\"><span>ghi</span></div></div></div>",
+ "<div class=\"container-fluid\"><div class=\"row\"></div><div class=\"row\"><div class=\"col-md-3\"></div><div class=\"col-md-3\"><span>abc</span></div><div class=\"col-md-3\"></div><div class=\"col-md-3\"></div></div><div class=\"row\"><div class=\"col-md-3\"></div><div class=\"col-md-3\"></div><div class=\"col-md-3\"><span>def</span></div><div class=\"col-md-3\"></div></div><div class=\"row\"><div class=\"col-md-3\"></div><div class=\"col-md-3\"></div><div class=\"col-md-3\"></div><div class=\"col-md-3\"><span>ghi</span></div></div></div>",
element?.innerHTML,
"Should render correct responsive grid panel"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/RootSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/RootSpec.kt
index 50a73231..d90abbe8 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/RootSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/RootSpec.kt
@@ -51,7 +51,7 @@ class RootSpec : DomSpec {
@Test
fun getRoot() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val r = root.getRoot()
assertTrue("Should return self") { r == root }
}
@@ -60,7 +60,7 @@ class RootSpec : DomSpec {
@Test
fun addModal() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val modal = Modal("test")
modal.id = "test_modal"
root.addModal(modal)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/SplitPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/SplitPanelSpec.kt
index 65fee217..bbe95f30 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/SplitPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/SplitPanelSpec.kt
@@ -34,7 +34,7 @@ class SplitPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val splitPanel = SplitPanel(Direction.VERTICAL)
root.add(splitPanel)
val label1 = Label("abc")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/StackPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/StackPanelSpec.kt
index 17e5b40f..f8d20984 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/StackPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/StackPanelSpec.kt
@@ -33,7 +33,7 @@ class StackPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val stackPanel = StackPanel()
root.add(stackPanel)
val label1 = Label("abc")
@@ -48,7 +48,7 @@ class StackPanelSpec : DomSpec {
@Test
fun renderNotActivateLast() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val stackPanel = StackPanel(activateLast = false)
root.add(stackPanel)
val label1 = Label("abc")
@@ -67,7 +67,7 @@ class StackPanelSpec : DomSpec {
@Test
fun remove() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val stackPanel = StackPanel(activateLast = false)
root.add(stackPanel)
val label1 = Label("abc")
@@ -83,7 +83,7 @@ class StackPanelSpec : DomSpec {
@Test
fun removeAll() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val stackPanel = StackPanel(activateLast = false)
root.add(stackPanel)
val label1 = Label("abc")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt
index 78022db8..c6e3a942 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt
@@ -33,7 +33,7 @@ class TabPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val tabs = TabPanel()
root.add(tabs)
val label1 = Label("abc")
@@ -52,7 +52,7 @@ class TabPanelSpec : DomSpec {
@Test
fun setActiveIndex() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val tabs = TabPanel()
root.add(tabs)
val label1 = Label("abc")
@@ -72,7 +72,7 @@ class TabPanelSpec : DomSpec {
@Test
fun removeTab() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val tabs = TabPanel()
root.add(tabs)
val label1 = Label("abc")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/VPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/VPanelSpec.kt
index eeaf5358..61a89fea 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/VPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/VPanelSpec.kt
@@ -34,7 +34,7 @@ class VPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val vPanel = VPanel(justify = FlexJustify.SPACEBETWEEN)
root.add(vPanel)
vPanel.add(Label("abc"), 1)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/table/CellSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/table/CellSpec.kt
index 7f39f133..2f0857e9 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/table/CellSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/table/CellSpec.kt
@@ -14,7 +14,7 @@ class CellSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val cell = Cell("This is a cell")
root.add(cell)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/table/HeaderCellSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/table/HeaderCellSpec.kt
index ef417fc8..6d2f4711 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/table/HeaderCellSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/table/HeaderCellSpec.kt
@@ -14,7 +14,7 @@ class HeaderCellSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val cell = HeaderCell("This is a header cell")
root.add(cell)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/table/RowSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/table/RowSpec.kt
index 04cd5a2d..c30d5eb5 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/table/RowSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/table/RowSpec.kt
@@ -15,7 +15,7 @@ class RowSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val row = Row {
cell("A")
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt
index b544a346..351c6733 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt
@@ -17,7 +17,7 @@ class TableSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val table = Table(listOf("a", "b")) {
row {
cell("A")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt
index 27de17de..2ef56830 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt
@@ -32,7 +32,7 @@ class WindowSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test")
+ val root = Root("test", true)
val window = Window("Window title", isResizable = false)
root.add(window)
val id = window.id