From bd0e0ead4918618b96a60b5b16d1e17da7535967 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 12 Oct 2010 08:35:38 +0000 Subject: [PATCH] Updated test to catch #5772 svn changeset:15513/svn branch:6.4 --- .../tests/components/table/FooterClick.html | 66 ++++++++++++++----- .../tests/components/table/FooterClick.java | 10 ++- 2 files changed, 60 insertions(+), 16 deletions(-) diff --git a/tests/src/com/vaadin/tests/components/table/FooterClick.html b/tests/src/com/vaadin/tests/components/table/FooterClick.html index b7d20ab5d3..fb3d004620 100644 --- a/tests/src/com/vaadin/tests/components/table/FooterClick.html +++ b/tests/src/com/vaadin/tests/components/table/FooterClick.html @@ -16,72 +16,108 @@ /run/com.vaadin.tests.components.table.FooterClick?restartApplication + mouseClick - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0] + vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0] 41,7 assertValue - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0] + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn col1 + + assertText + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0] + 1. Clicked on footer: col1 + + mouseClick - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0] + vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1] 69,12 assertValue - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0] + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn col2 + + assertText + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0] + 2. Clicked on footer: col2 + + mouseClick - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0] + vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2] 19,3 assertValue - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0] + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn col3 + + assertText + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0] + 3. Clicked on footer: col3 + mouseClick vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0] 30,9 + mouseClick - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0] - 56,7 + vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0] + 41,7 assertValue - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0] + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn col1 + + assertText + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0] + 4. Clicked on footer: col1 + + mouseClick - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0] - 29,7 + vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1] + 69,12 assertValue - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0] + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn col2 + + assertText + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0] + 5. Clicked on footer: col2 + + mouseClick - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0] - 33,6 + vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2] + 19,3 assertValue - vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0] + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn col3 + + assertText + vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0] + 6. Clicked on footer: col3 + diff --git a/tests/src/com/vaadin/tests/components/table/FooterClick.java b/tests/src/com/vaadin/tests/components/table/FooterClick.java index 363e18844b..b92d6ef362 100644 --- a/tests/src/com/vaadin/tests/components/table/FooterClick.java +++ b/tests/src/com/vaadin/tests/components/table/FooterClick.java @@ -4,6 +4,7 @@ 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.tests.util.Log; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.CheckBox; @@ -18,9 +19,12 @@ public class FooterClick extends TestBase { private final String COLUMN2_PROPERTY_ID = "col2"; private final String COLUMN3_PROPERTY_ID = "col3"; + private Log log = new Log(5); + @Override protected void setup() { final Table table = new Table(); + table.setDebugId("table"); table.setContainerDataSource(createContainer()); table.setWidth("400px"); table.setHeight("400px"); @@ -29,16 +33,18 @@ public class FooterClick extends TestBase { table.setColumnReorderingAllowed(true); table.setColumnFooter(COLUMN1_PROPERTY_ID, "fuu"); - table.setColumnFooter(COLUMN2_PROPERTY_ID, "bar"); + // table.setColumnFooter(COLUMN2_PROPERTY_ID, "bar"); table.setColumnFooter(COLUMN3_PROPERTY_ID, "fuubar"); final TextField columnField = new TextField( "ProperyId of clicked column"); + columnField.setDebugId("ClickedColumn"); // Add a footer click listener table.addListener(new Table.FooterClickListener() { public void footerClick(FooterClickEvent event) { columnField.setValue(event.getPropertyId()); + log.log("Clicked on footer: " + event.getPropertyId()); } }); @@ -67,6 +73,8 @@ public class FooterClick extends TestBase { addComponent(immediateCheckbox); addComponent(columnReorderingCheckbox); + addComponent(log); + addComponent(table); addComponent(columnField); } -- 2.39.5