diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-06-13 22:38:42 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2013-06-13 22:38:42 +0300 |
commit | faa693e33b24cb34e7811d94d5efe5605117af7f (patch) | |
tree | b0b54d989d5ec83416b77f01c9e63398786dd8a5 /uitest | |
parent | be274254b5e6f4dd9386d4a3dd994ec834147e8b (diff) | |
parent | 54ffbdb70746743f4754416911f726f8d556b3ed (diff) | |
download | vaadin-framework-faa693e33b24cb34e7811d94d5efe5605117af7f.tar.gz vaadin-framework-faa693e33b24cb34e7811d94d5efe5605117af7f.zip |
Merge changes from origin/7.1
da0a112 Merge changes from origin/7.0
6ba8938 Restore legacyPropertyToString value parsing logic (#11970)
d5c0ffa Fix NPE when converting null values (#11895)
2aa3096 Avoid string casing problems (#11970)
0f107f3 Update widgetset template (#12053)
eb64fda Add support for rem units (#11279)
5f66766 Using StringTokenizer instead of String.split() in AbstractComponent (#8759)
15b217d Handle push disconnections and reconnections more reliably (#11831, #11922)
47addab Adding isIOs and isAndroid to the WebBrowser wrapper around VBrowserDetails (#11168)
0aa5907 Do not write 404 as a response to all action/event requests (#12056)
55ebe13 Detach and attach when adding or removing the caption wrapper (#11708)
7830af2 Fix GridLayout resize after removing caption (#12011)
53e3a25 DebugWindow resize/move improved, fixes #11937 (also implements shift-resize and alt-move, improves bounds-check)
f2b2ce9 Updated to Smartsprites 0.2.10 (#12069)
29c9b60 SimpleTree styling changed for #12058
da8382d DebugWindow now remembers open tab/section, InfoSection fixed to support being opened at once, for #12058
4f5bcef Info tab is now tab 1, hierarchy tab 2
a089743 Consistently recover from disconnections in IE (#12073)
59103a9 Always notify parent of enable state changes (#12062)
997e9a9 Fixed test issue apparently caused by three levels of classes
54ffbdb Add missing license header
Change-Id: Ifba747964fa0d8265bb468ca555b84dadec9fa0a
Diffstat (limited to 'uitest')
9 files changed, 420 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.html b/uitest/src/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.html new file mode 100644 index 0000000000..0bdde03ec7 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.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="" /> +<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.abstractcomponent.RemSizeUnitTest?restartApplication&debug</td> + <td></td> +</tr> +<tr> + <td>assertElementHeight</td> + <td>vaadin=runcomvaadintestscomponentsabstractcomponentRemSizeUnitTest::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VLabel[0]</td> + <td>80</td> +</tr> +<tr> + <td>assertElementWidth</td> + <td>vaadin=runcomvaadintestscomponentsabstractcomponentRemSizeUnitTest::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VLabel[0]</td> + <td>168</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.java b/uitest/src/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.java new file mode 100644 index 0000000000..98c0538cd8 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.java @@ -0,0 +1,52 @@ +/* + * 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.components.abstractcomponent; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.server.WebBrowser; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Label; + +public class RemSizeUnitTest extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + Label label = new Label("My height is 10.5 x 5 rem"); + label.setHeight("5rem"); + label.setWidth(10.5f, Unit.REM); + + // Rem not supported in ie8, fake using pixels + WebBrowser webBrowser = getPage().getWebBrowser(); + if (webBrowser.isIE() && webBrowser.getBrowserMajorVersion() == 8) { + label.setHeight("80px"); + label.setWidth("168px"); + } + + addComponent(label); + } + + @Override + protected String getTestDescription() { + return "Tests that REM units are properly applied to the DOM"; + } + + @Override + protected Integer getTicketNumber() { + return Integer.valueOf(11279); + } + +} diff --git a/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html b/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html new file mode 100644 index 0000000000..87bf0edb49 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html @@ -0,0 +1,94 @@ +<?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.formlayout.CaptionEnableDisable?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[1]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[2]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VCheckBox[0]</td> + <td>v-disabled</td> +</tr> +<!--Enable--> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[1]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[2]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VCheckBox[0]</td> + <td>v-disabled</td> +</tr> +<!--Disable--> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[1]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[2]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VCheckBox[0]</td> + <td>v-disabled</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.java b/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.java new file mode 100644 index 0000000000..ce9067df29 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.java @@ -0,0 +1,61 @@ +package com.vaadin.tests.components.formlayout; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.CheckBox; +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.FormLayout; +import com.vaadin.ui.NativeSelect; +import com.vaadin.ui.TextField; + +public class CaptionEnableDisable extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + setContent(createFormLayout()); + + } + + public FormLayout createFormLayout() { + FormLayout layout = new FormLayout(); + final TextField textField = new TextField("TextField"); + textField.setEnabled(false); + layout.addComponent(textField); + + final ComboBox combobox = new ComboBox("Combobox"); + combobox.setEnabled(false); + layout.addComponent(combobox); + + final NativeSelect nativeSelect = new NativeSelect("NativeSelect"); + nativeSelect.setEnabled(false); + layout.addComponent(nativeSelect); + + final CheckBox checkBox = new CheckBox("Checkbox"); + checkBox.setEnabled(false); + layout.addComponent(checkBox); + + layout.addComponent(new Button("Toggle components enabled", + new Button.ClickListener() { + @Override + public void buttonClick(Button.ClickEvent event) { + combobox.setEnabled(!combobox.isEnabled()); + textField.setEnabled(!textField.isEnabled()); + checkBox.setEnabled(!checkBox.isEnabled()); + nativeSelect.setEnabled(!nativeSelect.isEnabled()); + } + })); + return layout; + } + + @Override + protected String getTestDescription() { + return ""; + } + + @Override + protected Integer getTicketNumber() { + return 12062; + } + +}
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.html b/uitest/src/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.html new file mode 100644 index 0000000000..0ad58823be --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.html @@ -0,0 +1,42 @@ +<?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.LayoutAfterHidingError?restartApplication</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsgridlayoutLayoutAfterHidingError::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VPanel[0]/VGridLayout[0]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>withError</td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsgridlayoutLayoutAfterHidingError::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VPanel[0]/VGridLayout[0]/VButton[1]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>withoutError</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.java b/uitest/src/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.java new file mode 100644 index 0000000000..dc04e23f02 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.java @@ -0,0 +1,76 @@ +/* + * 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.components.gridlayout; + +import com.vaadin.server.UserError; +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.Button.ClickListener; +import com.vaadin.ui.DateField; +import com.vaadin.ui.GridLayout; +import com.vaadin.ui.Panel; + +public class LayoutAfterHidingError extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + final Panel panel = new Panel(); + panel.setWidth("300px"); + addComponent(panel); + + GridLayout gl = new GridLayout(); + gl.setWidth("100%"); + panel.setContent(gl); + + final DateField df = new DateField(); + df.setWidth("100%"); + gl.addComponent(df); + + Button err = new Button("Set error"); + err.addClickListener(new ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + df.setComponentError(new UserError("foo")); + } + }); + gl.addComponent(err); + + err = new Button("Clear error"); + err.addClickListener(new ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + df.setComponentError(null); + } + }); + gl.addComponent(err); + } + + @Override + protected String getTestDescription() { + return "Setting an error icon for a component in GridLayout and then removing it should properly re-size the component"; + } + + @Override + protected Integer getTicketNumber() { + return 12011; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.html b/uitest/src/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.html new file mode 100644 index 0000000000..d2ca843cf5 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.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: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>/statictestfiles/PopupViewInEmbeddedApplication.html</td> + <td></td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=helloworld::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPopupView[0]</td> + <td>28,16</td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>popup-on-link</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.java b/uitest/src/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.java new file mode 100644 index 0000000000..d19f98124e --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.java @@ -0,0 +1,30 @@ +package com.vaadin.tests.components.popupview; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Label; +import com.vaadin.ui.PopupView; + +/* + * Used by PopupViewInEmbedded.html + */ +public class PopupViewInEmbeddedApplication extends TestBase { + + @Override + protected void setup() { + PopupView pop = new PopupView("Click me!", new Label( + "I popped up, woohoo!")); + addComponent(pop); + } + + @Override + protected String getDescription() { + return "Clicking on the popup link should pop up the popup on top of the link," + + " even though the application has been embedded inside a div."; + } + + @Override + protected Integer getTicketNumber() { + return 7110; + } + +} diff --git a/uitest/src/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.html b/uitest/src/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.html index a0ebb3bf27..f5b7e0a1df 100644 --- a/uitest/src/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.html +++ b/uitest/src/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.html @@ -18,7 +18,7 @@ </tr> <tr> <td>click</td> - <td>vaadin=runcomvaadintestsdebugHierarchyAfterAnalyzeLayouts::Root/VDebugWindow[0]/FlowPanel[0]/FlowPanel[0]/FlowPanel[0]/domChild[1]</td> + <td>vaadin=runcomvaadintestsdebugHierarchyAfterAnalyzeLayouts::Root/VDebugWindow[0]/FlowPanel[0]/FlowPanel[0]/FlowPanel[0]/DebugButton[2]</td> <td>18,9</td> </tr> <tr> |