diff options
author | Artur Signell <artur.signell@itmill.com> | 2010-09-07 14:52:40 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2010-09-07 14:52:40 +0000 |
commit | 8da321536cab6ad8eff389b40963ca47ef43854e (patch) | |
tree | e1b7db7d75f744c5269a15881004818a992a0ed7 /tests | |
parent | 2522bfc02ca55f8ff44145d1bde994b2c8ffaa84 (diff) | |
download | vaadin-framework-8da321536cab6ad8eff389b40963ca47ef43854e.tar.gz vaadin-framework-8da321536cab6ad8eff389b40963ca47ef43854e.zip |
Test case for #5525
svn changeset:14761/svn branch:6.4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/vaadin/tests/layouts/GridLayoutMoveComponent.html | 57 | ||||
-rw-r--r-- | tests/src/com/vaadin/tests/layouts/GridLayoutMoveComponent.java | 66 |
2 files changed, 123 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/layouts/GridLayoutMoveComponent.html b/tests/src/com/vaadin/tests/layouts/GridLayoutMoveComponent.html new file mode 100644 index 0000000000..cde4341030 --- /dev/null +++ b/tests/src/com/vaadin/tests/layouts/GridLayoutMoveComponent.html @@ -0,0 +1,57 @@ +<?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.layouts.GridLayoutMoveComponent?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>all-left</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestslayoutsGridLayoutMoveComponent::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>label-right</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestslayoutsGridLayoutMoveComponent::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>label-button-right</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestslayoutsGridLayoutMoveComponent::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>label-button-textfield-right</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/src/com/vaadin/tests/layouts/GridLayoutMoveComponent.java b/tests/src/com/vaadin/tests/layouts/GridLayoutMoveComponent.java new file mode 100644 index 0000000000..265187e878 --- /dev/null +++ b/tests/src/com/vaadin/tests/layouts/GridLayoutMoveComponent.java @@ -0,0 +1,66 @@ +package com.vaadin.tests.layouts;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.TextField;
+
+public class GridLayoutMoveComponent extends TestBase {
+
+ @Override
+ protected void setup() {
+ final GridLayout grid = new GridLayout(2, 3);
+ grid.setCaption("Fixed size grid");
+ grid.setWidth("300px");
+ grid.setHeight("100px");
+ addComponent(grid);
+
+ final Label l = new Label("100% label");
+ final Button b = new Button("100px button");
+ b.setWidth("100px");
+ final TextField tf = new TextField("Undef textfield");
+
+ // Adding component to grid
+ grid.addComponent(l, 0, 0);
+ grid.addComponent(b, 0, 1);
+ grid.addComponent(tf, 0, 2);
+
+ addComponent(new Button("Shift label right",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ // Moving component from 0,0 -> 1,0
+ grid.removeComponent(l);
+ grid.addComponent(l, 1, 0);
+ }
+ }));
+
+ addComponent(new Button("Shift button right",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ grid.removeComponent(b);
+ grid.addComponent(b, 1, 1);
+ }
+ }));
+
+ addComponent(new Button("Shift text field right",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ grid.removeComponent(tf);
+ grid.addComponent(tf, 1, 2);
+ }
+ }));
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Click the buttons below the GridLayout to move the components to the right. Should definitely work no matter what.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 5525;
+ }
+
+}
|