summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-10-08 13:32:59 +0300
committerVaadin Code Review <review@vaadin.com>2015-10-08 12:16:49 +0000
commit025f3b2b2581c64b86b93cda26305eaa7fffc8cc (patch)
treec0c0e5f50dd145070a4694ab6c2019fedbf493f9 /uitest
parent181b010139a5626e0e90cfcf9bfc1aa3710b18dd (diff)
downloadvaadin-framework-025f3b2b2581c64b86b93cda26305eaa7fffc8cc.tar.gz
vaadin-framework-025f3b2b2581c64b86b93cda26305eaa7fffc8cc.zip
Fix Checkbox event handling in Grid Editor (#19096)
This patch limits event preventDefault calls to happen only with Tab navigation. No other events are prevented by default anymore. Earlier implementation that prevented too many events was in patch for #16841 Change-Id: I78924d35c86b822295fdaf720b3e4540c43df5c0
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java b/uitest/src/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java
index 7b18053052..769fa52323 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java
+++ b/uitest/src/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java
@@ -23,6 +23,7 @@ import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
+import com.vaadin.testbench.elements.CheckBoxElement;
import com.vaadin.testbench.elements.DateFieldElement;
import com.vaadin.testbench.elements.GridElement;
import com.vaadin.testbench.elements.GridElement.GridCellElement;
@@ -72,4 +73,20 @@ public class BasicCrudGridEditorRowTest extends MultiBrowserTest {
hasCssClass(dateField, "v-datefield-error"));
}
+ @Test
+ public void testCheckboxInEditorWorks() {
+ GridCellElement ritaBirthdate = grid.getCell(2, 3);
+ // Open editor row
+ new Actions(getDriver()).doubleClick(ritaBirthdate).perform();
+
+ // Get CheckBox
+ GridEditorElement editor = grid.getEditor();
+ CheckBoxElement cb = editor.getField(5).wrap(CheckBoxElement.class);
+
+ // Check values
+ String value = cb.getValue();
+ cb.click(5, 5);
+ Assert.assertNotEquals("Checkbox value did not change", value,
+ cb.getValue());
+ }
}