]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix regression for Table selection and checkbox issue (#17064)
authorTeemu Suo-Anttila <teemusa@vaadin.com>
Fri, 6 Mar 2015 13:51:56 +0000 (15:51 +0200)
committerVaadin Code Review <review@vaadin.com>
Mon, 9 Mar 2015 09:06:59 +0000 (09:06 +0000)
Converts the old TB2 test for the issue to TB4 as well.

Change-Id: I76a37d836a55102221aa63e75f7ab605769bc0b9

WebContent/VAADIN/themes/base/table/table.scss
uitest/src/com/vaadin/tests/components/table/SelectableEditableTest.java [new file with mode: 0644]
uitest/tb2/com/vaadin/tests/components/table/SelectableEditable.html [deleted file]

index f500d2f12af84e571b1f7b36454dfe876170e57e..22ffdffa4de0d8a8f4768f7645ebd5bfe3c23fe3 100644 (file)
 .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 (file)
index 0000000..8b5b54c
--- /dev/null
@@ -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 (file)
index 8d46523..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?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>SelectableEditable</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">SelectableEditable</td></tr>
-</thead><tbody>
-<tr>
-       <td>open</td>
-       <td>/run/com.vaadin.tests.components.table.SelectableEditable?restartApplication</td>
-       <td></td>
-</tr>
-<tr>
-       <td>mouseClick</td>
-       <td>vaadin=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]</td>
-       <td>70,12</td>
-</tr>
-<tr>
-       <td>assertCSSClass</td>
-       <td>vaadin=runcomvaadintestscomponentstableSelectableEditable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]</td>
-       <td>v-selected</td>
-</tr>
-
-</tbody></table>
-</body>
-</html>