diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2013-01-30 15:40:43 +0200 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2013-01-30 15:40:43 +0200 |
commit | f684807cdbd30576744a5b5ab429ab6011cc08d0 (patch) | |
tree | 3f5a6a73e5f8935738f1137f04c79127a6cd54a4 /uitest | |
parent | e73643afce3045af0c1e21eac1415358936b3179 (diff) | |
download | vaadin-framework-f684807cdbd30576744a5b5ab429ab6011cc08d0.tar.gz vaadin-framework-f684807cdbd30576744a5b5ab429ab6011cc08d0.zip |
Remove unnecessary special ConnectorMap handling from VTabsheet (#10839)
VTabsheet manipulated ConnectorMap directly when detaching a removed child;
this broke the hierarchy if the detached child was re-attached to another
component later on.
Change-Id: I18487c37b363d3fcd3984c789c7b73ed1bed5e28
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.html | 62 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java | 69 |
2 files changed, 131 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.html b/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.html new file mode 100644 index 0000000000..a23729b282 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.html @@ -0,0 +1,62 @@ +<?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:8070/" /> +<title>MoveComponentBetweenTabsheets</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">MoveComponentBetweenTabsheets</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/MoveComponentBetweenTabsheets?restartApplication</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runMoveComponentBetweenTabsheets::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runMoveComponentBetweenTabsheets::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[1]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]</td> + <td>L1</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runMoveComponentBetweenTabsheets::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[1]/VTabsheet[0]/VTabsheetPanel[0]/VLabel[0]</td> + <td>Left 1</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runMoveComponentBetweenTabsheets::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[1]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td> + <td>7,11</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runMoveComponentBetweenTabsheets::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[1]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td> + <td>R2</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runMoveComponentBetweenTabsheets::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[1]/VTabsheet[0]/VTabsheetPanel[0]/VLabel[0]</td> + <td>Right 2</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runMoveComponentBetweenTabsheets::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[0]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td> + <td>L2</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runMoveComponentBetweenTabsheets::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[0]/VTabsheet[0]/VTabsheetPanel[0]/VLabel[0]</td> + <td>Left 2</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java b/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java new file mode 100644 index 0000000000..3323d6a8d7 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java @@ -0,0 +1,69 @@ +package com.vaadin.tests.components.tabsheet;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.TabSheet;
+
+/**
+ * Main UI class
+ */
+@SuppressWarnings("serial")
+public class MoveComponentBetweenTabsheets extends AbstractTestUI {
+
+ TabSheet left, right;
+ private Label l1;
+ private Label l2;
+ private Label r1;
+ private Label r2;
+
+ void doTestOperation() {
+ right.addTab(l1, "L1");
+ right.setSelectedTab(l1);
+ }
+
+ @Override
+ protected void setup(VaadinRequest request) {
+
+ // TODO Auto-generated method stub
+ Button button = new Button("Move L1 to the right tabsheet");
+ button.addClickListener(new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ doTestOperation();
+ }
+ });
+
+ getLayout().addComponent(button);
+
+ left = new TabSheet();
+ l1 = new Label("Left 1");
+ left.addTab(l1, "L1");
+ l2 = new Label("Left 2");
+ left.addTab(l2, "L2");
+ left.setWidth("400px");
+
+ right = new TabSheet();
+ r1 = new Label("Right 1");
+ right.addTab(r1, "R1");
+ r2 = new Label("Right 2");
+ right.addTab(r2, "R2");
+ right.setWidth("400px");
+
+ getLayout().addComponent(new HorizontalLayout(left, right));
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Moving a component from a tabsheet to another sometimes causes a client-side error";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 10839;
+ }
+
+}
|