diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2014-06-13 09:32:47 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-06-19 06:16:27 +0000 |
commit | 3e925629ae50281dcbf4af00b0bbe3cfa05164ae (patch) | |
tree | f70b94016e46f413cf293672f214ec13b6d0bf42 /uitest | |
parent | dd8cf12dde433198070f77d97d9220dd66a7e7d5 (diff) | |
download | vaadin-framework-3e925629ae50281dcbf4af00b0bbe3cfa05164ae.tar.gz vaadin-framework-3e925629ae50281dcbf4af00b0bbe3cfa05164ae.zip |
Convert MoveComponentsFromGridLayoutToInnerLayoutTest to TB4. (#8855)
Change-Id: I90079bad38a82d8a7d3b053daedc99e52633e027
Diffstat (limited to 'uitest')
3 files changed, 29 insertions, 44 deletions
diff --git a/uitest/src/com/vaadin/tests/components/gridlayout/MoveComponentFromGridLayoutToInnerLayout.html b/uitest/src/com/vaadin/tests/components/gridlayout/MoveComponentFromGridLayoutToInnerLayout.html deleted file mode 100644 index ed6d39f63d..0000000000 --- a/uitest/src/com/vaadin/tests/components/gridlayout/MoveComponentFromGridLayoutToInnerLayout.html +++ /dev/null @@ -1,37 +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>New Test</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">New Test</td></tr> -</thead><tbody> -<tr> - <td>open</td> - <td>/run/com.vaadin.tests.components.gridlayout.MoveComponentsFromGridLayoutToInnerLayout?restartApplication</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsgridlayoutMoveComponentsFromGridLayoutToInnerLayout::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td> - <td></td> -</tr> -<tr> - <td>click</td> - <td>vaadin=runcomvaadintestscomponentsgridlayoutMoveComponentsFromGridLayoutToInnerLayout::/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>buttons-with-captions</td> -</tr> - -</tbody></table> -</body> -</html> diff --git a/uitest/src/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayout.java b/uitest/src/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayout.java index 0106f2e218..4f5b29c91f 100644 --- a/uitest/src/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayout.java +++ b/uitest/src/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayout.java @@ -1,20 +1,19 @@ package com.vaadin.tests.components.gridlayout; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.tests.components.TestBase; -import com.vaadin.ui.Button; +import com.vaadin.ui.*; import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.ComponentContainer; -import com.vaadin.ui.GridLayout; -import com.vaadin.ui.VerticalLayout; -public class MoveComponentsFromGridLayoutToInnerLayout extends TestBase { +public class MoveComponentsFromGridLayoutToInnerLayout extends AbstractTestUI { protected Button testButton; private GridLayout gl; protected ComponentContainer vl; @Override - protected void setup() { + protected void setup(VaadinRequest request) { gl = new GridLayout(); gl.setWidth("200px"); gl.setHeight("200px"); @@ -31,6 +30,7 @@ public class MoveComponentsFromGridLayoutToInnerLayout extends TestBase { gl.addComponent(testButton); vl = new VerticalLayout(); + vl.addComponent(new Label("I'm inside the inner layout")); gl.addComponent(vl); addComponent(gl); @@ -48,7 +48,7 @@ public class MoveComponentsFromGridLayoutToInnerLayout extends TestBase { } @Override - protected String getDescription() { + protected String getTestDescription() { return "Click the first button to move it from an outer layout to an inner. Then click the second button to repaint the inner layout."; } diff --git a/uitest/src/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayoutTest.java b/uitest/src/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayoutTest.java new file mode 100644 index 0000000000..eb4888ea1a --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayoutTest.java @@ -0,0 +1,22 @@ +package com.vaadin.tests.components.gridlayout; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.tests.tb3.AbstractTB3Test; +import com.vaadin.tests.tb3.MultiBrowserTest; +import org.junit.Test; + +import java.io.IOException; + +import static org.junit.Assert.*; + +public class MoveComponentsFromGridLayoutToInnerLayoutTest extends MultiBrowserTest { + + @Test + public void buttonIsMovedInsideInnerLayout() throws IOException { + openTestURL(); + + $(ButtonElement.class).first().click(); + + compareScreen("buttonClicked"); + } +}
\ No newline at end of file |