summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-12-12 23:36:33 +0200
committerSauli Tähkäpää <sauli@vaadin.com>2015-01-20 09:35:35 +0200
commit052a6999e98ee72ec2e56b544b5bb62db36e1e1d (patch)
treeb195b13fe5ecf3986b8d149caea0b72c52026d6a
parentc3d83f8575380c4223b7109d4660a7798722ca05 (diff)
downloadvaadin-framework-052a6999e98ee72ec2e56b544b5bb62db36e1e1d.tar.gz
vaadin-framework-052a6999e98ee72ec2e56b544b5bb62db36e1e1d.zip
Change cursor to default for nondraggable windows in Valo. (#15377)
Change-Id: Ie019abbda1664e8dd4f53a76f2c6f21e3bc5443b
-rw-r--r--WebContent/VAADIN/themes/valo/components/_window.scss2
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/NonDraggableWindow.java19
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/NonDraggableWindowTest.java22
3 files changed, 42 insertions, 1 deletions
diff --git a/WebContent/VAADIN/themes/valo/components/_window.scss b/WebContent/VAADIN/themes/valo/components/_window.scss
index 23fa5338c2..52f57df183 100644
--- a/WebContent/VAADIN/themes/valo/components/_window.scss
+++ b/WebContent/VAADIN/themes/valo/components/_window.scss
@@ -110,6 +110,7 @@ $v-window-modality-curtain-background-color: #222 !default;
$scroll-divider-width: max(1px, first-number($v-border));
.#{$primary-stylename}-outerheader {
+ cursor: move;
position: absolute;
z-index: 2;
top: 0;
@@ -133,7 +134,6 @@ $v-window-modality-curtain-background-color: #222 !default;
}
.#{$primary-stylename}-header {
- cursor: move;
line-height: $v-unit-size - 1px;
padding-left: round($v-unit-size/3);
margin-right: $v-unit-size * 2;
diff --git a/uitest/src/com/vaadin/tests/themes/valo/NonDraggableWindow.java b/uitest/src/com/vaadin/tests/themes/valo/NonDraggableWindow.java
new file mode 100644
index 0000000000..9783db4413
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/themes/valo/NonDraggableWindow.java
@@ -0,0 +1,19 @@
+package com.vaadin.tests.themes.valo;
+
+import com.vaadin.annotations.Theme;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.themes.ValoTheme;
+
+@Theme(ValoTheme.THEME_NAME)
+public class NonDraggableWindow extends AbstractTestUI {
+ @Override
+ protected void setup(VaadinRequest request) {
+ Window window = new Window("Non-draggable window", new Label());
+ window.setDraggable(false);
+
+ addWindow(window);
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/themes/valo/NonDraggableWindowTest.java b/uitest/src/com/vaadin/tests/themes/valo/NonDraggableWindowTest.java
new file mode 100644
index 0000000000..f5a1bd903e
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/themes/valo/NonDraggableWindowTest.java
@@ -0,0 +1,22 @@
+package com.vaadin.tests.themes.valo;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.testbench.By;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class NonDraggableWindowTest extends MultiBrowserTest {
+
+ @Test
+ public void cursorIsDefault() {
+ openTestURL();
+
+ WebElement header = findElement(By.className("v-window-header"));
+
+ assertThat(header.getCssValue("cursor"), is("default"));
+ }
+} \ No newline at end of file