diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-02-27 09:33:07 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-02-27 09:33:07 +0100 |
commit | 57da0d71e37adebb72d90292f850c06d4d969547 (patch) | |
tree | 569247ced5ed619a108ebe145f7ec3a0bae00555 /src/test | |
parent | 130e04183b2d9898d18fdc14b9048e541bbad583 (diff) | |
download | kvision-57da0d71e37adebb72d90292f850c06d4d969547.tar.gz kvision-57da0d71e37adebb72d90292f850c06d4d969547.tar.bz2 kvision-57da0d71e37adebb72d90292f850c06d4d969547.zip |
Various fixes for window component.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt | 5 |
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" ) |