summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorAnastasia Smirnova <anasmi@utu.fi>2019-02-25 11:49:20 +0200
committerSun Zhe <31067185+ZheSun88@users.noreply.github.com>2019-02-25 11:49:20 +0200
commit6cc773fb7c717328fbce7255fa419581b7609a92 (patch)
treeb133c3d03fb2be689bcf25a53759ad47c3934891 /uitest
parent19f839154e49c487ff9d156e962acb4df889a553 (diff)
downloadvaadin-framework-6cc773fb7c717328fbce7255fa419581b7609a92.tar.gz
vaadin-framework-6cc773fb7c717328fbce7255fa419581b7609a92.zip
Ensure pop-up is not opened, when tabbing out fast from Combobox (#11436)
Checking that no prior Combobox behavior is broken * Cleaning-up the code Adding UI test * Adding TestBench test
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxFastTabbingOut.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxFastTabbingOut.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxFastTabbingOut.java
new file mode 100644
index 0000000000..1789f3ba85
--- /dev/null
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxFastTabbingOut.java
@@ -0,0 +1,43 @@
+package com.vaadin.tests.components.combobox;
+
+import com.vaadin.annotations.Widgetset;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.ComboBox;
+
+import java.util.ArrayList;
+
+@Widgetset("com.vaadin.DefaultWidgetSet")
+public class ComboboxFastTabbingOut extends AbstractTestUI {
+ @Override
+ protected void setup(VaadinRequest request) {
+ ComboBox<String> combobox = new ComboBox<>(
+ "Press any letter and tab out fast. The pop-up should stay closed");
+ ArrayList<String> values = new ArrayList<>();
+ values.add("AMERICAN SAMOA");
+ values.add("ANTIGUA AND BARBUDA");
+ values.add("Bali");
+ combobox.setId("firstCombobox");
+ combobox.setItems(values);
+
+ ComboBox<String> combobox2 = new ComboBox<>(
+ "Focusing after tabbing from another CB should not open the pop-up");
+
+ combobox2.setItems("AMERICAN SAMOA", "ANTIGUA AND BARBUDA", "Lake 1",
+ "Lake 2");
+ combobox2.setId("secondCombobox");
+ addComponent(combobox);
+ addComponent(combobox2);
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "On tabbing out fast, the popup window stays closed";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 11354;
+ }
+
+}