aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-01-04 17:18:28 +0200
committerLeif Åstrand <leif@vaadin.com>2013-01-04 17:18:28 +0200
commitc322474415ed2fc546e763a2329fdd82a62b06ec (patch)
tree4d64885414f4a462284a03a6681690366d2df82f /uitest/src/com
parentfb68bd53035fdd9cf0448623d5f6867fe17bab64 (diff)
downloadvaadin-framework-c322474415ed2fc546e763a2329fdd82a62b06ec.tar.gz
vaadin-framework-c322474415ed2fc546e763a2329fdd82a62b06ec.zip
Don't include relative sizes in expand compensation (#10222)
Change-Id: I1b94a8ffbbe66e64a585e1d7729dae3af6d815b6
Diffstat (limited to 'uitest/src/com')
-rw-r--r--uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.html72
-rw-r--r--uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.java55
2 files changed, 127 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.html b/uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.html
new file mode 100644
index 0000000000..46252bc447
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.html
@@ -0,0 +1,72 @@
+<?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.orderedlayout.RelativeChildrenWithoutExpand?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsorderedlayoutRelativeChildrenWithoutExpand::/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentsorderedlayoutRelativeChildrenWithoutExpand::Root/VNotification[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsorderedlayoutRelativeChildrenWithoutExpand::/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentsorderedlayoutRelativeChildrenWithoutExpand::Root/VNotification[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsorderedlayoutRelativeChildrenWithoutExpand::/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentsorderedlayoutRelativeChildrenWithoutExpand::Root/VNotification[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsorderedlayoutRelativeChildrenWithoutExpand::/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentsorderedlayoutRelativeChildrenWithoutExpand::Root/VNotification[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsorderedlayoutRelativeChildrenWithoutExpand::/VVerticalLayout[0]/Slot[1]/VHorizontalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentsorderedlayoutRelativeChildrenWithoutExpand::Root/VNotification[0]</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.java b/uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.java
new file mode 100644
index 0000000000..a1ac1df307
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.java
@@ -0,0 +1,55 @@
+package com.vaadin.tests.components.orderedlayout;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalLayout;
+
+public class RelativeChildrenWithoutExpand extends AbstractTestUI {
+
+ private final String loremIpsum = "This is a label without expand but with relative width that shouldn't get any space at all. ";
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ final HorizontalLayout horizontalExpand = new HorizontalLayout();
+
+ VerticalLayout vl = new VerticalLayout();
+ vl.addComponent(new Label(getTestDescription()));
+ vl.setSizeFull();
+
+ // Replacing default AbstractTestUI content to get the right expansions
+ setContent(vl);
+
+ HorizontalLayout verticalExpand = new HorizontalLayout();
+ verticalExpand.addComponent(new Button("Add relative child",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ horizontalExpand.addComponent(new Label(loremIpsum), 0);
+ }
+ }));
+ vl.addComponent(verticalExpand);
+ vl.setExpandRatio(verticalExpand, 1);
+
+ horizontalExpand.setWidth("100%");
+ vl.addComponent(horizontalExpand);
+
+ Label lblExpandRatio1 = new Label(
+ "This is an expanding label that will get all of the normal space in the component.");
+ horizontalExpand.addComponent(lblExpandRatio1);
+ horizontalExpand.setExpandRatio(lblExpandRatio1, 1);
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "HorizontalLayout containing relatively sized components that are not expanded should not cause infinite layout loops when scrollbars appear. Add children until the entire space is filled up.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return Integer.valueOf(10222);
+ }
+} \ No newline at end of file