diff options
author | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2013-05-10 13:38:48 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-05-14 13:35:13 +0000 |
commit | 1a6200e19b1e366383286dfa7074c4183d8dcfb9 (patch) | |
tree | a7fdaa044d554efd3f4e114bf75caed7bb5cfdd0 /uitest/src | |
parent | a52ceb96590333bbfcb7ddad4815c88c49ac97ab (diff) | |
download | vaadin-framework-1a6200e19b1e366383286dfa7074c4183d8dcfb9.tar.gz vaadin-framework-1a6200e19b1e366383286dfa7074c4183d8dcfb9.zip |
Merge #6880 test from 6.8; fix itself is not needed in Vaadin 7
svn changeset:25925/svn branch:6.8
svn changeset:25928/svn branch:6.8
Change-Id: I89e6f30d7d04f9511e26121f860f846bef7ec17d
Diffstat (limited to 'uitest/src')
2 files changed, 116 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.html b/uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.html new file mode 100644 index 0000000000..e98c8bd41c --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.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>DragAndDropWrapperInPanel</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">DragAndDropWrapperInPanel</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.draganddropwrapper.DragAndDropWrapperInPanel?restartApplication</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>no-scrollbars</td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsdraganddropwrapperDragAndDropWrapperInPanel::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>resized-no-scrollbars</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.java b/uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.java new file mode 100644 index 0000000000..6a680abdf0 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperInPanel.java @@ -0,0 +1,79 @@ +/* + * 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.draganddropwrapper; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Component; +import com.vaadin.ui.DragAndDropWrapper; +import com.vaadin.ui.Label; +import com.vaadin.ui.Panel; +import com.vaadin.ui.TextArea; + +public class DragAndDropWrapperInPanel extends TestBase { + + @Override + protected void setup() { + + addComponent(new Button("Click to resize", new Button.ClickListener() { + public void buttonClick(ClickEvent event) { + for (int i = 1; i < getLayout().getComponentCount(); ++i) { + Component c = getLayout().getComponent(i); + c.setWidth("400px"); + c.setHeight("200px"); + } + } + })); + + Component content; + + content = new Button("Undefined-sized Button"); + content.setSizeUndefined(); + addDnDPanel(content); + + content = new Label("Full-sized Label"); + content.setSizeFull(); + addDnDPanel(content); + + content = new TextArea(null, "200x100px TextArea"); + content.setWidth("200px"); + content.setHeight("100px"); + addDnDPanel(content); + } + + @Override + protected String getDescription() { + return "A full-sized DragAndDropWrapper causes scrollbars inside Panel"; + } + + @Override + protected Integer getTicketNumber() { + return 6880; + } + + private void addDnDPanel(Component content) { + Panel panel = new Panel(); + panel.setSizeUndefined(); + panel.setWidth("300px"); + panel.setHeight("150px"); + DragAndDropWrapper dndWrapper = new DragAndDropWrapper(content); + dndWrapper.setSizeFull(); + panel.setContent(dndWrapper); + addComponent(panel); + } +} |