diff options
author | Artur Signell <artur@vaadin.com> | 2013-02-22 16:23:49 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-02-22 16:24:06 +0200 |
commit | fbdc52551e258d938db2e230366ca0e21d35c5bc (patch) | |
tree | 640740bcb63c2757facc9f19748a65eb46b50174 /uitest/src/com | |
parent | d9a8a21a62b977e32b65bcf436bbd229c9b798f4 (diff) | |
parent | 7af5b3fceb75b6f505a9a6d0a843b788bb06d9a7 (diff) | |
download | vaadin-framework-fbdc52551e258d938db2e230366ca0e21d35c5bc.tar.gz vaadin-framework-fbdc52551e258d938db2e230366ca0e21d35c5bc.zip |
Merge remote-tracking branch 'origin/7.0'
Change-Id: Id48ccb3c400a78cddb8bb5c7bbcf2d65174e59d0
Diffstat (limited to 'uitest/src/com')
13 files changed, 596 insertions, 4 deletions
diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.html b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.html new file mode 100644 index 0000000000..01206b317c --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.html @@ -0,0 +1,37 @@ +<?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="http://localhost:8888/" /> +<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.absolutelayout.AbsoluteLayoutResizing?restartApplication</td> + <td></td> +</tr> +<tr> + <td>dragAndDrop</td> + <td>vaadin=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutResizing::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VSplitPanelVertical[0]/domChild[0]/domChild[1]/domChild[0]</td> + <td>0,294</td> +</tr> +<tr> + <td>dragAndDrop</td> + <td>vaadin=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutResizing::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VSplitPanelVertical[0]/VSplitPanelHorizontal[0]/domChild[0]/domChild[1]/domChild[0]</td> + <td>588,0</td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>resized</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.java b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.java new file mode 100644 index 0000000000..810a583ba5 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.java @@ -0,0 +1,44 @@ +package com.vaadin.tests.components.absolutelayout; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.AbsoluteLayout; +import com.vaadin.ui.HorizontalSplitPanel; +import com.vaadin.ui.TextArea; +import com.vaadin.ui.VerticalSplitPanel; + +public class AbsoluteLayoutResizing extends TestBase { + + @Override + protected void setup() { + getLayout().setSizeFull(); + + AbsoluteLayout al = new AbsoluteLayout(); + + TextArea ta = new TextArea(); + ta.setValue("When resizing the layout this text area should also get resized"); + ta.setSizeFull(); + al.addComponent(ta, "left: 10px; right: 10px; top: 10px; bottom: 10px;"); + + HorizontalSplitPanel horizPanel = new HorizontalSplitPanel(); + horizPanel.setSizeFull(); + horizPanel.setFirstComponent(al); + + VerticalSplitPanel vertPanel = new VerticalSplitPanel(); + vertPanel.setSizeFull(); + vertPanel.setFirstComponent(horizPanel); + + addComponent(vertPanel); + + } + + @Override + protected String getDescription() { + return "Absolute layout should correctly dynamically resize itself"; + } + + @Override + protected Integer getTicketNumber() { + return 10427; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderValueFromDataSource.html b/uitest/src/com/vaadin/tests/components/slider/SliderValueFromDataSource.html new file mode 100644 index 0000000000..8b5a7067e4 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/slider/SliderValueFromDataSource.html @@ -0,0 +1,32 @@ +<?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="http://localhost:8070/" /> +<title>SliderValueFromDataSource</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">SliderValueFromDataSource</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/SliderValueFromDataSource?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertAttribute</td> + <td>vaadin=runSliderValueFromDataSource::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VProgressIndicator[0]/domChild[0]/domChild[0]@style</td> + <td>regex:.*(width|WIDTH): 50%.*</td> +</tr> +<tr> + <td>assertAttribute</td> + <td>vaadin=runSliderValueFromDataSource::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VSlider[0]/domChild[2]/domChild[0]@style</td> + <td>regex:.*(margin-left|MARGIN-LEFT): 94px.*</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderValueFromDataSource.java b/uitest/src/com/vaadin/tests/components/slider/SliderValueFromDataSource.java new file mode 100644 index 0000000000..141dc5baf4 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/slider/SliderValueFromDataSource.java @@ -0,0 +1,59 @@ +package com.vaadin.tests.components.slider; + +import com.vaadin.data.Item; +import com.vaadin.data.util.BeanItem; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.ProgressIndicator; +import com.vaadin.ui.Slider; + +public class SliderValueFromDataSource extends AbstractTestUI { + + public static class TestBean { + + private double doubleValue = 10.0; + private float floatValue = 0.5f; + + public double getDoubleValue() { + return doubleValue; + } + + public void setDoubleValue(double doubleValue) { + this.doubleValue = doubleValue; + } + + public float getFloatValue() { + return floatValue; + } + + public void setFloatValue(float floatValue) { + this.floatValue = floatValue; + } + } + + @Override + protected void setup(VaadinRequest request) { + Item item = new BeanItem<TestBean>(new TestBean()); + + Slider slider = new Slider(0, 20); + slider.setWidth("200px"); + slider.setPropertyDataSource(item.getItemProperty("doubleValue")); + addComponent(slider); + + ProgressIndicator pi = new ProgressIndicator(); + pi.setPollingInterval(60 * 1000); + pi.setWidth("200px"); + pi.setPropertyDataSource(item.getItemProperty("floatValue")); + addComponent(pi); + } + + @Override + protected String getTestDescription() { + return "Slider and ProgressIndicator do not properly pass a value from data source to the client"; + } + + @Override + protected Integer getTicketNumber() { + return 10921; + } +} diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.html b/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.html new file mode 100644 index 0000000000..3086b66dfa --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.html @@ -0,0 +1,51 @@ +<?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="http://localhost:8888/" /> +<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.textfield.TextFieldMaxLengthRemovedFromDOM?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertAttribute</td> + <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldMaxLengthRemovedFromDOM::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTextField[0]@maxlength</td> + <td>11</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldMaxLengthRemovedFromDOM::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> + <td>118,13</td> +</tr> +<tr> + <td>assertAttribute</td> + <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldMaxLengthRemovedFromDOM::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTextField[0]@maxlength</td> + <td>11</td> +</tr> +<tr> + <td>type</td> + <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldMaxLengthRemovedFromDOM::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> + <td>hello</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldMaxLengthRemovedFromDOM::/VVerticalLayout[0]/domChild[0]</td> + <td>172,60</td> +</tr> +<tr> + <td>assertAttribute</td> + <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldMaxLengthRemovedFromDOM::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTextField[0]@maxlength</td> + <td>11</td> +</tr> +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.java b/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.java new file mode 100644 index 0000000000..28ff20c174 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/textfield/TextFieldMaxLengthRemovedFromDOM.java @@ -0,0 +1,37 @@ +package com.vaadin.tests.components.textfield; + +import com.vaadin.event.FieldEvents; +import com.vaadin.event.FieldEvents.FocusEvent; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.TextField; + +public class TextFieldMaxLengthRemovedFromDOM extends TestBase { + + @Override + protected void setup() { + final TextField tf = new TextField(); + tf.setMaxLength(11); + tf.setRequired(true); + tf.setImmediate(true); + addComponent(tf); + + tf.addFocusListener(new FieldEvents.FocusListener() { + + public void focus(FocusEvent event) { + // Resetting Max length should not remove maxlength attribute + tf.setMaxLength(11); + } + }); + } + + @Override + protected String getDescription() { + return "Maxlength attribute should not dissappear from the DOM when I focus the text field."; + } + + @Override + protected Integer getTicketNumber() { + return 9940; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.html b/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.html new file mode 100644 index 0000000000..cf08d8923d --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.html @@ -0,0 +1,31 @@ +<?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="http://localhost:8888/" /> +<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.textfield.TextFieldWithDataSourceAndInputPrompt?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertValue</td> + <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldWithDataSourceAndInputPrompt::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTextField[0]</td> + <td>Me is input prompt</td> +</tr> +<tr> + <td>assertValue</td> + <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldWithDataSourceAndInputPrompt::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VTextField[0]</td> + <td>Me is input prompt</td> +</tr> +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java b/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java new file mode 100644 index 0000000000..881aa11fbb --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java @@ -0,0 +1,63 @@ +/* + * Copyright 2012 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.components.textfield; + +import com.vaadin.data.util.BeanItem; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.TextField; + +public class TextFieldWithDataSourceAndInputPrompt extends AbstractTestUI { + public static class Pojo { + private String string; + + public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + } + + @Override + protected void setup(VaadinRequest request) { + TextField textField = new TextField("TextField with null value"); + textField.setInputPrompt("Me is input prompt"); + textField.setNullRepresentation(null); + textField.setValue(null); + addComponent(textField); + + TextField textField2 = new TextField( + "TextField with null data source value"); + textField2.setInputPrompt("Me is input prompt"); + textField2.setNullRepresentation(null); + BeanItem<Pojo> beanItem = new BeanItem<Pojo>(new Pojo()); + textField2.setPropertyDataSource(beanItem.getItemProperty("string")); + addComponent(textField2); + } + + @Override + protected String getTestDescription() { + return "Input prompt should be shown when data source provides null"; + } + + @Override + protected Integer getTicketNumber() { + return 11021; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollBarWithChildren.html b/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollBarWithChildren.html new file mode 100644 index 0000000000..611e7a5994 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollBarWithChildren.html @@ -0,0 +1,69 @@ +<?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>TreeTableExtraScrollbar</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">TreeTableExtraScrollbar</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.treetable.TreeTableExtraScrollbarWithChildren?restartApplication</td> + <td></td> +</tr> +<tr> + <td>mouseClick</td> + <td>button</td> + <td></td> +</tr> +<tr> + <td>pause</td> + <td>300</td> + <td></td> +</tr> +<!-- screenCapture should not have a horizontal scrollbar, and the columns should be the same width in body and headers --> +<tr> + <td>screenCapture</td> + <td></td> + <td>expanded</td> +</tr> +<tr> + <td>mouseClick</td> + <td>button</td> + <td></td> +</tr> +<tr> + <td>pause</td> + <td>300</td> + <td></td> +</tr> +<!-- screenCapture should not have a horizontal scrollbar, the columns should be back to original width in body and headers, and vertical scrollbar shouldn't have left an empty space --> +<tr> + <td>screenCapture</td> + <td></td> + <td>collapsed</td> +</tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.treetable.TreeTableExtraScrollbarWithChildren</td> + <td></td> +</tr> +<tr> + <td>pause</td> + <td>300</td> + <td></td> +</tr> +<!-- screenCapture should not have changed --> +<tr> + <td>screenCapture</td> + <td></td> + <td>refreshed</td> +</tr> +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java b/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java new file mode 100644 index 0000000000..cad33e242f --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java @@ -0,0 +1,92 @@ +package com.vaadin.tests.components.treetable; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.Notification; +import com.vaadin.ui.Table; +import com.vaadin.ui.TreeTable; + +public class TreeTableExtraScrollbarWithChildren extends TestBase { + + @Override + protected String getDescription() { + return "Arrow calculation should not cause a horizontal scrollbar" + + " if there is enough space for the final contents."; + } + + @Override + protected Integer getTicketNumber() { + return 10513; + } + + @Override + protected void setup() { + HorizontalLayout layout = new HorizontalLayout(); + layout.setWidth("300px"); + layout.setHeight("300px"); + + final TreeTable table = new TreeTable(); + table.setSizeFull(); + + table.addGeneratedColumn("parameterId", new HierarchyColumnGenerator()); + table.addGeneratedColumn("wordingTextId", new TypeColumnGenerator()); + table.addGeneratedColumn("parameterTypeId", new TypeColumnGenerator()); + + table.setColumnWidth("parameterId", 26); + + table.addItem(new TestObject("name 1", "value 1")); + table.addItem(new TestObject("name 2", "value 2")); + table.addItem(new TestObject("name 3", "value 3")); + table.addItem(new TestObject("name 4", "value 4")); + table.addItem(new TestObject("name 5", "value 5")); + final TestObject parent = new TestObject("name 6", "value 6"); + table.addItem(parent); + table.setFooterVisible(true); + for (int i = 1; i <= 10; ++i) { + TestObject child = new TestObject("name 6-" + i, "value 6-" + i); + table.addItem(child); + table.setParent(child, parent); + } + table.setVisibleColumns(new Object[] { "wordingTextId", "parameterId", + "parameterTypeId" }); + table.setColumnHeaders(new String[] { "", "", "" }); + table.setHierarchyColumn("parameterId"); + + layout.addComponent(table); + + Button button = new Button("Toggle"); + button.setId("button"); + button.addClickListener(new ClickListener() { + + public void buttonClick(ClickEvent event) { + table.setCollapsed(parent, !table.isCollapsed(parent)); + Notification.show("collapsed: " + table.isCollapsed(parent)); + } + }); + + addComponent(layout); + addComponent(button); + } + + private class HierarchyColumnGenerator implements Table.ColumnGenerator { + public Object generateCell(Table table, Object itemId, Object columnId) { + Label label = new Label("this should be mostly hidden"); + label.setSizeUndefined(); + return label; + } + } + + private class TypeColumnGenerator implements Table.ColumnGenerator { + public Object generateCell(Table table, Object itemId, Object columnId) { + if (itemId instanceof TestObject) { + return new Label(((TestObject) itemId).getValue()); + } + return null; + } + } + +} diff --git a/uitest/src/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.html b/uitest/src/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.html new file mode 100644 index 0000000000..03d8f34651 --- /dev/null +++ b/uitest/src/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.html @@ -0,0 +1,37 @@ +<?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.debug.HierarchyAfterAnalyzeLayouts?restartApplication&debug</td> + <td></td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestsdebugHierarchyAfterAnalyzeLayouts::Root/VDebugConsole[0]/FlowPanel[0]/HorizontalPanel[0]/domChild[0]/domChild[0]/domChild[3]/domChild[0]</td> + <td>18,9</td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Layouts analyzed on server, total top level problems: 0</td> + <td></td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestsdebugHierarchyAfterAnalyzeLayouts::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VLabel[0]</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.java b/uitest/src/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.java new file mode 100644 index 0000000000..6f55e050c0 --- /dev/null +++ b/uitest/src/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.java @@ -0,0 +1,40 @@ +/* + * 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.debug; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Label; + +public class HierarchyAfterAnalyzeLayouts extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + addComponent(new Label("This is a label")); + } + + @Override + protected String getTestDescription() { + return "The connector hierarchy should be in order after clicking AL in the debug console"; + } + + @Override + protected Integer getTicketNumber() { + return Integer.valueOf(11067); + } + +} diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java index ecca98b884..48ccd217ca 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java @@ -18,6 +18,7 @@ package com.vaadin.tests.minitutorials.v7a1; import com.vaadin.annotations.PreserveOnRefresh; import com.vaadin.server.VaadinRequest; +import com.vaadin.ui.CssLayout; import com.vaadin.ui.TextField; import com.vaadin.ui.UI; @@ -31,13 +32,12 @@ import com.vaadin.ui.UI; */ @PreserveOnRefresh public class CreatingPreserveState extends UI { - private static int windowCounter = 0; + private static int instanceCounter = 0; @Override public void init(VaadinRequest request) { - TextField tf = new TextField("Window #" + (++windowCounter)); + TextField tf = new TextField("Instance #" + (++instanceCounter)); tf.setImmediate(true); - setContent(tf); + setContent(new CssLayout(tf)); } - } |