diff options
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/themes/valo/FormLayoutInsideTable.java | 33 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/themes/valo/FormLayoutInsideTableTest.java | 26 |
2 files changed, 59 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/themes/valo/FormLayoutInsideTable.java b/uitest/src/com/vaadin/tests/themes/valo/FormLayoutInsideTable.java new file mode 100644 index 0000000000..1d7ba7eefb --- /dev/null +++ b/uitest/src/com/vaadin/tests/themes/valo/FormLayoutInsideTable.java @@ -0,0 +1,33 @@ +package com.vaadin.tests.themes.valo; + +import com.vaadin.annotations.Theme; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.FormLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.Table; +import com.vaadin.ui.themes.ValoTheme; + +@Theme(ValoTheme.THEME_NAME) +public class FormLayoutInsideTable extends AbstractTestUI { + @Override + protected void setup(VaadinRequest request) { + final Table table = new Table(); + + table.addGeneratedColumn("data", new Table.ColumnGenerator() { + private static final long serialVersionUID = 1L; + + @Override + public Object generateCell(Table source, Object itemId, Object columnId) { + FormLayout layout = new FormLayout(); + layout.addComponent(new Label("Line 1 " + itemId)); + layout.addComponent(new Label("Line 2 " + itemId)); + + return layout; + } + }); + + table.setSizeFull(); + table.addItem("abc0"); + addComponent(table); + }} diff --git a/uitest/src/com/vaadin/tests/themes/valo/FormLayoutInsideTableTest.java b/uitest/src/com/vaadin/tests/themes/valo/FormLayoutInsideTableTest.java new file mode 100644 index 0000000000..2a1664fbcf --- /dev/null +++ b/uitest/src/com/vaadin/tests/themes/valo/FormLayoutInsideTableTest.java @@ -0,0 +1,26 @@ +package com.vaadin.tests.themes.valo; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; + +import java.util.List; + +import org.junit.Test; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; + +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class FormLayoutInsideTableTest extends MultiBrowserTest { + @Test + public void nestedItemHasBorderTop() { + openTestURL(); + + List<WebElement> formLayoutRows = findElements(By.cssSelector("tr.v-formlayout-row")); + WebElement secondNestedRow = formLayoutRows.get(1); + + WebElement td = secondNestedRow.findElement(By.tagName("td")); + + assertThat(td.getCssValue("border-top-width"), is("1px")); + } +}
\ No newline at end of file |