aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt5
1 files changed, 3 insertions, 2 deletions
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 698efd2a..27de17de 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt
@@ -35,15 +35,16 @@ class WindowSpec : DomSpec {
val root = Root("test")
val window = Window("Window title", isResizable = false)
root.add(window)
+ val id = window.id
val element = document.getElementById("test")
assertEqualsHtml(
- "<div class=\"modal-content kv-window\" style=\"width: auto; position: absolute; z-index: 1000; overflow: hidden;\"><div class=\"modal-header\"><h4 class=\"modal-title\">Window title</h4></div><div style=\"height: auto; overflow: auto;\"></div></div>",
+ "<div class=\"modal-content kv-window\" id=\"$id\" style=\"width: auto; position: absolute; z-index: 1001; overflow: hidden;\"><div class=\"modal-header\"><h4 class=\"modal-title\">Window title</h4></div><div style=\"height: auto; overflow: auto;\"></div></div>",
element?.innerHTML,
"Should render floating window without resizable handler"
)
window.isResizable = true
assertEqualsHtml(
- "<div class=\"modal-content kv-window\" style=\"width: auto; position: absolute; z-index: 1000; overflow: hidden; resize: both; height: 10px;\"><div class=\"modal-header\"><h4 class=\"modal-title\">Window title</h4></div><div style=\"height: auto; overflow: auto; margin-bottom: 11px;\"></div><object style=\"display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1; opacity: 0;\" class=\"resize-sensor\" type=\"text/html\" data=\"about:blank\"></object></div>",
+ "<div class=\"modal-content kv-window\" id=\"$id\" style=\"width: auto; position: absolute; z-index: 1001; overflow: hidden; resize: both; height: 10px;\"><div class=\"modal-header\"><h4 class=\"modal-title\">Window title</h4></div><div style=\"height: auto; overflow: auto; margin-bottom: 11px;\"></div><object style=\"display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1; opacity: 0;\" class=\"resize-sensor\" type=\"text/html\" data=\"about:blank\"></object></div>",
element?.innerHTML,
"Should render floating window with resizable handler"
)