summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2015-09-06 13:48:57 +0300
committerVaadin Code Review <review@vaadin.com>2015-11-17 14:44:21 +0000
commitbc7c4f780fd6f2843cc3910063bfcf6587b99627 (patch)
tree1c12fcc8bdf6f7b9cc20574eca0d1657e6f770d0 /uitest
parent66f297fe1ad372c2e8904710cce5e069ac61897f (diff)
downloadvaadin-framework-bc7c4f780fd6f2843cc3910063bfcf6587b99627.tar.gz
vaadin-framework-bc7c4f780fd6f2843cc3910063bfcf6587b99627.zip
Remove border on immediate child cells only on Valo. (#18787)
Change-Id: I87825ea46fbcea98b054d3dc2eb3fe80781a9d48
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/FormLayoutInsideTable.java33
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/FormLayoutInsideTableTest.java26
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