From 6b14906f0e35dc522bd1c1a44682d728315cf619 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 6 Oct 2019 20:38:07 +0200 Subject: Update all tests. --- src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt | 4 ++-- src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt | 4 ++-- .../test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt | 2 +- .../kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt | 6 +++--- src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt | 4 ++-- src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt | 2 +- src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt | 4 ++-- src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt | 4 ++-- src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt | 2 +- src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt | 4 ++-- 10 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt index 4be84d22..785f9a2c 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt @@ -27,7 +27,7 @@ import test.pl.treksoft.kvision.DomSpec import kotlin.browser.document import kotlin.test.Test -class HelpBlockSpec : DomSpec { +class HelpTextSpec : DomSpec { @Test fun render() { @@ -37,7 +37,7 @@ class HelpBlockSpec : DomSpec { root.add(fl) val element = document.getElementById("test") assertEqualsHtml( - "Form Error", + "Form Error", element?.innerHTML, "Should render correct help block" ) 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 16da0c70..2c329ffa 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 @@ -45,7 +45,7 @@ class CheckBoxSpec : DomSpec { val element = document.getElementById("test") val id = ci.input.id assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct checkbox form control" ) @@ -53,7 +53,7 @@ class CheckBoxSpec : DomSpec { ci.circled = false ci.inline = false assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct checkbox form control" ) diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt index 55788c84..020ad529 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt @@ -44,7 +44,7 @@ class RadioGroupInputSpec : DomSpec { val rid1 = ci.getChildren().filterIsInstance().first().input.id val rid2 = ci.getChildren().filterIsInstance().last().input.id assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct radio button group form control" ) 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 2ed52b67..77547977 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 @@ -41,10 +41,10 @@ class RadioGroupSpec : DomSpec { root.add(ci) val element = document.getElementById("test") val id = ci.flabel.forId - val rid1 = ci.getChildren().filterIsInstance().first().input.id - val rid2 = ci.getChildren().filterIsInstance().last().input.id + val rid1 = ci.container.getChildren().filterIsInstance().first().input.id + val rid2 = ci.container.getChildren().filterIsInstance().last().input.id assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct radio button group form control" ) 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 bd0b3993..c709b548 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 @@ -44,7 +44,7 @@ class RadioSpec : DomSpec { val element = document.getElementById("test") val id = ci.input.id assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct radio button form control" ) @@ -52,7 +52,7 @@ class RadioSpec : DomSpec { ci.squared = true ci.inline = false assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct radio button form control" ) 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 2bc35a38..02ba7643 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 @@ -49,7 +49,7 @@ class TextSpec : DomSpec { ) ti.validatorError = "Validation Error" assertEqualsHtml( - "
Validation Error
", + "
Validation Error
", element?.innerHTML, "Should render correct input form control with validation error" ) 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 512c3bc2..e807bfd5 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt @@ -35,13 +35,13 @@ class ButtonSpec : DomSpec { fun render() { run { val root = Root("test", fixed = true) - val button = Button("Cancel", "fa-bars", ButtonStyle.PRIMARY) + val button = Button("Cancel", "fas fa-bars", ButtonStyle.PRIMARY) button.size = ButtonSize.LARGE button.block = true root.add(button) val element = document.getElementById("test") assertEqualsHtml( - "", + "", element?.innerHTML, "Should render correct html button" ) 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 ea3425c5..9a63c68e 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt @@ -33,10 +33,10 @@ class IconSpec : DomSpec { fun render() { run { val root = Root("test", fixed = true) - val icon = Icon("fa-check") + val icon = Icon("fas fa-check") root.add(icon) val element = document.getElementById("test") - assertEqualsHtml("", element?.innerHTML, "Should render correct icon") + assertEqualsHtml("", element?.innerHTML, "Should render correct icon") } } 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 169575fc..ed3a5347 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt @@ -41,7 +41,7 @@ class ImageSpec : DomSpec { root.add(image) val element = document.getElementById("test") assertEqualsHtml( - "\"Image\"", + "\"Image\"", element?.innerHTML, "Should render correct html image" ) 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 c312040a..69dc05d3 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt @@ -46,7 +46,7 @@ class TableSpec : DomSpec { root.add(table) val element = document.getElementById("test") assertEqualsHtml( - "
ab
AB
", + "
ab
AB
", element?.innerHTML, "Should render correct table" ) @@ -55,7 +55,7 @@ class TableSpec : DomSpec { table.types = setOf(TableType.BORDERED) val element2 = document.getElementById("test") assertEqualsHtml( - "
Caption
ab
AB
", + "
Caption
ab
AB
", element2?.innerHTML, "Should render correct responsive table" ) -- cgit