aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2015-03-16 23:53:56 +0200
committerSauli Tähkäpää <sauli@vaadin.com>2015-03-17 00:21:04 +0200
commit940b082cd547a110a45e69c13e50a583e9f7ef11 (patch)
tree0e3e3d8890859bb217f9ebb7737ae56085968c92 /uitest/src/com
parentfd700f072fb72113cd559aea60819acc85b0fda5 (diff)
downloadvaadin-framework-940b082cd547a110a45e69c13e50a583e9f7ef11.tar.gz
vaadin-framework-940b082cd547a110a45e69c13e50a583e9f7ef11.zip
Sanitize connectors for PopupDateField and DateField. (#17090)
Change-Id: I667796430eeaa0ddd8142b0c229fe133cd30cd49
Diffstat (limited to 'uitest/src/com')
-rw-r--r--uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldConnector.java24
-rw-r--r--uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldConnectorTest.java21
2 files changed, 45 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldConnector.java b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldConnector.java
new file mode 100644
index 0000000000..5cdc8f1396
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldConnector.java
@@ -0,0 +1,24 @@
+package com.vaadin.tests.components.datefield;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.DateField;
+import com.vaadin.ui.PopupDateField;
+
+public class PopupDateFieldConnector extends AbstractTestUI {
+ @Override
+ protected void setup(VaadinRequest request) {
+ addComponent(new PopupDateField());
+ addComponent(new DateField());
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 17090;
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "PopupDateFieldElement should be accessible using TB4 PopupDateFieldElement.";
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldConnectorTest.java b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldConnectorTest.java
new file mode 100644
index 0000000000..5334327a83
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldConnectorTest.java
@@ -0,0 +1,21 @@
+package com.vaadin.tests.components.datefield;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
+
+import org.junit.Test;
+
+import com.vaadin.testbench.elements.DateFieldElement;
+import com.vaadin.testbench.elements.PopupDateFieldElement;
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+public class PopupDateFieldConnectorTest extends SingleBrowserTest {
+
+ @Test
+ public void popupDateFieldElementIsLocated() {
+ openTestURL();
+
+ assertThat($(PopupDateFieldElement.class).all().size(), is(1));
+ assertThat($(DateFieldElement.class).all().size(), is(2));
+ }
+} \ No newline at end of file