From b26bec94b51103a0030658691f2669bfe9c44b1c Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 19 Oct 2009 11:09:44 +0000 Subject: [PATCH] Merged test case, reference images updates svn changeset:9244/svn branch:6.2 --- .../combobox/ComboBoxValueInput.html | 292 ++++++++++++++++++ .../combobox/ComboBoxValueInput.java | 4 + .../datefield/DateFieldReadOnly.html | 6 +- .../ColumnCollapsingAndColumnExpansion.html | 138 ++++++++- .../ColumnCollapsingAndColumnExpansion.java | 60 +++- .../components/tabsheet/TabsheetTooltip.html | 20 +- .../window/UndefinedWidthSubWindow.html | 57 +++- .../window/UndefinedWidthSubWindow.java | 40 ++- tests/test.xml | 2 +- 9 files changed, 588 insertions(+), 31 deletions(-) create mode 100644 src/com/vaadin/tests/components/combobox/ComboBoxValueInput.html diff --git a/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.html b/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.html new file mode 100644 index 0000000000..2aab40f13f --- /dev/null +++ b/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.html @@ -0,0 +1,292 @@ + + + + + + +ComboBoxValueInput + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ComboBoxValueInput
open/run/com.vaadin.tests.components.combobox.ComboBoxValueInput
screenCapture
waitForVaadin
clickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]
waitForVaadin
screenCapture
waitForVaadin
mouseClick//div[@id='VAADIN_COMBOBOX_OPTIONLIST']/div/div[2]/table/tbody/tr[3]/td58,6
waitForVaadin
mouseClickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]96,14
waitForVaadin
screenCapture
clickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[1]
waitForVaadin
screenCapture
mouseClick//div[@id='VAADIN_COMBOBOX_OPTIONLIST']/div/div[2]/table/tbody/tr[4]/td/span29,6
waitForVaadin
clickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[1]
waitForVaadin
screenCapture
mouseClick//div[@id='VAADIN_COMBOBOX_OPTIONLIST']/div/div[2]/table/tbody/tr[3]/td99,13
waitForVaadin
mouseClickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[1]
waitForVaadin
mouseClick//div[@id='VAADIN_COMBOBOX_OPTIONLIST']/div/div[2]/table/tbody/tr[1]/td97,14
waitForVaadin
mouseClickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[0]68,17
waitForVaadin
enterCharactervaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[0]value
waitForVaadin
pressSpecialKeyvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[0]down
waitForVaadin
pressSpecialKeyvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[0]down
waitForVaadin
pressSpecialKeyvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[0]down
waitForVaadin
pressSpecialKeyvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[0]enter
waitForVaadin
screenCapture
waitForVaadin
mouseClickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[0]76,17
waitForVaadin
mouseClickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VFilterSelect[0]/domChild[1]
waitForVaadin
mouseClick//div[@id='VAADIN_COMBOBOX_OPTIONLIST']/div/div[2]/table/tbody/tr[2]/td71,11
waitForVaadin
clickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VFilterSelect[0]/domChild[1]
waitForVaadin
screenCapture
mouseClick//div[@id='VAADIN_COMBOBOX_OPTIONLIST']/div/div[2]/table/tbody/tr[1]/td58,9
waitForVaadin
mouseClickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VFilterSelect[0]/domChild[0]73,12
waitForVaadin
mouseClickvaadin=runcomvaadintestscomponentscomboboxComboBoxValueInput::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VFilterSelect[0]/domChild[0]43,7
waitForVaadin
+ + diff --git a/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java b/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java index 21e2759ddf..c91a707859 100644 --- a/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java +++ b/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java @@ -31,6 +31,10 @@ public class ComboBoxValueInput extends TestBase { cb = getComboBox("A read-only combobox", true); cb.setReadOnly(true); addComponent(cb); + + cb = getComboBox("A combobox with filteringMode off", false); + cb.setFilteringMode(ComboBox.FILTERINGMODE_OFF); + } @Override diff --git a/src/com/vaadin/tests/components/datefield/DateFieldReadOnly.html b/src/com/vaadin/tests/components/datefield/DateFieldReadOnly.html index efc9983ab5..af711b9ab8 100644 --- a/src/com/vaadin/tests/components/datefield/DateFieldReadOnly.html +++ b/src/com/vaadin/tests/components/datefield/DateFieldReadOnly.html @@ -37,7 +37,7 @@ - click + mouseClick vaadin=runcomvaadintestscomponentsdatefieldDateFieldReadOnly::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPopupCalendar[0]/domChild[1] @@ -57,9 +57,9 @@ - clickAt + mouseClick vaadin=runcomvaadintestscomponentsdatefieldDateFieldReadOnly::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0] - 0,0 + waitForVaadin diff --git a/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.html b/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.html index 33509916f7..61aa100a36 100644 --- a/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.html +++ b/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.html @@ -21,10 +21,11 @@ + screenCapture - + col1-col2-col3-visible click @@ -36,6 +37,7 @@ + click //td[@id='gwt-uid-2']/span/div @@ -49,7 +51,141 @@ screenCapture + col2-hidden + + + waitForVaadin + + + + + mouseClick + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0] + 79,15 + + + waitForVaadin + + + + + enterCharacter + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0] + Col1 + + + waitForVaadin + + + + + mouseClick + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/domChild[0]/domChild[1] + 221,457 + + + waitForVaadin + + + + + + click + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0] + + + + waitForVaadin + + + + + screenCapture + + col1-col2-hidden + + + mouseClick + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0] + 55,14 + + + waitForVaadin + + + + + enterCharacter + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0] + Col2 + + + waitForVaadin + + + + + + click + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0] + + + + waitForVaadin + + + + + mouseClick + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0] + 70,16 + + + waitForVaadin + + + + + screenCapture + + col1-hidden + + + mouseClick + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0] + 45,19 + + + waitForVaadin + + + + + enterCharacter + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0] + Col1 + + + waitForVaadin + + + + + + click + vaadin=runcomvaadintestscomponentstableColumnCollapsingAndColumnExpansion::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0] + + + + waitForVaadin + + + + + + screenCapture + col1-col2-col3-visible-again diff --git a/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java b/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java index f3f04a1169..16a9d41b75 100644 --- a/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java +++ b/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java @@ -1,29 +1,73 @@ package com.vaadin.tests.components.table; import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Alignment; +import com.vaadin.ui.Button; +import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Table; +import com.vaadin.ui.TextField; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; public class ColumnCollapsingAndColumnExpansion extends TestBase { + private Table table; + @Override public void setup() { - Table t = new Table(); + table = new Table(); - t.addContainerProperty("Col1", String.class, null); - t.addContainerProperty("Col2", String.class, null); - t.addContainerProperty("Col3", String.class, null); - t.setColumnCollapsingAllowed(true); + table.addContainerProperty("Col1", String.class, null); + table.addContainerProperty("Col2", String.class, null); + table.addContainerProperty("Col3", String.class, null); + table.setColumnCollapsingAllowed(true); - t.setSizeFull(); + table.setSizeFull(); for (int y = 1; y < 5; y++) { - t.addItem(new Object[] { "cell " + 1 + "-" + y, + table.addItem(new Object[] { "cell " + 1 + "-" + y, "cell " + 2 + "-" + y, "cell " + 3 + "-" + y, }, new Object()); } - addComponent(t); + addComponent(table); + + HorizontalLayout hl = new HorizontalLayout(); + final TextField tf = new TextField("Column name"); + Button hide = new Button("Collapse", new ClickListener() { + + public void buttonClick(ClickEvent event) { + try { + table.setColumnCollapsed(tf.getValue(), true); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + }); + + Button show = new Button("Show", new ClickListener() { + + public void buttonClick(ClickEvent event) { + try { + table.setColumnCollapsed(tf.getValue(), false); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + }); + + hl.addComponent(tf); + hl.addComponent(hide); + hl.addComponent(show); + hl.setComponentAlignment(tf, Alignment.BOTTOM_LEFT); + hl.setComponentAlignment(hide, Alignment.BOTTOM_LEFT); + hl.setComponentAlignment(show, Alignment.BOTTOM_LEFT); + addComponent(hl); } diff --git a/src/com/vaadin/tests/components/tabsheet/TabsheetTooltip.html b/src/com/vaadin/tests/components/tabsheet/TabsheetTooltip.html index 08b7869587..c476374a70 100644 --- a/src/com/vaadin/tests/components/tabsheet/TabsheetTooltip.html +++ b/src/com/vaadin/tests/components/tabsheet/TabsheetTooltip.html @@ -3,7 +3,7 @@ - + TabsheetTooltip @@ -22,8 +22,8 @@ - verifyTextPresent - Tab




Tab 2





Label + screenCapture + @@ -37,13 +37,13 @@ - verifyTextPresent - Tab




Tab 2





Label

Another label, d'oh + mouseOver + vaadin=runcomvaadintestscomponentstabsheetTabsheetTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0] - mouseOver - vaadin=runcomvaadintestscomponentstabsheetTabsheetTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0] + pause + 1000 @@ -57,7 +57,7 @@ - click + mouseOver vaadin=runcomvaadintestscomponentstabsheetTabsheetTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0] @@ -67,8 +67,8 @@ - mouseOver - vaadin=runcomvaadintestscomponentstabsheetTabsheetTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0] + pause + 1000 diff --git a/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.html b/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.html index 51aabc7e8f..68bb3c5f2d 100644 --- a/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.html +++ b/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.html @@ -3,7 +3,7 @@ - + UndefinedWidthSubWindow @@ -24,7 +24,62 @@ screenCapture + add-button + + + waitForVaadin + + + + + click + vaadin=runcomvaadintestscomponentswindowUndefinedWidthSubWindow::/VWindow[0]/ScrollPanel[0]/VHorizontalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0] + + + + waitForVaadin + + + + + click + vaadin=runcomvaadintestscomponentswindowUndefinedWidthSubWindow::/VWindow[0]/ScrollPanel[0]/VHorizontalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0] + + + + waitForVaadin + + + + + screenCapture + + add+2 remove + + + click + vaadin=runcomvaadintestscomponentswindowUndefinedWidthSubWindow::/VWindow[0]/ScrollPanel[0]/VHorizontalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0] + + + + waitForVaadin + + + + + click + vaadin=runcomvaadintestscomponentswindowUndefinedWidthSubWindow::/VWindow[0]/ScrollPanel[0]/VHorizontalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0] + + + + waitForVaadin + + + + + screenCapture + add-button only diff --git a/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java b/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java index f29178a525..c8009c8431 100644 --- a/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java +++ b/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java @@ -2,12 +2,18 @@ package com.vaadin.tests.components.window; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Button; +import com.vaadin.ui.Component; +import com.vaadin.ui.ComponentContainer; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.TextField; import com.vaadin.ui.Window; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; public class UndefinedWidthSubWindow extends TestBase { + private Window autoWideWindow; + @Override protected String getDescription() { return "Two windows should be shown. The width of the one in the upper left corner should be adjusted according to the contents. The centered windows width should be set according to the caption and the second textfield should be clipped."; @@ -18,16 +24,37 @@ public class UndefinedWidthSubWindow extends TestBase { return null; } + private Component createRemoveButton() { + Button b = new Button("Remove"); + b.addListener(new ClickListener() { + + public void buttonClick(ClickEvent event) { + Button b = event.getButton(); + ComponentContainer cc = (ComponentContainer) b.getParent(); + cc.removeComponent(b); + } + }); + + return b; + } + @Override protected void setup() { - Window dialog = new Window("Dialog - width defined by contents", + autoWideWindow = new Window("Dialog - width defined by contents", new HorizontalLayout()); - dialog.getContent().setSizeUndefined(); - dialog.addComponent(new TextField("Field 1")); - dialog.addComponent(new TextField("Field 2")); - dialog.addComponent(new Button("Ok")); + autoWideWindow.getContent().setSizeUndefined(); + autoWideWindow.addComponent(new TextField("Field 1")); + autoWideWindow.addComponent(new TextField("Field 2")); + autoWideWindow.addComponent(new Button("Add", new ClickListener() { - getMainWindow().addWindow(dialog); + public void buttonClick(ClickEvent event) { + autoWideWindow.addComponent(createRemoveButton()); + + } + + })); + + getMainWindow().addWindow(autoWideWindow); Window dialog2 = new Window("Dialog - width defined by caption"); dialog2.addComponent(new TextField("Field 1")); @@ -40,5 +67,4 @@ public class UndefinedWidthSubWindow extends TestBase { dialog2.center(); getMainWindow().addWindow(dialog2); } - } diff --git a/tests/test.xml b/tests/test.xml index 6c1b3ca074..5a9d82914b 100644 --- a/tests/test.xml +++ b/tests/test.xml @@ -109,7 +109,7 @@ - + -- 2.39.5