summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAutomerge <automerge@vaadin.com>2012-05-04 13:19:50 +0000
committerAutomerge <automerge@vaadin.com>2012-05-04 13:19:50 +0000
commit295e0f391131d5a9fa9d2f2b08dcc6418e42d484 (patch)
tree9b5e4f725bc4541d7efaebb70d1df60f78f916b7 /tests
parent63dc030e321b05faf02248ca266a90dec2aff067 (diff)
downloadvaadin-framework-295e0f391131d5a9fa9d2f2b08dcc6418e42d484.tar.gz
vaadin-framework-295e0f391131d5a9fa9d2f2b08dcc6418e42d484.zip
[merge from 6.7] Fix #7136: Opening a modal subwindow when there are visible notifications prevented the notifications from fading
svn changeset:23678/svn branch:6.8
Diffstat (limited to 'tests')
-rw-r--r--tests/testbench/com/vaadin/tests/components/notification/NotificationsAndModalWindow.html42
-rw-r--r--tests/testbench/com/vaadin/tests/components/notification/NotificationsAndModalWindow.java42
2 files changed, 84 insertions, 0 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/notification/NotificationsAndModalWindow.html b/tests/testbench/com/vaadin/tests/components/notification/NotificationsAndModalWindow.html
new file mode 100644
index 0000000000..35d22da46e
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/notification/NotificationsAndModalWindow.html
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>NotificationsAndModalWindow</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">NotificationsAndModalWindow</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.notification.NotificationsAndModalWindow?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsnotificationNotificationsAndModalWindow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>closeNotification</td>
+ <td>vaadin=runcomvaadintestscomponentsnotificationNotificationsAndModalWindow::Root/VNotification[1]</td>
+ <td>0,0</td>
+</tr>
+<tr>
+ <td>closeNotification</td>
+ <td>vaadin=runcomvaadintestscomponentsnotificationNotificationsAndModalWindow::Root/VNotification[0]</td>
+ <td>0,0</td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentsnotificationNotificationsAndModalWindow::Root/VNotification[0]</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/components/notification/NotificationsAndModalWindow.java b/tests/testbench/com/vaadin/tests/components/notification/NotificationsAndModalWindow.java
new file mode 100644
index 0000000000..562e8095f2
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/notification/NotificationsAndModalWindow.java
@@ -0,0 +1,42 @@
+package com.vaadin.tests.components.notification;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.Window.Notification;
+
+public class NotificationsAndModalWindow extends TestBase {
+
+ @Override
+ protected void setup() {
+ getMainWindow().showNotification("Notification 1",
+ Notification.TYPE_WARNING_MESSAGE);
+ getMainWindow().showNotification("Notification 2",
+ Notification.TYPE_WARNING_MESSAGE);
+
+ Button b = new Button("Button");
+ b.addListener(new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+
+ Window w = new Window("This is a window");
+ w.setModal(true);
+ getMainWindow().addWindow(w);
+ }
+
+ });
+ addComponent(b);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Press the button when both two notifications are visible to add a modal window to the app. When the modal window is visible, the notifications should disappear normally.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 7136;
+ }
+
+}