diff options
Diffstat (limited to 'uitest/src/com')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/treetable/MinimalWidthColumns.java | 44 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/treetable/MinimalWidthColumnsTest.java | 31 |
2 files changed, 75 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/treetable/MinimalWidthColumns.java b/uitest/src/com/vaadin/tests/components/treetable/MinimalWidthColumns.java new file mode 100644 index 0000000000..c4679f739b --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/treetable/MinimalWidthColumns.java @@ -0,0 +1,44 @@ +package com.vaadin.tests.components.treetable; + +import com.vaadin.annotations.Theme; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.TreeTable; + +@Theme("valo") +public class MinimalWidthColumns extends AbstractTestUI { + + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. + * VaadinRequest) + */ + @Override + protected void setup(VaadinRequest request) { + TreeTable tt = new TreeTable(); + tt.addContainerProperty("Foo", String.class, ""); + tt.addContainerProperty("Bar", String.class, ""); + + Object item1 = tt.addItem(new Object[] { "f", "Bar" }, null); + Object item2 = tt.addItem(new Object[] { "Foo2", "Bar2" }, null); + + tt.setParent(item2, item1); + + tt.setColumnWidth("Foo", 0); + tt.setColumnWidth("Bar", 50); + tt.setWidth("300px"); + addComponent(tt); + } + + @Override + protected Integer getTicketNumber() { + return Integer.valueOf(15118); + } + + @Override + protected String getTestDescription() { + return "There should be no 1px discrepancy between vertical borders in headers and rows"; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/treetable/MinimalWidthColumnsTest.java b/uitest/src/com/vaadin/tests/components/treetable/MinimalWidthColumnsTest.java new file mode 100644 index 0000000000..46c2f397b6 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/treetable/MinimalWidthColumnsTest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2000-2014 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.treetable; + +import org.junit.Test; + +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class MinimalWidthColumnsTest extends MultiBrowserTest { + + @Test + public void testFor1pxDifference() throws Exception { + openTestURL(); + sleep(500); + compareScreen("onepixdifference"); + } + +} |