From 3c75032f1d9cbd4a90413ed7089ed73329292069 Mon Sep 17 00:00:00 2001 From: John Alhroos Date: Wed, 27 Oct 2010 07:13:31 +0000 Subject: [PATCH] Test for #5797 svn changeset:15735/svn branch:6.4 --- .../DisabledTableKeyboardNavigation.html | 67 +++++++++++++++++++ .../DisabledTableKeyboardNavigation.java | 54 +++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 tests/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.html create mode 100644 tests/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.java diff --git a/tests/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.html b/tests/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.html new file mode 100644 index 0000000000..ce8fc3b406 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.html @@ -0,0 +1,67 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.components.table.DisabledTableKeyboardNavigation?restartApplication
screenCaptureADisabledTableWithoutASelection
mouseClickvaadin=vaadin648runcomvaadintestscomponentstableDisabledTableKeyboardNavigation::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[4]/domChild[1]/domChild[0]56,13
pressSpecialKeyvaadin=vaadin648runcomvaadintestscomponentstableDisabledTableKeyboardNavigation::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]down
pressSpecialKeyvaadin=vaadin648runcomvaadintestscomponentstableDisabledTableKeyboardNavigation::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]down
pressSpecialKeyvaadin=vaadin648runcomvaadintestscomponentstableDisabledTableKeyboardNavigation::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]down
pressSpecialKeyvaadin=vaadin648runcomvaadintestscomponentstableDisabledTableKeyboardNavigation::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]down
pressSpecialKeyvaadin=vaadin648runcomvaadintestscomponentstableDisabledTableKeyboardNavigation::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]down
pressSpecialKeyvaadin=vaadin648runcomvaadintestscomponentstableDisabledTableKeyboardNavigation::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]down
screenCaptureStillADisabledTableWithoutSelection
+ + diff --git a/tests/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.java b/tests/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.java new file mode 100644 index 0000000000..ec888c2699 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/table/DisabledTableKeyboardNavigation.java @@ -0,0 +1,54 @@ +package com.vaadin.tests.components.table; + +import com.vaadin.data.Container; +import com.vaadin.data.Item; +import com.vaadin.data.util.IndexedContainer; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Table; + +public class DisabledTableKeyboardNavigation extends TestBase { + + @Override + protected void setup() { + final Table table = new Table("Multiselectable table"); + + table.setContainerDataSource(createContainer()); + table.setImmediate(true); + table.setSelectable(true); + table.setMultiSelect(true); + table.setWidth("400px"); + table.setHeight("200px"); + + table.setEnabled(false); + + addComponent(table); + + } + + @Override + protected String getDescription() { + return "Once should not be able to focus or use a disabled table"; + } + + @Override + protected Integer getTicketNumber() { + return 5797; + } + + private Container createContainer() { + IndexedContainer container = new IndexedContainer(); + container.addContainerProperty("col1", String.class, ""); + container.addContainerProperty("col2", String.class, ""); + container.addContainerProperty("col3", String.class, ""); + + for (int i = 0; i < 100; i++) { + Item item = container.addItem("item " + i); + item.getItemProperty("col1").setValue("first" + i); + item.getItemProperty("col2").setValue("middle" + i); + item.getItemProperty("col3").setValue("last" + i); + } + + return container; + } + +} -- 2.39.5