diff options
29 files changed, 776 insertions, 1054 deletions
diff --git a/client/src/com/vaadin/client/Util.java b/client/src/com/vaadin/client/Util.java index 8a5712215d..9cdfa954c6 100644 --- a/client/src/com/vaadin/client/Util.java +++ b/client/src/com/vaadin/client/Util.java @@ -525,12 +525,11 @@ public class Util { * See: bugs #11994 and #12736. * * @param contentNode - * an element that contains a scrollable element as its first - * child + * an element that is scrollable * * @since 7.1.8 */ - public static void removeUnneededScrollbars(final Element contentNode) { + public static void removeUnneededScrollbars(final Element scrollable) { if (BrowserInfo.get().isWebkit()) { /* @@ -544,9 +543,6 @@ public class Util { @Override public void execute() { - final com.google.gwt.dom.client.Element scrollable = contentNode - .getFirstChildElement(); - // Adjusting the width or height may change the scroll // position, so store the current position int horizontalScrollPosition = scrollable.getScrollLeft(); @@ -556,10 +552,10 @@ public class Util { final String oldHeight = scrollable.getStyle().getHeight(); scrollable.getStyle().setWidth(110, Unit.PCT); - scrollable.getStyle().setHeight(110, Unit.PCT); scrollable.getOffsetWidth(); - scrollable.getOffsetHeight(); scrollable.getStyle().setProperty("width", oldWidth); + scrollable.getStyle().setHeight(110, Unit.PCT); + scrollable.getOffsetHeight(); scrollable.getStyle().setProperty("height", oldHeight); // Restore the scroll position diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java index acca80f02b..c9b9e46cd5 100644 --- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java +++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java @@ -346,6 +346,10 @@ public class AtmospherePushConnection implements PushConnection { protected void onReconnect(JavaScriptObject request, final AtmosphereResponse response) { + if (state == State.CONNECTED) { + VConsole.log("No onClose was received before reconnect. Forcing state to closed."); + state = State.CONNECT_PENDING; + } VConsole.log("Reopening push connection"); } diff --git a/client/src/com/vaadin/client/ui/VCalendarPanel.java b/client/src/com/vaadin/client/ui/VCalendarPanel.java index 58e0448b5f..96678fd133 100644 --- a/client/src/com/vaadin/client/ui/VCalendarPanel.java +++ b/client/src/com/vaadin/client/ui/VCalendarPanel.java @@ -56,6 +56,7 @@ import com.vaadin.client.DateTimeService; import com.vaadin.client.Util; import com.vaadin.client.VConsole; import com.vaadin.shared.ui.datefield.Resolution; +import com.vaadin.shared.util.SharedUtil; @SuppressWarnings("deprecation") public class VCalendarPanel extends FocusableFlexTable implements @@ -2214,9 +2215,9 @@ public class VCalendarPanel extends FocusableFlexTable implements * @param startDate * - the allowed range's start date */ - public void setRangeStart(Date rangeStart) { - if (this.rangeStart != rangeStart) { - this.rangeStart = rangeStart; + public void setRangeStart(Date newRangeStart) { + if (!SharedUtil.equals(rangeStart, newRangeStart)) { + rangeStart = newRangeStart; if (initialRenderDone) { // Dynamic updates to the range needs to render the calendar to // update the element stylenames @@ -2233,9 +2234,9 @@ public class VCalendarPanel extends FocusableFlexTable implements * @param endDate * - the allowed range's end date */ - public void setRangeEnd(Date rangeEnd) { - if (this.rangeEnd != rangeEnd) { - this.rangeEnd = rangeEnd; + public void setRangeEnd(Date newRangeEnd) { + if (!SharedUtil.equals(rangeEnd, newRangeEnd)) { + rangeEnd = newRangeEnd; if (initialRenderDone) { // Dynamic updates to the range needs to render the calendar to // update the element stylenames diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java index 6a1a2e547b..f5417e3642 100644 --- a/client/src/com/vaadin/client/ui/VWindow.java +++ b/client/src/com/vaadin/client/ui/VWindow.java @@ -537,7 +537,8 @@ public class VWindow extends VWindowOverlay implements super.setVisible(visible); } if (visible && BrowserInfo.get().isWebkit()) { - Util.removeUnneededScrollbars(contents); + Util.removeUnneededScrollbars((Element) contents + .getFirstChildElement()); updateContentsSize(); positionOrSizeUpdated(); } diff --git a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java index f018caefa5..d2aadca99b 100644 --- a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java @@ -178,8 +178,16 @@ public class PopupDateFieldConnector extends TextualDateConnector { public void onStateChanged(StateChangeEvent stateChangeEvent) { super.onStateChanged(stateChangeEvent); getWidget().setTextFieldEnabled(getState().textFieldEnabled); - getWidget().setRangeStart(getState().rangeStart); - getWidget().setRangeEnd(getState().rangeEnd); + getWidget().setRangeStart(nullSafeDateClone(getState().rangeStart)); + getWidget().setRangeEnd(nullSafeDateClone(getState().rangeEnd)); + } + + private Date nullSafeDateClone(Date date) { + if (date == null) { + return null; + } else { + return (Date) date.clone(); + } } @Override diff --git a/client/src/com/vaadin/client/ui/window/WindowConnector.java b/client/src/com/vaadin/client/ui/window/WindowConnector.java index 464ab386c1..5f1bb7a799 100644 --- a/client/src/com/vaadin/client/ui/window/WindowConnector.java +++ b/client/src/com/vaadin/client/ui/window/WindowConnector.java @@ -99,6 +99,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector super.init(); VWindow window = getWidget(); + window.id = getConnectorId(); + window.client = getConnection(); getLayoutManager().registerDependency(this, window.contentPanel.getElement()); @@ -127,9 +129,6 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector VWindow window = getWidget(); String connectorId = getConnectorId(); - window.id = getConnectorId(); - window.client = client; - // Workaround needed for Testing Tools (GWT generates window DOM // slightly different in different browsers). window.closeBox.setId(connectorId + "_window_close"); diff --git a/push/build.xml b/push/build.xml index 9e3c0c1414..abeec2a8b0 100644 --- a/push/build.xml +++ b/push/build.xml @@ -16,9 +16,7 @@ <property name="vaadinPush.debug.js" location="${result.dir}/js/VAADIN/vaadinPush.debug.js" /> <!-- Keep the version number in sync with ivy.xml, server/src/com/vaadin/server/Constants.java --> - <property name="atmosphere.runtime.version" value="1.0.14.vaadin4" /> - <!-- Keep the version number in sync with ivy.xml --> - <property name="atmosphere.js.version" value="2.0.3-vaadin1" /> + <property name="atmosphere.runtime.version" value="1.0.18.vaadin1" /> <property name="jquery.version" value="1.9.0" /> <path id="classpath.compile.custom" /> @@ -32,15 +30,16 @@ <target name="vaadinPush.js"> <mkdir dir="${result.dir}/js/VAADIN" /> - <ivy:resolve file="ivy.xml" conf="push.js" /> + <ivy:resolve log="download-only" file="ivy.xml" conf="push.js" /> <ivy:cachepath pathid="atmosphere.jquery.deps" conf="push.js" /> - <copy todir="${temp.dir}" flatten="true"> + <delete dir="${temp.dir}" /> + <copy flatten="true" tofile="${temp.dir}/jquery.war"> <path refid="atmosphere.jquery.deps" /> </copy> <!-- Unzip to temp dir --> - <unzip src="${temp.dir}/jquery-${atmosphere.js.version}.war" dest="${jquery.unpack}"> + <unzip src="${temp.dir}/jquery.war" dest="${jquery.unpack}"> <patternset> <include name="**/jquery.atmosphere.js" /> <include name="**/jquery-${jquery.version}.js" /> diff --git a/push/ivy.xml b/push/ivy.xml index 1f76224190..2be47512fe 100644 --- a/push/ivy.xml +++ b/push/ivy.xml @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ivy-module [ -<!-- Keep the version numbers in sync with build.xml --> - <!ENTITY atmosphere.runtime.version "1.0.14.vaadin4"> - <!ENTITY atmosphere.js.version "2.0.3-vaadin1"> +<!-- Keep the version number in sync with build.xml --> + <!ENTITY atmosphere.runtime.version "1.0.18.vaadin1"> + + <!ENTITY atmosphere.js.version "2.0.3.vaadin2"> ]> <ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" diff --git a/server/src/com/vaadin/server/Constants.java b/server/src/com/vaadin/server/Constants.java index e910ba903b..b0841da314 100644 --- a/server/src/com/vaadin/server/Constants.java +++ b/server/src/com/vaadin/server/Constants.java @@ -67,7 +67,7 @@ public interface Constants { // Keep the version number in sync with push/build.xml and other locations // listed in that file - static final String REQUIRED_ATMOSPHERE_RUNTIME_VERSION = "1.0.14.vaadin4"; + static final String REQUIRED_ATMOSPHERE_RUNTIME_VERSION = "1.0.18.vaadin1"; static final String INVALID_ATMOSPHERE_VERSION_WARNING = "\n" + "=================================================================\n" diff --git a/uitest/ivy.xml b/uitest/ivy.xml index d75a591f94..9c86b2b68c 100644 --- a/uitest/ivy.xml +++ b/uitest/ivy.xml @@ -73,7 +73,8 @@ <dependency org="junit" name="junit" rev="4.11" conf="build,ide -> default" /> - + <dependency org="com.jcraft" name="jsch" rev="0.1.50" + conf="ide, build->default" /> <dependency org="commons-codec" name="commons-codec" rev="1.5" conf="build,ide->default" /> <dependency org="commons-io" name="commons-io" rev="2.2" diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java b/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java index 221680be11..f55867c464 100644 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java @@ -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); diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java b/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java index 7a53a6583e..971205ccbb 100644 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java @@ -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 index 8408aba9fd..0000000000 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.html +++ /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> diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.java b/uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.java index 72863895a1..5b68e04144 100644 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.java +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.java @@ -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_ID); 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 index 0000000000..33197613dc --- /dev/null +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/LayoutTesterApplicationTest.java @@ -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); + } +} diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java b/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java index 7764589ff7..04cee2d68d 100644 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java @@ -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); diff --git a/uitest/src/com/vaadin/tests/push/BasicPush.java b/uitest/src/com/vaadin/tests/push/BasicPush.java index d6c45a2ed0..8e8f418c5f 100644 --- a/uitest/src/com/vaadin/tests/push/BasicPush.java +++ b/uitest/src/com/vaadin/tests/push/BasicPush.java @@ -30,6 +30,16 @@ import com.vaadin.ui.Label; @Push public class BasicPush extends AbstractTestUI { + public static final String CLIENT_COUNTER_ID = "clientCounter"; + + public static final String STOP_TIMER_ID = "stopTimer"; + + public static final String START_TIMER_ID = "startTimer"; + + public static final String SERVER_COUNTER_ID = "serverCounter"; + + public static final String INCREMENT_BUTTON_ID = "incrementCounter"; + private ObjectProperty<Integer> counter = new ObjectProperty<Integer>(0); private ObjectProperty<Integer> counter2 = new ObjectProperty<Integer>(0); @@ -48,15 +58,19 @@ public class BasicPush extends AbstractTestUI { */ Label lbl = new Label(counter); lbl.setCaption("Client counter (click 'increment' to update):"); + lbl.setId(CLIENT_COUNTER_ID); addComponent(lbl); - addComponent(new Button("Increment", new Button.ClickListener() { + Button incrementButton = new Button("Increment", + new Button.ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - counter.setValue(counter.getValue() + 1); - } - })); + @Override + public void buttonClick(ClickEvent event) { + counter.setValue(counter.getValue() + 1); + } + }); + incrementButton.setId(INCREMENT_BUTTON_ID); + addComponent(incrementButton); spacer(); @@ -65,33 +79,37 @@ public class BasicPush extends AbstractTestUI { */ lbl = new Label(counter2); lbl.setCaption("Server counter (updates each 3s by server thread) :"); + lbl.setId(SERVER_COUNTER_ID); addComponent(lbl); - addComponent(new Button("Start timer", new Button.ClickListener() { - - @Override - public void buttonClick(ClickEvent event) { - counter2.setValue(0); - if (task != null) { - task.cancel(); - } - task = new TimerTask() { + Button startTimer = new Button("Start timer", + new Button.ClickListener() { @Override - public void run() { - access(new Runnable() { + public void buttonClick(ClickEvent event) { + counter2.setValue(0); + if (task != null) { + task.cancel(); + } + task = new TimerTask() { + @Override public void run() { - counter2.setValue(counter2.getValue() + 1); + access(new Runnable() { + @Override + public void run() { + counter2.setValue(counter2.getValue() + 1); + } + }); } - }); + }; + timer.scheduleAtFixedRate(task, 3000, 3000); } - }; - timer.scheduleAtFixedRate(task, 3000, 3000); - } - })); + }); + startTimer.setId(START_TIMER_ID); + addComponent(startTimer); - addComponent(new Button("Stop timer", new Button.ClickListener() { + Button stopTimer = new Button("Stop timer", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { if (task != null) { @@ -99,7 +117,9 @@ public class BasicPush extends AbstractTestUI { task = null; } } - })); + }); + stopTimer.setId(STOP_TIMER_ID); + addComponent(stopTimer); } @Override diff --git a/uitest/src/com/vaadin/tests/push/BasicPushTest.java b/uitest/src/com/vaadin/tests/push/BasicPushTest.java index 57af8524bc..ef40ae09dc 100644 --- a/uitest/src/com/vaadin/tests/push/BasicPushTest.java +++ b/uitest/src/com/vaadin/tests/push/BasicPushTest.java @@ -19,6 +19,7 @@ import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.WebElement; +import com.vaadin.tests.tb3.AbstractTB3Test; import com.vaadin.tests.tb3.MultiBrowserTest; public abstract class BasicPushTest extends MultiBrowserTest { @@ -30,15 +31,13 @@ public abstract class BasicPushTest extends MultiBrowserTest { // Test client initiated push Assert.assertEquals(0, getClientCounter()); getIncrementButton().click(); - Assert.assertEquals( - "Client counter not incremented by button click", 1, - getClientCounter()); + Assert.assertEquals("Client counter not incremented by button click", + 1, getClientCounter()); getIncrementButton().click(); getIncrementButton().click(); getIncrementButton().click(); - Assert.assertEquals( - "Four clicks should have incremented counter to 4", 4, - getClientCounter()); + Assert.assertEquals("Four clicks should have incremented counter to 4", + 4, getClientCounter()); // Test server initiated push getServerCounterStartButton().click(); @@ -63,30 +62,47 @@ public abstract class BasicPushTest extends MultiBrowserTest { } private int getServerCounter() { - return Integer.parseInt(getServerCounterElement().getText()); + return getServerCounter(this); } private int getClientCounter() { - return Integer.parseInt(getClientCounterElement().getText()); + return getClientCounter(this); } - private WebElement getServerCounterElement() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[4]/VLabel[0]"); + public static int getClientCounter(AbstractTB3Test t) { + WebElement clientCounterElem = t + .vaadinElementById(BasicPush.CLIENT_COUNTER_ID); + return Integer.parseInt(clientCounterElem.getText()); } - private WebElement getServerCounterStartButton() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[5]/VButton[0]/domChild[0]/domChild[0]"); + private WebElement getIncrementButton() { + return getIncrementButton(this); } private WebElement getServerCounterStopButton() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[6]/VButton[0]/domChild[0]/domChild[0]"); + return getServerCounterStopButton(this); } - private WebElement getIncrementButton() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VButton[0]/domChild[0]/domChild[0]"); + private WebElement getServerCounterStartButton() { + return getServerCounterStartButton(this); + } + + public static int getServerCounter(AbstractTB3Test t) { + WebElement serverCounterElem = t + .vaadinElementById(BasicPush.SERVER_COUNTER_ID); + return Integer.parseInt(serverCounterElem.getText()); } - private WebElement getClientCounterElement() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VLabel[0]"); + public static WebElement getServerCounterStartButton(AbstractTB3Test t) { + return t.vaadinElementById(BasicPush.START_TIMER_ID); } + + public static WebElement getServerCounterStopButton(AbstractTB3Test t) { + return t.vaadinElementById(BasicPush.STOP_TIMER_ID); + } + + public static WebElement getIncrementButton(AbstractTB3Test t) { + return t.vaadinElementById(BasicPush.INCREMENT_BUTTON_ID); + } + }
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/push/EnableDisablePush.java b/uitest/src/com/vaadin/tests/push/EnableDisablePush.java index 50dab43667..ac37e75fea 100644 --- a/uitest/src/com/vaadin/tests/push/EnableDisablePush.java +++ b/uitest/src/com/vaadin/tests/push/EnableDisablePush.java @@ -1,74 +1,19 @@ package com.vaadin.tests.push; -import static org.junit.Assert.assertEquals; - import java.util.Date; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.TimeUnit; -import org.junit.Test; -import org.openqa.selenium.WebElement; - import com.vaadin.server.VaadinRequest; import com.vaadin.shared.communication.PushMode; import com.vaadin.tests.components.AbstractTestUI; -import com.vaadin.tests.tb3.MultiBrowserTest; import com.vaadin.tests.util.Log; import com.vaadin.ui.Button; import com.vaadin.ui.UIDetachedException; public class EnableDisablePush extends AbstractTestUI { - public static class EnableDisablePushTest extends MultiBrowserTest { - @Test - public void testEnablePushWhenUsingPolling() throws Exception { - openTestURL(); - - assertEquals("1. Push enabled", getLogRow(0)); - - getDisablePushButton().click(); - assertEquals("3. Push disabled", getLogRow(0)); - - getEnablePollButton().click(); - assertEquals("5. Poll enabled", getLogRow(0)); - - getEnablePushButton().click(); - assertEquals("7. Push enabled", getLogRow(0)); - - getDisablePollButton().click(); - assertEquals("9. Poll disabled", getLogRow(0)); - - getDisablePushButtonAndReenableFromBackground().click(); - Thread.sleep(2500); - assertEquals("16. Polling disabled, push enabled", getLogRow(0)); - - getDisablePushButton().click(); - assertEquals("18. Push disabled", getLogRow(0)); - } - - private WebElement getDisablePushButton() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]"); - } - - private WebElement getEnablePushButton() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VButton[0]"); - } - - private WebElement getDisablePollButton() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VButton[0]"); - } - - private WebElement getEnablePollButton() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[3]/VButton[0]"); - } - - private WebElement getDisablePushButtonAndReenableFromBackground() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[4]/VButton[0]"); - } - - } - private int c = 0; private Log log = new Log(15); diff --git a/uitest/src/com/vaadin/tests/push/EnableDisablePushTest.java b/uitest/src/com/vaadin/tests/push/EnableDisablePushTest.java new file mode 100644 index 0000000000..275b6d5b53 --- /dev/null +++ b/uitest/src/com/vaadin/tests/push/EnableDisablePushTest.java @@ -0,0 +1,72 @@ +/* + * 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.push; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.openqa.selenium.WebElement; + +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class EnableDisablePushTest extends MultiBrowserTest { + @Test + public void testEnablePushWhenUsingPolling() throws Exception { + openTestURL(); + + assertEquals("1. Push enabled", getLogRow(0)); + + getDisablePushButton().click(); + assertEquals("3. Push disabled", getLogRow(0)); + + getEnablePollButton().click(); + assertEquals("5. Poll enabled", getLogRow(0)); + + getEnablePushButton().click(); + assertEquals("7. Push enabled", getLogRow(0)); + + getDisablePollButton().click(); + assertEquals("9. Poll disabled", getLogRow(0)); + + getDisablePushButtonAndReenableFromBackground().click(); + Thread.sleep(2500); + assertEquals("16. Polling disabled, push enabled", getLogRow(0)); + + getDisablePushButton().click(); + assertEquals("18. Push disabled", getLogRow(0)); + } + + private WebElement getDisablePushButton() { + return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]"); + } + + private WebElement getEnablePushButton() { + return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VButton[0]"); + } + + private WebElement getDisablePollButton() { + return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VButton[0]"); + } + + private WebElement getEnablePollButton() { + return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[3]/VButton[0]"); + } + + private WebElement getDisablePushButtonAndReenableFromBackground() { + return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[4]/VButton[0]"); + } + +}
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/push/PushLargeData.java b/uitest/src/com/vaadin/tests/push/PushLargeData.java index 1a9bf16de6..3b72424b32 100644 --- a/uitest/src/com/vaadin/tests/push/PushLargeData.java +++ b/uitest/src/com/vaadin/tests/push/PushLargeData.java @@ -126,7 +126,9 @@ public abstract class PushLargeData extends AbstractTestUIWithLog { @Override public void run() { PushLargeData ui = (PushLargeData) UI.getCurrent(); - ui.getDataLabel().setValue( + // Using description as it is not rendered to the DOM + // immediately + ui.getDataLabel().setDescription( System.currentTimeMillis() + ": " + data); ui.log("Package " + idx + " pushed"); } diff --git a/uitest/src/com/vaadin/tests/push/PushReconnectTest.java b/uitest/src/com/vaadin/tests/push/PushReconnectTest.java new file mode 100644 index 0000000000..76a0b547da --- /dev/null +++ b/uitest/src/com/vaadin/tests/push/PushReconnectTest.java @@ -0,0 +1,164 @@ +/* + * 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.push; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.ui.ExpectedCondition; + +import com.vaadin.tests.tb3.MultiBrowserTestWithProxy; + +public abstract class PushReconnectTest extends MultiBrowserTestWithProxy { + + @Test + public void testShortDisconnect() throws Exception { + setDebug(true); + openTestURL(); + startTimer(); + waitUntilServerCounterChanges(); + disconnectProxy(); + Thread.sleep(1000); + connectProxy(); + waitUntilServerCounterChanges(); + } + + @Test + public void testUserActionWhileDisconnectedWithDelay() throws Exception { + setDebug(true); + openTestURL(); + startTimer(); + waitUntilServerCounterChanges(); + disconnectProxy(); + Assert.assertEquals(0, getClientCounter()); + getIncrementClientCounterButton().click(); + // No change while disconnected + Assert.assertEquals(0, getClientCounter()); + // Firefox sends extra onopen calls after a while, which breaks + // everything + Thread.sleep(10000); + connectProxy(); + waitUntilServerCounterChanges(); + // The change should have appeared when reconnected + Assert.assertEquals(1, getClientCounter()); + } + + @Test + public void testUserActionWhileDisconnected() throws Exception { + setDebug(true); + openTestURL(); + startTimer(); + waitUntilServerCounterChanges(); + disconnectProxy(); + Assert.assertEquals(0, getClientCounter()); + getIncrementClientCounterButton().click(); + // No change while disconnected + Assert.assertEquals(0, getClientCounter()); + Thread.sleep(1000); + connectProxy(); + waitUntilServerCounterChanges(); + // The change should have appeared when reconnected + Assert.assertEquals(1, getClientCounter()); + + // IE has problems with another reconnect + disconnectProxy(); + getIncrementClientCounterButton().click(); + Assert.assertEquals(1, getClientCounter()); + Thread.sleep(1000); + connectProxy(); + waitUntilServerCounterChanges(); + Assert.assertEquals(2, getClientCounter()); + } + + @Test + public void testLongDisconnect() throws Exception { + setDebug(true); + openTestURL(); + startTimer(); + waitUntilServerCounterChanges(); + disconnectProxy(); + Thread.sleep(12000); + connectProxy(); + waitUntilServerCounterChanges(); + } + + @Test + public void testReallyLongDisconnect() throws Exception { + setDebug(true); + openTestURL(); + startTimer(); + waitUntilServerCounterChanges(); + disconnectProxy(); + Thread.sleep(120000); + connectProxy(); + waitUntilServerCounterChanges(); + } + + @Test + public void testMultipleDisconnects() throws Exception { + setDebug(true); + openTestURL(); + startTimer(); + waitUntilServerCounterChanges(); + for (int i = 0; i < 5; i++) { + disconnectProxy(); + Thread.sleep(1000); + connectProxy(); + waitUntilServerCounterChanges(); + } + } + + @Test + public void testMultipleQuickReconnects() throws Exception { + setDebug(true); + openTestURL(); + startTimer(); + waitUntilServerCounterChanges(); + for (int i = 0; i < 50; i++) { + disconnectProxy(); + Thread.sleep(100); + connectProxy(); + Thread.sleep(100); + } + waitUntilServerCounterChanges(); + waitUntilServerCounterChanges(); + } + + private int getClientCounter() { + return BasicPushTest.getClientCounter(this); + } + + private WebElement getIncrementClientCounterButton() { + return BasicPushTest.getIncrementButton(this); + } + + private void waitUntilServerCounterChanges() { + final int counter = BasicPushTest.getServerCounter(this); + waitUntil(new ExpectedCondition<Boolean>() { + + @Override + public Boolean apply(WebDriver input) { + return BasicPushTest.getServerCounter(PushReconnectTest.this) > counter; + } + }, 30); + } + + private void startTimer() { + BasicPushTest.getServerCounterStartButton(this).click(); + } + +} diff --git a/uitest/src/com/vaadin/tests/push/StreamingReconnectTest.java b/uitest/src/com/vaadin/tests/push/StreamingReconnectTest.java new file mode 100755 index 0000000000..24dfdd8ba1 --- /dev/null +++ b/uitest/src/com/vaadin/tests/push/StreamingReconnectTest.java @@ -0,0 +1,25 @@ +/* + * 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.push; + +public class StreamingReconnectTest extends PushReconnectTest { + + @Override + protected Class<?> getUIClass() { + return BasicPushStreaming.class; + } + +} diff --git a/uitest/src/com/vaadin/tests/push/WebsocketReconnectTest.java b/uitest/src/com/vaadin/tests/push/WebsocketReconnectTest.java new file mode 100644 index 0000000000..075a18c0e7 --- /dev/null +++ b/uitest/src/com/vaadin/tests/push/WebsocketReconnectTest.java @@ -0,0 +1,36 @@ +/* + * 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.push; + +import java.util.List; + +import org.openqa.selenium.remote.DesiredCapabilities; + +import com.vaadin.tests.tb3.WebsocketTest; + +public class WebsocketReconnectTest extends PushReconnectTest { + + @Override + public List<DesiredCapabilities> getBrowsersToTest() { + return WebsocketTest.getWebsocketBrowsers(); + } + + @Override + protected Class<?> getUIClass() { + return BasicPushWebsocket.class; + } + +} diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java index 218c532beb..d4eed99f19 100644 --- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java @@ -19,7 +19,6 @@ package com.vaadin.tests.tb3; import java.net.URL; import java.util.Collections; import java.util.List; -import java.util.logging.Logger; import org.junit.After; import org.junit.Before; @@ -197,7 +196,7 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { * * @return The port teh test is running on, by default 8888 */ - protected abstract String getDeploymentPort(); + protected abstract int getDeploymentPort(); /** * Produces a collection of browsers to run the test on. This method is @@ -306,18 +305,31 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { } /** - * Waits a short while for the given condition to become true. Use e.g. as + * Waits up to 10s for the given condition to become true. Use e.g. as * {@link #waitUntil(ExpectedConditions.textToBePresentInElement(by, text))} * * @param condition * the condition to wait for to become true */ protected void waitUntil(ExpectedCondition<Boolean> condition) { - new WebDriverWait(driver, 10).until(condition); + waitUntil(condition, 10); } /** - * Waits a short while for the given condition to become false. Use e.g. as + * Waits the given number of seconds for the given condition to become true. + * Use e.g. as {@link + * #waitUntil(ExpectedConditions.textToBePresentInElement(by, text))} + * + * @param condition + * the condition to wait for to become true + */ + protected void waitUntil(ExpectedCondition<Boolean> condition, + long timeoutInSeconds) { + new WebDriverWait(driver, timeoutInSeconds).until(condition); + } + + /** + * Waits up to 10s for the given condition to become false. Use e.g. as * {@link #waitUntilNot(ExpectedConditions.textToBePresentInElement(by, * text))} * @@ -325,7 +337,20 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { * the condition to wait for to become false */ protected void waitUntilNot(ExpectedCondition<Boolean> condition) { - new WebDriverWait(driver, 10).until(ExpectedConditions.not(condition)); + waitUntilNot(condition, 10); + } + + /** + * Waits the given number of seconds for the given condition to become + * false. Use e.g. as {@link + * #waitUntilNot(ExpectedConditions.textToBePresentInElement(by, text))} + * + * @param condition + * the condition to wait for to become false + */ + protected void waitUntilNot(ExpectedCondition<Boolean> condition, + long timeoutInSeconds) { + waitUntil(ExpectedConditions.not(condition), timeoutInSeconds); } protected void waitForElementToBePresent(By by) { @@ -481,14 +506,6 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { } } catch (Exception e) { } - Class<?> enclosingClass = getClass().getEnclosingClass(); - if (enclosingClass != null) { - if (UI.class.isAssignableFrom(enclosingClass)) { - Logger.getLogger(getClass().getName()) - .severe("Test is an static inner class to the UI. This will no longer be supported in the future. The test should be named UIClassTest and reside in the same package as the UI"); - return enclosingClass; - } - } throw new RuntimeException( "Could not determine UI class. Ensure the test is named UIClassTest and is in the same package as the UIClass"); } @@ -650,6 +667,7 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { */ public static DesiredCapabilities safari(int version) { DesiredCapabilities c = DesiredCapabilities.safari(); + c.setPlatform(Platform.MAC); c.setVersion("" + version); return c; } diff --git a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java index 040d0156a3..e8a974343b 100644 --- a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java +++ b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java @@ -40,7 +40,7 @@ import org.openqa.selenium.remote.DesiredCapabilities; */ public abstract class MultiBrowserTest extends PrivateTB3Configuration { - public static final int TESTED_SAFARI_VERSION = 6; + public static final int TESTED_SAFARI_VERSION = 7; public static final int TESTED_CHROME_VERSION = 29; public static final int TESTED_FIREFOX_VERSION = 24; @@ -52,7 +52,7 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration { allBrowsers.add(BrowserUtil.ie(11)); allBrowsers.add(BrowserUtil.firefox(TESTED_FIREFOX_VERSION)); // Uncomment once we have the capability to run on Safari 6 - // allBrowsers.add(safari(TESTED_SAFARI_VERSION)); + // allBrowsers.add(BrowserUtil.safari(TESTED_SAFARI_VERSION)); allBrowsers.add(BrowserUtil.chrome(TESTED_CHROME_VERSION)); // Re-enable this when it is possible to run on a modern Opera version // (15+) diff --git a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java new file mode 100755 index 0000000000..0bb76889a0 --- /dev/null +++ b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java @@ -0,0 +1,106 @@ +/* + * 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.tb3; + +import java.io.File; +import java.util.concurrent.atomic.AtomicInteger; + +import org.junit.After; +import org.junit.Before; + +import com.jcraft.jsch.JSch; +import com.jcraft.jsch.JSchException; +import com.jcraft.jsch.Session; + +public abstract class MultiBrowserTestWithProxy extends MultiBrowserTest { + + private static AtomicInteger availablePort = new AtomicInteger(2000); + private Session proxySession; + private Integer proxyPort = null; + private JSch jsch; + private static String sshDir = System.getProperty("user.home") + "/.ssh/"; + private String[] publicKeys = new String[] { + System.getProperty("sshkey.file"), sshDir + "id_rsa", + sshDir + "id_dsa", sshDir + "id_rsa2" }; + + @Before + public void setupInitialProxy() throws JSchException { + connectProxy(); + } + + @After + public void teardownProxy() { + disconnectProxy(); + } + + protected Integer getProxyPort() { + if (proxyPort == null) { + // Assumes we can use any port >= 2000 + proxyPort = availablePort.addAndGet(1); + } + return proxyPort; + } + + /** + * Disconnects the proxy if active + */ + protected void disconnectProxy() { + if (proxySession == null) { + return; + } + proxySession.disconnect(); + proxySession = null; + } + + /** + * Ensure the proxy is active. Does nothing if the proxy is already active. + */ + protected void connectProxy() throws JSchException { + if (proxySession != null) { + return; + } + + createProxy(getProxyPort()); + } + + private void createProxy(int proxyPort) throws JSchException { + if (jsch == null) { + jsch = new JSch(); + + String keyFile = null; + for (String publicKey : publicKeys) { + if (publicKey != null) { + if (new File(publicKey).exists()) { + keyFile = publicKey; + break; + } + } + } + jsch.addIdentity(keyFile); + } + proxySession = jsch.getSession("localhost"); + proxySession.setConfig("StrictHostKeyChecking", "no"); + proxySession.setPortForwardingL("0.0.0.0", proxyPort, + super.getDeploymentHostname(), super.getDeploymentPort()); + proxySession.connect(); + } + + @Override + protected String getBaseURL() { + return "http://" + getDeploymentHostname() + ":" + getProxyPort(); + } + +} diff --git a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java index a2922af28f..caa35732d6 100644 --- a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java +++ b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java @@ -90,11 +90,12 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test { } @Override - protected String getDeploymentPort() { - String port = getProperty(PORT_PROPERTY); + protected int getDeploymentPort() { + String portString = getProperty(PORT_PROPERTY); - if (port == null || "".equals(port)) { - port = "8888"; + int port = 8888; + if (portString != null && !"".equals(portString)) { + port = Integer.parseInt(portString); } return port; diff --git a/uitest/vaadin-server.xml b/uitest/vaadin-server.xml index 4e84a6f238..5e9090a536 100644 --- a/uitest/vaadin-server.xml +++ b/uitest/vaadin-server.xml @@ -8,7 +8,7 @@ <ivy:resolve log="download-only" file="${dir}/ivy.xml" /> <ivy:cachepath pathid="classpath.jetty" conf="jetty-run" /> - <java classname="org.mortbay.jetty.runner.Runner" fork="yes" output="${vaadin.basedir}/result/jetty.java.out" resultproperty="resultCode"> + <java classname="org.mortbay.jetty.runner.Runner" fork="yes" output="${vaadin.basedir}/result/jetty.java.out" resultproperty="resultCode" maxmemory="1024m"> <arg value="--port" /> <arg value="8888" /> <arg value="--out" /> |