From dee8a04d16f01ed062920913a251f0fd371c5b32 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Fri, 6 Mar 2015 15:51:56 +0200 Subject: [PATCH] Fix regression for Table selection and checkbox issue (#17064) Converts the old TB2 test for the issue to TB4 as well. Change-Id: I76a37d836a55102221aa63e75f7ab605769bc0b9 --- .../VAADIN/themes/base/table/table.scss | 6 ++++ .../table/SelectableEditableTest.java | 18 +++++++++++ .../components/table/SelectableEditable.html | 32 ------------------- 3 files changed, 24 insertions(+), 32 deletions(-) create mode 100644 uitest/src/com/vaadin/tests/components/table/SelectableEditableTest.java delete mode 100644 uitest/tb2/com/vaadin/tests/components/table/SelectableEditable.html diff --git a/WebContent/VAADIN/themes/base/table/table.scss b/WebContent/VAADIN/themes/base/table/table.scss index f500d2f12a..22ffdffa4d 100644 --- a/WebContent/VAADIN/themes/base/table/table.scss +++ b/WebContent/VAADIN/themes/base/table/table.scss @@ -247,6 +247,12 @@ .v-off { color: #ddd; } + +/* CheckBox and selection fix #9064 */ +.#{$primaryStyleName} .v-checkbox { + display: inline-block; +} + /************************************* * Drag'n'drop styles *************************************/ diff --git a/uitest/src/com/vaadin/tests/components/table/SelectableEditableTest.java b/uitest/src/com/vaadin/tests/components/table/SelectableEditableTest.java new file mode 100644 index 0000000000..8b5b54cfaa --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/table/SelectableEditableTest.java @@ -0,0 +1,18 @@ +package com.vaadin.tests.components.table; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.TableElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class SelectableEditableTest extends MultiBrowserTest { + @Test + public void testSelectFromCellWith() throws Exception { + openTestURL(); + TableElement table = $(TableElement.class).first(); + table.getCell(0, 1).click(70, 12); + Assert.assertTrue("Element does not have the 'v-selected' css class", + hasCssClass(table.getRow(0), "v-selected")); + } +} diff --git a/uitest/tb2/com/vaadin/tests/components/table/SelectableEditable.html b/uitest/tb2/com/vaadin/tests/components/table/SelectableEditable.html deleted file mode 100644 index 8d46523c40..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/table/SelectableEditable.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -SelectableEditable - - - - - - - - - - - - - - - - - - - - - - -
SelectableEditable
open/run/com.vaadin.tests.components.table.SelectableEditable?restartApplication
mouseClickvaadin=runcomvaadintestscomponentstableSelectableEditable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[1]/domChild[0]70,12
assertCSSClassvaadin=runcomvaadintestscomponentstableSelectableEditable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]v-selected
- - -- 2.39.5