aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2009-11-06 11:09:09 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2009-11-06 11:09:09 +0000
commitd2a4ac654636d9d17da6dfa1ee79dfbfdb3ef23e (patch)
tree114b188914b0baf23fd5a3d0b13bc4ab327696fb /tests/src
parentbf0c1c36b2f121a20df7245e8af6ad1688c9830f (diff)
downloadvaadin-framework-d2a4ac654636d9d17da6dfa1ee79dfbfdb3ef23e.tar.gz
vaadin-framework-d2a4ac654636d9d17da6dfa1ee79dfbfdb3ef23e.zip
added test case
svn changeset:9662/svn branch:6.2
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/vaadin/tests/components/window/LongNotifications.java79
1 files changed, 79 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/components/window/LongNotifications.java b/tests/src/com/vaadin/tests/components/window/LongNotifications.java
new file mode 100644
index 0000000000..c70c14e08e
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/window/LongNotifications.java
@@ -0,0 +1,79 @@
+package com.vaadin.tests.components.window;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Window.Notification;
+
+public class LongNotifications extends TestBase {
+ private final String text = "This is a veeeery large notification in the main window which should definitly not exist at all, in any app. But they finally do in real world applications, no matter what you do. People have small screens and desperatly try to run web apps in their iphones.";
+
+ @Override
+ protected String getDescription() {
+ return "Notifications should not be wider than the screen.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 2632;
+ }
+
+ @Override
+ protected void setup() {
+ setTheme("tests-tickets");
+
+ Button b = new Button("Show loooong notification",
+ new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+
+ getMainWindow().showNotification(
+ text,
+ "This is description for the same notifications."
+ + text,
+ Notification.TYPE_HUMANIZED_MESSAGE);
+ }
+ });
+ getLayout().addComponent(b);
+
+ b = new Button("Show notifications", new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+
+ getMainWindow().showNotification("Example failed",
+ "This is description for the same notifications.",
+ Notification.TYPE_HUMANIZED_MESSAGE);
+ }
+ });
+
+ getLayout().addComponent(b);
+
+ b = new Button("Show loooong notification (error)",
+ new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+
+ getMainWindow()
+ .showNotification(
+ text,
+ "This is description for the same notifications."
+ + text,
+ Notification.TYPE_ERROR_MESSAGE);
+ }
+ });
+ getLayout().addComponent(b);
+
+ b = new Button("Show notification (error)", new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+
+ getMainWindow().showNotification("Example failed",
+ "This is description for the same notifications.",
+ Notification.TYPE_ERROR_MESSAGE);
+ }
+ });
+
+ getLayout().addComponent(b);
+
+ }
+}