summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/application/CriticalNotificationsTestBase.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-06-25 00:06:17 +0300
committerHenri Sara <hesara@vaadin.com>2015-07-04 14:32:07 +0300
commit337e4a7fe7836286aa96898b23db34eafb55ade9 (patch)
treed71001fc9f79f4f6cd8c5017cd1d18c1969f125b /uitest/src/com/vaadin/tests/application/CriticalNotificationsTestBase.java
parent0c2c7d9ff96d9306b5254c3f8f3190cf5aaa0063 (diff)
downloadvaadin-framework-337e4a7fe7836286aa96898b23db34eafb55ade9.tar.gz
vaadin-framework-337e4a7fe7836286aa96898b23db34eafb55ade9.zip
Fix incorrect system notifications with details styling (#18340)
Change-Id: If0b5e185a049daadfa96dcdd2aa366e38d18fb7f
Diffstat (limited to 'uitest/src/com/vaadin/tests/application/CriticalNotificationsTestBase.java')
-rw-r--r--uitest/src/com/vaadin/tests/application/CriticalNotificationsTestBase.java32
1 files changed, 19 insertions, 13 deletions
diff --git a/uitest/src/com/vaadin/tests/application/CriticalNotificationsTestBase.java b/uitest/src/com/vaadin/tests/application/CriticalNotificationsTestBase.java
index 2f32fa8026..f3813fce50 100644
--- a/uitest/src/com/vaadin/tests/application/CriticalNotificationsTestBase.java
+++ b/uitest/src/com/vaadin/tests/application/CriticalNotificationsTestBase.java
@@ -18,6 +18,8 @@ package com.vaadin.tests.application;
import org.junit.Test;
import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.testbench.elements.CheckBoxElement;
+import com.vaadin.testbench.elements.NotificationElement;
import com.vaadin.tests.tb3.MultiBrowserThemeTest;
public abstract class CriticalNotificationsTestBase extends
@@ -64,23 +66,13 @@ public abstract class CriticalNotificationsTestBase extends
}
@Test
- public void authenticationError() throws Exception {
- testCriticalNotification("Authentication error");
- }
-
- @Test
- public void communicationError() throws Exception {
- testCriticalNotification("Communication error");
- }
-
- @Test
public void internalError() throws Exception {
testCriticalNotification("Internal error");
}
@Test
- public void cookiesDisabled() throws Exception {
- testCriticalNotification("Cookies disabled");
+ public void internalErrorDetails() throws Exception {
+ testCriticalNotification("Internal error", true);
}
@Test
@@ -93,13 +85,27 @@ public abstract class CriticalNotificationsTestBase extends
testCriticalNotification("Session expired");
}
+ @Test
+ public void sessionExpiredDetails() throws Exception {
+ testCriticalNotification("Session expired", true);
+ }
+
private void testCriticalNotification(String buttonCaption)
throws Exception {
+ testCriticalNotification(buttonCaption, false);
+ }
+
+ private void testCriticalNotification(String buttonCaption,
+ boolean withDetails) throws Exception {
openTestURL(); // "theme=" + getTheme());
+ if (withDetails) {
+ click($(CheckBoxElement.class).caption("Include details").first());
+ }
$(ButtonElement.class).caption(buttonCaption).first().click();
// Give the notification some time to animate
sleep(1000);
- compareScreen("notification");
+ compareScreen($(NotificationElement.class).first(),
+ "systemnotification");
}
@Override