aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-12-11 23:12:12 +0200
committerSauli Tähkäpää <sauli@vaadin.com>2015-02-02 10:46:53 +0200
commitc76723db8dcbc15e6819b7b02c49c7293240fee4 (patch)
tree9a04369348ea35230cc65a3dd7a879b28c2ec0c6
parentf6dda35aa459b6b128c435248ba0e1f28356728b (diff)
downloadvaadin-framework-c76723db8dcbc15e6819b7b02c49c7293240fee4.tar.gz
vaadin-framework-c76723db8dcbc15e6819b7b02c49c7293240fee4.zip
Fix gradient path for notifications in Chameleon. (#15351)
Change-Id: Ie1e2726613033ad321e15f7f58e098080d4d9a5f
-rw-r--r--WebContent/VAADIN/themes/chameleon/components/notification/notification.scss4
-rw-r--r--uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotification.java30
-rw-r--r--uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotificationTest.java25
3 files changed, 57 insertions, 2 deletions
diff --git a/WebContent/VAADIN/themes/chameleon/components/notification/notification.scss b/WebContent/VAADIN/themes/chameleon/components/notification/notification.scss
index 85fbb3295f..c1a8d119c7 100644
--- a/WebContent/VAADIN/themes/chameleon/components/notification/notification.scss
+++ b/WebContent/VAADIN/themes/chameleon/components/notification/notification.scss
@@ -9,8 +9,8 @@ div.#{$primaryStyleName} {
-moz-box-shadow: 0 2px 5px rgba(0,0,0,.7);
box-shadow: 0 2px 5px rgba(0,0,0,.7);
//IE8 does not support rgba, using just rgb
- background:rgb(255,255,255) url(../img/grad-light-top.png) repeat-x;
- background:rgba(255,255,255,.90) url(../img/grad-light-top.png) repeat-x;
+ background:rgb(255,255,255) url(../../img/grad-light-top.png) repeat-x;
+ background:rgba(255,255,255,.90) url(../../img/grad-light-top.png) repeat-x;
}
.#{$primaryStyleName} p {
diff --git a/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotification.java b/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotification.java
new file mode 100644
index 0000000000..efb953530c
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotification.java
@@ -0,0 +1,30 @@
+package com.vaadin.tests.themes.chameleon;
+
+import com.vaadin.annotations.Theme;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Notification;
+import com.vaadin.ui.themes.ChameleonTheme;
+
+@Theme(ChameleonTheme.THEME_NAME)
+public class ChameleonNotification extends AbstractTestUI {
+ @Override
+ protected void setup(VaadinRequest request) {
+
+
+ addButton("Notification", new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent event) {
+ Notification notification = new Notification("Notification");
+ notification.setDelayMsec(30000);
+ notification.show(getUI().getPage());
+ }
+ });
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 15351;
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotificationTest.java b/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotificationTest.java
new file mode 100644
index 0000000000..ef41ef3df9
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotificationTest.java
@@ -0,0 +1,25 @@
+package com.vaadin.tests.themes.chameleon;
+
+import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.testbench.elements.NotificationElement;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+import org.junit.Test;
+
+import java.io.IOException;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.junit.Assert.assertThat;
+
+public class ChameleonNotificationTest extends MultiBrowserTest {
+ @Test
+ public void gradientPathIsCorrect() throws IOException {
+ openTestURL();
+ $(ButtonElement.class).first().click();
+
+ NotificationElement notificationElement
+ = $(NotificationElement.class).first();
+
+ assertThat(notificationElement.getCssValue("background-image"),
+ containsString("chameleon/img/grad"));
+ }
+} \ No newline at end of file