]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merge of (#8786) test to Vaadin 7. 44/544/1
authorAnna Koskinen <anna@vaadin.com>
Wed, 19 Dec 2012 16:06:52 +0000 (18:06 +0200)
committerAnna Koskinen <anna@vaadin.com>
Wed, 19 Dec 2012 16:06:52 +0000 (18:06 +0200)
PopupView throws an exception if reopened without explicitly letting it
close first.

Change-Id: I0493870c47f39a73da8393025e6fccfe3c4c6c27

uitest/src/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.html [new file with mode: 0644]
uitest/src/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.java [new file with mode: 0644]

diff --git a/uitest/src/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.html b/uitest/src/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.html
new file mode 100644 (file)
index 0000000..81676f6
--- /dev/null
@@ -0,0 +1,37 @@
+<?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="http://localhost:8068/" />
+<title>ClickingWhilePopupOpen</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">ClickingWhilePopupOpen</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>/run/ClickingWhilePopupOpen?restartApplication&amp;debug</td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runClickingWhilePopupOpen::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPopupView[0]</td>
+       <td>132,7</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runClickingWhilePopupOpen::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPopupView[0]</td>
+       <td>132,7</td>
+</tr>
+<tr>
+       <td>assertTextNotPresent</td>
+       <td>IllegalStateException: Cannot set a new parent without first clearing the old parent</td>
+       <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.java b/uitest/src/com/vaadin/tests/components/popupview/ClickingWhilePopupOpen.java
new file mode 100644 (file)
index 0000000..239c774
--- /dev/null
@@ -0,0 +1,26 @@
+package com.vaadin.tests.components.popupview;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.PopupView;
+
+public class ClickingWhilePopupOpen extends TestBase {
+
+    @Override
+    protected void setup() {
+        Label popup = new Label("Popup");
+        popup.setSizeUndefined();
+        addComponent(new PopupView("Click here to open the popup", popup));
+    }
+
+    @Override
+    protected String getDescription() {
+        return "Clicking the popup view when the popup is already open throws a client-side IllegalStateException";
+    }
+
+    @Override
+    protected Integer getTicketNumber() {
+        return 8786;
+    }
+
+}