]> source.dussan.org Git - vaadin-framework.git/commitdiff
Converted LayoutTesterApplication test to TB3
authorArtur Signell <artur@vaadin.com>
Mon, 28 Oct 2013 14:55:45 +0000 (16:55 +0200)
committerVaadin Code Review <review@vaadin.com>
Thu, 31 Oct 2013 07:07:11 +0000 (07:07 +0000)
Change-Id: I2cee37ae8297c74b4a37fc59e3cf835c9291ed43

uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java
uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java
uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.html [deleted file]
uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.java
uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplicationTest.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java

index 221680be114bb07cd0927e09d2876fd7365a5165..f55867c464cba96aa9dee6324f473c2c0aa3ad05 100644 (file)
@@ -124,6 +124,13 @@ public class GridLayoutTests extends AbstractLayoutTests {
         final Button button5 = new Button("Test remove row 0");
         final Button button6 = new Button("Test remove comp row3");
 
+        button1.setId("testButton1");
+        button2.setId("testButton2");
+        button3.setId("testButton3");
+        button4.setId("testButton4");
+        button5.setId("testButton5");
+        button6.setId("testButton6");
+
         baseLayout.addComponent(button1);
         baseLayout.addComponent(button2);
         baseLayout.addComponent(button3);
@@ -223,6 +230,10 @@ public class GridLayoutTests extends AbstractLayoutTests {
         final Button button4 = new Button("undefined size+add, table");
 
         glo.replaceComponent(x22, x22 = getTestTable());
+        button1.setId("testButton1");
+        button2.setId("testButton2");
+        button3.setId("testButton3");
+        button4.setId("testButton4");
 
         baseLayout.addComponent(button1);
         baseLayout.addComponent(button2);
@@ -287,6 +298,11 @@ public class GridLayoutTests extends AbstractLayoutTests {
         final Button button2 = new Button("set all cols expand 0.25");
         final Button button3 = new Button("set row 0 expand 0.5");
         final Button button4 = new Button("set row 3 expand 0.2");
+        button1.setId("testButton1");
+        button2.setId("testButton2");
+        button3.setId("testButton3");
+        button4.setId("testButton4");
+
         glo.setHeight("400px");
         glo.replaceComponent(x22, x22 = getTestTable());
 
@@ -396,6 +412,11 @@ public class GridLayoutTests extends AbstractLayoutTests {
         final Button button3 = new Button("Set fixed width and height 75%");
         final Button button4 = new Button("Set size full");
 
+        button1.setId("testButton1");
+        button2.setId("testButton2");
+        button3.setId("testButton3");
+        button4.setId("testButton4");
+
         glo.replaceComponent(x22, x22 = getTestTable());
 
         baseLayout.addComponent(button1);
@@ -467,6 +488,11 @@ public class GridLayoutTests extends AbstractLayoutTests {
         final Button button3 = new Button("Set margin off");
         final Button button4 = new Button("Set spacing off");
 
+        button1.setId("testButton1");
+        button2.setId("testButton2");
+        button3.setId("testButton3");
+        button4.setId("testButton4");
+
         baseLayout.addComponent(button1);
         baseLayout.addComponent(button2);
         baseLayout.addComponent(button3);
index 7a53a6583ea3751fb360823ac8ea66125275c685..971205ccbb5d6347a26d6c02904563f5d4ae84ba 100644 (file)
@@ -123,7 +123,10 @@ public class HorizontalLayoutTests extends AbstractLayoutTests {
         final Button replaceButton = new Button("Test replace");
         final Button moveButton = new Button("Test move");
         final Button removeButton = new Button("Test remove");
-
+        addButton.setId("testButton1");
+        replaceButton.setId("testButton2");
+        moveButton.setId("testButton3");
+        removeButton.setId("testButton4");
         replaceButton.setEnabled(false);
         moveButton.setEnabled(false);
         removeButton.setEnabled(false);
@@ -193,6 +196,10 @@ public class HorizontalLayoutTests extends AbstractLayoutTests {
         final Button smallerButton = new Button("200 px width");
         final Button originalButton = new Button("undefined size+add");
 
+        biggerButton.setId("testButton1");
+        smallerButton.setId("testButton2");
+        originalButton.setId("testButton3");
+
         baseLayout.addComponent(biggerButton);
         baseLayout.addComponent(smallerButton);
         baseLayout.addComponent(originalButton);
@@ -257,6 +264,11 @@ public class HorizontalLayoutTests extends AbstractLayoutTests {
         final Button button3 = new Button("Set fixed width and height 75%");
         final Button button4 = new Button("Set size full");
 
+        button1.setId("testButton1");
+        button2.setId("testButton2");
+        button3.setId("testButton3");
+        button4.setId("testButton4");
+
         baseLayout.addComponent(button1);
         baseLayout.addComponent(button2);
         baseLayout.addComponent(button3);
@@ -332,6 +344,9 @@ public class HorizontalLayoutTests extends AbstractLayoutTests {
         final Button button1 = new Button("Expand to 1/undefined");
         final Button button2 = new Button("Expand to 0.5/0.5");
         final Button button3 = new Button("Expand to 0.75/0.25");
+        button1.setId("testButton1");
+        button2.setId("testButton2");
+        button3.setId("testButton3");
 
         baseLayout.addComponent(button1);
         baseLayout.addComponent(button2);
@@ -438,6 +453,10 @@ public class HorizontalLayoutTests extends AbstractLayoutTests {
         final Button button2 = new Button("Set spacing on");
         final Button button3 = new Button("Set margin off");
         final Button button4 = new Button("Set spacing off");
+        button1.setId("testButton1");
+        button2.setId("testButton2");
+        button3.setId("testButton3");
+        button4.setId("testButton4");
 
         baseLayout.addComponent(button1);
         baseLayout.addComponent(button2);
diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.html b/uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.html
deleted file mode 100644 (file)
index 8408aba..0000000
+++ /dev/null
@@ -1,896 +0,0 @@
-<?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>LayoutTesterApplication</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">LayoutTesterApplication</td></tr>
-</thead><tbody>
-<tr>
-       <td>open</td>
-       <td>/run/com.vaadin.tests.layouts.layouttester.LayoutTesterApplication?restartApplication</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>1</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>2</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>3</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>4</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>5</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>6</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>7</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>8</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>9</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>10</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>11</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>12</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>13</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>14</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>15</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>16</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>17</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>18</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>19</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>20</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>21</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>22</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>23</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>24</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>25</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>26</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>27</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>28</td>
-</tr>
-<tr>
-       <td>select</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VNativeSelect[0]/domChild[0]</td>
-       <td>label=class com.vaadin.ui.HorizontalLayout</td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>29</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>30</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>31</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>32</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>33</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>34</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>35</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>36</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>37</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>38</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>39</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>40</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>41</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>42</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>43</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>44</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>45</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>46</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>47</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>48</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>49</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>50</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>51</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>52</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>53</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>54</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>55</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>56</td>
-</tr>
-<tr>
-       <td>select</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VNativeSelect[0]/domChild[0]</td>
-       <td>label=class com.vaadin.ui.GridLayout</td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>57</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>58</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>59</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>60</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>61</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>62</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>63</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>64</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>65</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>66</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>67</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>68</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>69</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>70</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>71</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>72</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>73</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>74</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>75</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>76</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>77</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>78</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>79</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>80</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>81</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>82</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>83</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>84</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>85</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>86</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/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>87</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>88</td>
-</tr>
-</tbody></table>
-</body>
-</html>
index 72863895a138897b55cbc48aa7ed40b91eb8f09f..ef092d2539179b3ff85845f359a7c23413a733b6 100644 (file)
@@ -20,18 +20,20 @@ public class LayoutTesterApplication extends AbstractTestCase {
     Button nextButton = new Button("Next");
     private int layoutIndex = -1;
 
-    private static final String[] layoutGetters = new String[] {
-            "getCaptionsTests", "getIconsTests",
-            "getRequiredErrorIndicatorsTests", "getAlignmentTests",
-            "getExpandRatiosTests", "getMarginSpacingTests",
-            "getComponentAddReplaceMoveTests", "getComponentSizingTests",
-            "getLayoutSizingTests" };
+    static final String[] layoutGetters = new String[] { "getCaptionsTests",
+            "getIconsTests", "getRequiredErrorIndicatorsTests",
+            "getAlignmentTests", "getExpandRatiosTests",
+            "getMarginSpacingTests", "getComponentAddReplaceMoveTests",
+            "getComponentSizingTests", "getLayoutSizingTests" };
+    public static final String NEXT_BUTTON_ID = "nextButton";
+    private static final String LAYOUT_SELECT_ID = "layoutSelect";
 
     private LegacyWindow mainWindow;
     private NativeSelect layoutSelector;
 
     @Override
     public void init() {
+        nextButton.setId(NEXT_BUTTON_ID);
         mainWindow = new LegacyWindow("LayoutTesterApplication");
         setMainWindow(mainWindow);
         nextLayout();
@@ -112,6 +114,7 @@ public class LayoutTesterApplication extends AbstractTestCase {
     private NativeSelect getLayoutTypeSelect() {
         if (layoutSelector == null) {
             layoutSelector = new NativeSelect();
+            layoutSelector.setId(LAYOUT_SELECT);
             layoutSelector.addItem(VerticalLayout.class);
             layoutSelector.addItem(HorizontalLayout.class);
             layoutSelector.addItem(GridLayout.class);
diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplicationTest.java b/uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplicationTest.java
new file mode 100644 (file)
index 0000000..3319761
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.layouts.layouttester;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.Select;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.VerticalLayout;
+
+public class LayoutTesterApplicationTest extends MultiBrowserTest {
+    Map<String, Integer> numberOfSubTests = new HashMap<String, Integer>();
+    private Set<String> tableOrIconsTests = new HashSet<String>();
+
+    {
+        numberOfSubTests.put("getExpandRatiosTests", 3);
+        numberOfSubTests.put("getLayoutSizingTests", 4);
+        numberOfSubTests.put("getComponentAddReplaceMoveTests", 4);
+        numberOfSubTests.put("getMarginSpacingTests", 4);
+        numberOfSubTests.put("getComponentSizingTests", 3);
+
+        tableOrIconsTests.add("getComponentSizingTests");
+        tableOrIconsTests.add("getExpandRatiosTests");
+        tableOrIconsTests.add("getLayoutSizingTests");
+        tableOrIconsTests.add("getMarginSpacingTests");
+        tableOrIconsTests.add("getIconsTests");
+
+    }
+
+    @Test
+    public void verticalLayout() throws Exception {
+        openTestURL();
+        runTest(VerticalLayout.class);
+    }
+
+    @Test
+    public void horizontalLayout() throws Exception {
+        openTestURL();
+        runTest(HorizontalLayout.class);
+    }
+
+    @Test
+    public void gridLayout() throws Exception {
+        numberOfSubTests.put("getComponentAddReplaceMoveTests", 6);
+        numberOfSubTests.put("getComponentSizingTests", 4);
+        numberOfSubTests.put("getExpandRatiosTests", 4);
+
+        openTestURL();
+        runTest(GridLayout.class);
+    }
+
+    private void runTest(Class<?> layoutClass) throws Exception {
+        new Select(vaadinElementById("layoutSelect").findElement(
+                By.xpath("select")))
+                .selectByVisibleText(layoutClass.toString());
+        focusElementWithId("nextButton");
+
+        for (String subTest : LayoutTesterApplication.layoutGetters) {
+            compareScreen(subTest);
+            Integer subTests = numberOfSubTests.get(subTest);
+            if (subTests != null) {
+                for (int i = 1; i <= subTests; i++) {
+                    clickAndCompareScreen(subTest, "testButton" + i);
+                }
+            }
+            getNextButton().click();
+        }
+
+    }
+
+    /**
+     * @param elementId
+     *            the id of the element to focus
+     */
+    private void focusElementWithId(String elementId) {
+        // This should really be in TestBench
+        ((JavascriptExecutor) getDriver())
+                .executeScript("document.getElementById('" + elementId
+                        + "').focus()");
+    }
+
+    /**
+     * Clicks the button with the given id and compares the result to a
+     * screenshot named 'screenshotPrefix'-buttonCaption.
+     * 
+     * @param screenshotPrefix
+     * @param buttonId
+     * @throws Exception
+     */
+    private void clickAndCompareScreen(String screenshotPrefix, String buttonId)
+            throws Exception {
+        WebElement button = vaadinElementById(buttonId);
+        button.click();
+        if (needsDelayToStabilize(screenshotPrefix)) {
+            // Table does some extra layout phase and TestBench does not always
+            // take this into account, grabbing screenshots before the layout
+            // phase is done (see #12866).
+            sleep(200);
+        }
+        compareScreen(screenshotPrefix + "-" + sanitize(button.getText()));
+    }
+
+    private boolean needsDelayToStabilize(String screenshotPrefix) {
+        return tableOrIconsTests.contains(screenshotPrefix);
+    }
+
+    private String sanitize(String text) {
+        return text.replace("%", "pct").replaceAll("[^a-zA-Z0-9]", "-");
+    }
+
+    private WebElement getNextButton() {
+        return vaadinElementById(LayoutTesterApplication.NEXT_BUTTON_ID);
+    }
+}
index 7764589ff712390b168b5f17f4a49a9da7a3a968..04cee2d68d00022e8a2adbb8d37c7dc006c50ca0 100644 (file)
@@ -127,6 +127,10 @@ public class VerticalLayoutTests extends AbstractLayoutTests {
         final Button replaceButton = new Button("Test replace");
         final Button moveButton = new Button("Test move");
         final Button removeButton = new Button("Test remove");
+        addButton.setId("testButton1");
+        replaceButton.setId("testButton2");
+        moveButton.setId("testButton3");
+        removeButton.setId("testButton4");
 
         replaceButton.setEnabled(false);
         moveButton.setEnabled(false);
@@ -196,7 +200,9 @@ public class VerticalLayoutTests extends AbstractLayoutTests {
         final Button biggerButton = new Button("full size");
         final Button smallerButton = new Button("200 px width");
         final Button originalButton = new Button("undefined size and add");
-
+        biggerButton.setId("testButton1");
+        smallerButton.setId("testButton2");
+        originalButton.setId("testButton3");
         vlo.addComponent(biggerButton);
         vlo.addComponent(smallerButton);
         vlo.addComponent(originalButton);
@@ -265,6 +271,11 @@ public class VerticalLayoutTests extends AbstractLayoutTests {
         final Button button3 = new Button("Set fixed width and height 75%");
         final Button button4 = new Button("Set size full");
 
+        button1.setId("testButton1");
+        button2.setId("testButton2");
+        button3.setId("testButton3");
+        button4.setId("testButton4");
+
         vlo.addComponent(button1);
         vlo.addComponent(button2);
         vlo.addComponent(button3);
@@ -344,8 +355,11 @@ public class VerticalLayoutTests extends AbstractLayoutTests {
         c2.setSizeFull();
 
         final Button button1 = new Button("Expand to 1/undefined");
+        button1.setId("testButton1");
         final Button button2 = new Button("Expand to 0.5/0.5");
+        button2.setId("testButton2");
         final Button button3 = new Button("Expand to 0.75/0.25");
+        button3.setId("testButton3");
 
         vlo.addComponent(button1);
         vlo.addComponent(button2);
@@ -460,6 +474,10 @@ public class VerticalLayoutTests extends AbstractLayoutTests {
         final Button button2 = new Button("Set spacing on");
         final Button button3 = new Button("Set margin off");
         final Button button4 = new Button("Set spacing off");
+        button1.setId("testButton1");
+        button2.setId("testButton2");
+        button3.setId("testButton3");
+        button4.setId("testButton4");
 
         vlo.addComponent(button1);
         vlo.addComponent(button2);