summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-05-15 10:15:39 +0300
committerLeif Åstrand <leif@vaadin.com>2012-05-15 10:15:39 +0300
commit2ad73a7b9aedd38b14b0e40195e557dc4b097edd (patch)
tree5e95b6a6b937849671625047f9dd8abac4b3a878 /tests
parentde134d439dc79bc56be05fae7e8cb6255b322ba6 (diff)
downloadvaadin-framework-2ad73a7b9aedd38b14b0e40195e557dc4b097edd.tar.gz
vaadin-framework-2ad73a7b9aedd38b14b0e40195e557dc4b097edd.zip
Test app and script for #8804
Diffstat (limited to 'tests')
-rw-r--r--tests/testbench/com/vaadin/tests/components/popupview/ReopenPopupView.html73
-rw-r--r--tests/testbench/com/vaadin/tests/components/popupview/ReopenPopupView.java37
2 files changed, 110 insertions, 0 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/popupview/ReopenPopupView.html b/tests/testbench/com/vaadin/tests/components/popupview/ReopenPopupView.html
new file mode 100644
index 0000000000..a8d1407005
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/popupview/ReopenPopupView.html
@@ -0,0 +1,73 @@
+<?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>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.popupview.ReopenPopupView?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VPopupView[0]</td>
+ <td>42,5</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//span/span</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]</td>
+ <td>1. Button clicked</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//span/span</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]</td>
+ <td>2. Button clicked</td>
+</tr>
+<!--Click outside to close PopupView-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::</td>
+ <td>304,229</td>
+</tr>
+<tr>
+ <td>pause</td>
+ <td></td>
+ <td>1000</td>
+</tr>
+<!--Open PopupView again and click button-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VPopupView[0]</td>
+ <td>33,6</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//span/span</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]</td>
+ <td>3. Button clicked</td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/components/popupview/ReopenPopupView.java b/tests/testbench/com/vaadin/tests/components/popupview/ReopenPopupView.java
new file mode 100644
index 0000000000..89f6d155f2
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/popupview/ReopenPopupView.java
@@ -0,0 +1,37 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.tests.components.popupview;
+
+import com.vaadin.terminal.WrappedRequest;
+import com.vaadin.tests.components.AbstractTestRoot;
+import com.vaadin.tests.util.Log;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.PopupView;
+
+public class ReopenPopupView extends AbstractTestRoot {
+ private final Log log = new Log(5);
+
+ @Override
+ protected void setup(WrappedRequest request) {
+ addComponent(log);
+ addComponent(new PopupView("PopupView", new Button("Button",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ log.log("Button clicked");
+ }
+ })));
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Clicking a button in a PopupView should work every time";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return Integer.valueOf(8804);
+ }
+
+}