From b3a19fc9e8ff957c4624b78e8054e9dbfcf7db47 Mon Sep 17 00:00:00 2001 From: Automerge Date: Wed, 15 Feb 2012 14:16:44 +0000 Subject: [merge from 6.7] #4353 ComboBox.removeAllItems did not remove selected icon svn changeset:23030/svn branch:6.8 --- .../components/combobox/RemovalOfSelectedIcon.html | 42 +++++++++++++++++ .../components/combobox/RemovalOfSelectedIcon.java | 53 ++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html create mode 100644 tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java (limited to 'tests/testbench') diff --git a/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html b/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html new file mode 100644 index 0000000000..fc3862ebb7 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html @@ -0,0 +1,42 @@ + + + + + + +RemovalOfSelectedIcon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RemovalOfSelectedIcon
open/run/com.vaadin.tests.components.combobox.RemovalOfSelectedIcon?restartApplication
mouseClickvaadin=runcomvaadintestscomponentscomboboxRemovalOfSelectedIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[1]9,11
mouseClickvaadin=runcomvaadintestscomponentscomboboxRemovalOfSelectedIcon::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1131,3
clickvaadin=runcomvaadintestscomponentscomboboxRemovalOfSelectedIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]
screenCapturecombobox-empty-and-widths-match
+ + diff --git a/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java b/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java new file mode 100644 index 0000000000..a79b85ece4 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java @@ -0,0 +1,53 @@ +package com.vaadin.tests.components.combobox; + +import com.vaadin.terminal.ThemeResource; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.ComboBox; + +@SuppressWarnings("serial") +public class RemovalOfSelectedIcon extends TestBase { + + @Override + protected void setup() { + + final ComboBox cb1 = createComboBox("Don't touch this combobox"); + addComponent(cb1); + + final ComboBox cb2 = createComboBox("Select icon test combobox"); + addComponent(cb2); + + Button btClear = new Button("Clear button"); + btClear.setImmediate(true); + btClear.addListener(new Button.ClickListener() { + + public void buttonClick(ClickEvent event) { + cb2.removeAllItems(); + cb2.setContainerDataSource(null); + } + }); + + addComponent(btClear); + } + + private ComboBox createComboBox(String caption) { + ComboBox cb = new ComboBox(caption); + cb.setImmediate(true); + cb.addItem(1); + cb.setItemCaption(1, "icon test"); + cb.setItemIcon(1, new ThemeResource("menubar/img/checked.png")); + return cb; + } + + @Override + protected String getDescription() { + return "Clear button must remove selected icon, and comboboxes' widths must stay same."; + } + + @Override + protected Integer getTicketNumber() { + return 4353; + } + +} -- cgit v1.2.3 From 3ef20fe8faf7459bfb36d68bab0a05b47d6f40b3 Mon Sep 17 00:00:00 2001 From: Automerge Date: Wed, 15 Feb 2012 15:19:09 +0000 Subject: [merge from 6.7] Add some labels and a little spacing to spice things up svn changeset:23036/svn branch:6.8 --- .../components/orderedlayout/OrderedLayoutCases.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/testbench') diff --git a/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java b/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java index d50952f070..a9f53bf996 100644 --- a/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java +++ b/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java @@ -190,8 +190,13 @@ public class OrderedLayoutCases extends TestBase { new ClickListener() { public void buttonClick(ClickEvent event) { resetState(); + setState(sizeBar, 2, 1); // width: 350px to middle child setChildState(1, 0, 2); + // middle center allign to middle child + setChildState(1, 4, 5); + // long captions to right child + setChildState(2, 2, 2); } })); caseBar.addComponent(new Button("Undefined with relative", @@ -222,6 +227,10 @@ public class OrderedLayoutCases extends TestBase { setState(sizeBar, 3, 1); // width: 350px to middle child setChildState(1, 0, 2); + // short caption for middle child + setChildState(1, 2, 1); + // top center align for middle child + setChildState(1, 4, 2); } })); @@ -237,6 +246,8 @@ public class OrderedLayoutCases extends TestBase { setChildState(1, 3, 1); // Align bottom left to middle child setChildState(1, 4, 6); + // Long caption to middle child + setChildState(1, 2, 2); } })); @@ -248,6 +259,8 @@ public class OrderedLayoutCases extends TestBase { setState(sizeBar, 0, 3); // Layout height: 350px setState(sizeBar, 1, 2); + // Long caption to left child + setChildState(0, 2, 2); // Width 350px to middle child setChildState(1, 0, 2); // Apply to left and middle child @@ -270,6 +283,8 @@ public class OrderedLayoutCases extends TestBase { setChildState(0, 1, 2); // Height: 100% to middle child setChildState(1, 1, 4); + // Short caption to middle child + setChildState(1, 2, 1); // Alignment: bottom left to right child setChildState(2, 4, 7); } @@ -281,6 +296,8 @@ public class OrderedLayoutCases extends TestBase { resetState(); // Height: 350px to left child setChildState(0, 1, 2); + // Short caption to left child + setChildState(0, 2, 1); // Height: 100% to middle child setChildState(1, 1, 4); // Alignment: bottom left to right child -- cgit v1.2.3 From 3c2de952974b3e0e82de7951d814fd6312b434af Mon Sep 17 00:00:00 2001 From: Automerge Date: Wed, 15 Feb 2012 15:19:14 +0000 Subject: [merge from 6.7] Set explicit resolution to make screenshot merging easier svn changeset:23037/svn branch:6.8 --- .../com/vaadin/tests/layouts/layouttester/GridLayoutTests.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/testbench') diff --git a/tests/testbench/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java b/tests/testbench/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java index 2b006fbfca..474df7abcb 100644 --- a/tests/testbench/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java +++ b/tests/testbench/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java @@ -66,6 +66,9 @@ public class GridLayoutTests extends AbstractLayoutTests { glo.replaceComponent(row1, row1 = new DateField()); glo.replaceComponent(row2, row2 = new DateField()); glo.replaceComponent(row3, row3 = new DateField()); + ((DateField) row1).setResolution(DateField.RESOLUTION_SEC); + ((DateField) row2).setResolution(DateField.RESOLUTION_SEC); + ((DateField) row2).setResolution(DateField.RESOLUTION_SEC); glo.setComponentAlignment(col2, alignments[6]); glo.setComponentAlignment(col3, alignments[7]); glo.setComponentAlignment(col1, alignments[8]); -- cgit v1.2.3