aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-bootstrap-select/src/test
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-10-06 20:38:07 +0200
committerRobert Jaros <rjaros@finn.pl>2019-10-06 20:38:07 +0200
commit6b14906f0e35dc522bd1c1a44682d728315cf619 (patch)
tree4f96d1c3bb8281289b96e2b11eecc404a3c98788 /kvision-modules/kvision-bootstrap-select/src/test
parent6ddb5374d4f1f629c98392e104460351065eaa7c (diff)
downloadkvision-6b14906f0e35dc522bd1c1a44682d728315cf619.tar.gz
kvision-6b14906f0e35dc522bd1c1a44682d728315cf619.tar.bz2
kvision-6b14906f0e35dc522bd1c1a44682d728315cf619.zip
Update all tests.
Diffstat (limited to 'kvision-modules/kvision-bootstrap-select/src/test')
-rw-r--r--kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt4
-rw-r--r--kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt6
3 files changed, 4 insertions, 8 deletions
diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
index bfd93900..0e759896 100644
--- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
+++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
@@ -44,7 +44,7 @@ class SelectInputSpec : DomSpec {
root.add(selectInput)
val element = document.getElementById("test")
assertTrue(
- true == element?.innerHTML?.endsWith("<select class=\"selectpicker\" multiple=\"multiple\" data-live-search=\"true\" title=\"Choose ...\" data-style=\"btn-default\" data-width=\"fit\" tabindex=\"-98\"><option value=\"#kvnull\"></option><option value=\"test1\">Test 1</option><option value=\"test2\">Test 2</option></select></div>"),
+ true == element?.innerHTML?.startsWith("<div class=\"dropdown bootstrap-select show-tick fit-width\"><select class=\"selectpicker\" multiple=\"multiple\" data-live-search=\"true\" title=\"Choose ...\" data-style=\"btn-default\" data-width=\"fit\" tabindex=\"-98\"><option value=\"#kvnull\"></option><option value=\"test1\">Test 1</option><option value=\"test2\">Test 2</option></select>"),
"Should render correct select input"
)
}
diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
index 33c36576..d711301a 100644
--- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
+++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
@@ -41,9 +41,9 @@ class SelectOptionSpec : DomSpec {
element?.innerHTML,
"Should render correct select option"
)
- selectOption.icon = "fa-flag"
+ selectOption.icon = "fas fa-flag"
assertEqualsHtml(
- "<option value=\"testValue\" data-icon=\"fa fa-flag\">testLabel</option>",
+ "<option value=\"testValue\" data-icon=\"fas fa-flag\">testLabel</option>",
element?.innerHTML,
"Should render correct select option with icon"
)
diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
index 9eddff81..9ed44f82 100644
--- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
+++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
@@ -45,11 +45,7 @@ class SelectSpec : DomSpec {
val element = document.getElementById("test")
val id = select.input.id
assertTrue(
- true == element?.innerHTML?.startsWith("<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label>"),
- "Should render correct select form control"
- )
- assertTrue(
- true == element?.innerHTML?.endsWith("<select class=\"form-control selectpicker\" id=\"$id\" multiple=\"multiple\" data-live-search=\"true\" title=\"Choose ...\" data-style=\"btn-default\" data-width=\"fit\" tabindex=\"-98\"><option value=\"#kvnull\"></option><option value=\"test1\">Test 1</option><option value=\"test2\">Test 2</option></select></div></div>"),
+ true == element?.innerHTML?.startsWith("<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><div class=\"dropdown bootstrap-select show-tick form-control fit-width\"><select class=\"form-control selectpicker\" id=\"$id\" multiple=\"multiple\" data-live-search=\"true\" title=\"Choose ...\" data-style=\"btn-default\" data-width=\"fit\" tabindex=\"-98\"><option value=\"#kvnull\"></option><option value=\"test1\">Test 1</option><option value=\"test2\">Test 2</option></select>"),
"Should render correct select form control"
)
}