diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-05-11 02:33:48 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-05-11 02:33:48 +0200 |
commit | 0b91779a5baf5f78ae616db8f67dcf4d81e839cc (patch) | |
tree | f378b6a1d2dfbd7de57be668635eee24a219c6a8 /kvision-modules/kvision-bootstrap/src/test/kotlin | |
parent | 825445b7041e2b07622801b0bbbf779b70f03f23 (diff) | |
download | kvision-0b91779a5baf5f78ae616db8f67dcf4d81e839cc.tar.gz kvision-0b91779a5baf5f78ae616db8f67dcf4d81e839cc.tar.bz2 kvision-0b91779a5baf5f78ae616db8f67dcf4d81e839cc.zip |
Allow constructing Root containers from HTMLElement objects.
Diffstat (limited to 'kvision-modules/kvision-bootstrap/src/test/kotlin')
7 files changed, 13 insertions, 13 deletions
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt index 2fc0320a..1ad97acc 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt @@ -88,7 +88,7 @@ interface WSpec : DomSpec { fun runW(code: (widget: Widget, element: Element?) -> Unit) { run { - val root = Root("test", true) + val root = Root("test", fixed = true) val widget = Widget() widget.id = "test_id" root.add(widget) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt index ff4daea7..af35fa51 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt @@ -34,7 +34,7 @@ class DropDownSpec : DomSpec { @Test fun render() { run { - val root = Root("test", true) + val root = Root("test", fixed = true) val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag") root.add(dd) dd.toggle() @@ -51,7 +51,7 @@ class DropDownSpec : DomSpec { @Test fun renderDropUp() { run { - val root = Root("test", true) + val root = Root("test", fixed = true) val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag").apply { dropup = true } root.add(dd) dd.toggle() @@ -68,7 +68,7 @@ class DropDownSpec : DomSpec { @Test fun renderHeaderElement() { run { - val root = Root("test", true) + val root = Root("test", fixed = true) val dd = DropDown("Dropdown", listOf("abc" to DD.HEADER.option), "flag") root.add(dd) dd.toggle() @@ -85,7 +85,7 @@ class DropDownSpec : DomSpec { @Test fun renderSeparatorElement() { run { - val root = Root("test", true) + val root = Root("test", fixed = true) val dd = DropDown("Dropdown", listOf("abc" to DD.SEPARATOR.option), "flag") root.add(dd) dd.toggle() @@ -102,7 +102,7 @@ class DropDownSpec : DomSpec { @Test fun renderDisabledElement() { run { - val root = Root("test", true) + val root = Root("test", fixed = true) val dd = DropDown("Dropdown", listOf("abc" to DD.DISABLED.option), "flag") root.add(dd) dd.toggle() @@ -119,7 +119,7 @@ class DropDownSpec : DomSpec { @Test fun toggle() { run { - val root = Root("test", true) + val root = Root("test", fixed = 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/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt index 807f837a..c3d17de9 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt @@ -36,7 +36,7 @@ class AlertSpec : DomSpec { @Test fun render() { run { - Root("test", true) + Root("test", fixed = 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/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt index 2e3ea3ef..1893ce81 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt +++ b/kvision-modules/kvision-bootstrap/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", true) + val root = Root("test", fixed = true) val ci = CloseIcon() root.add(ci) val element = document.getElementById("test") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt index dc734e10..875bf9e2 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt @@ -36,7 +36,7 @@ class ConfirmSpec : DomSpec { @Test fun render() { run { - Root("test", true) + Root("test", fixed = 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/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt index 523abfd5..7149b163 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt @@ -35,7 +35,7 @@ class ModalSpec : DomSpec { @Test fun render() { run { - Root("test", true) + Root("test", fixed = 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", true) + Root("test", fixed = true) val modal = Modal("Modal") modal.toggle() val content = document.getElementById("test")?.let { jQuery(it).find(".modal-title").html() } diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt index e87626ca..c79b9d32 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt +++ b/kvision-modules/kvision-bootstrap/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", true) + val root = Root("test", fixed = true) val window = Window("Window title", isResizable = false) root.add(window) val id = window.id |