aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-01-27 13:21:33 +0000
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-01-27 13:21:33 +0000
commit96b723239a017aea19bd7b76d6bee2fc74e1e4b0 (patch)
treea7581a671f2e305fc040db339a98670116dfd261 /tests
parent0f7bf07b0a332cc6b5cb698b5575358b46579670 (diff)
downloadvaadin-framework-96b723239a017aea19bd7b76d6bee2fc74e1e4b0.tar.gz
vaadin-framework-96b723239a017aea19bd7b76d6bee2fc74e1e4b0.zip
#6718 TestBench test
svn changeset:22792/svn branch:6.8
Diffstat (limited to 'tests')
-rw-r--r--tests/testbench/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRange.html142
-rw-r--r--tests/testbench/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRange.java69
2 files changed, 211 insertions, 0 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRange.html b/tests/testbench/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRange.html
new file mode 100644
index 0000000000..97398b4964
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRange.html
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>PopupDateFieldExtendedRange</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">PopupDateFieldExtendedRange</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.datefield.PopupDateFieldExtendedRange?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPopupCalendar[0]#popupButton</td>
+ <td>12,18</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::Root/VOverlay[0]/VCalendarPanel[0]#prevmon</td>
+ <td>11,9</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::Root/VOverlay[0]/VCalendarPanel[0]#prevy</td>
+ <td>10,13</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPopupCalendar[0]#popupButton</td>
+ <td>18,10</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPopupCalendar[0]#popupButton</td>
+ <td>16,12</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPopupCalendar[0]#popupButton</td>
+ <td>17,10</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VPopupCalendar[0]#popupButton</td>
+ <td>11,8</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::Root/VOverlay[0]/VCalendarPanel[0]</td>
+ <td>left</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::Root/VOverlay[0]/VCalendarPanel[0]</td>
+ <td>left</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::Root/VOverlay[0]/VCalendarPanel[0]</td>
+ <td>up</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::Root/VOverlay[0]/VCalendarPanel[0]</td>
+ <td>up</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::Root/VOverlay[0]/VCalendarPanel[0]</td>
+ <td>shift left</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::Root/VOverlay[0]/VCalendarPanel[0]</td>
+ <td>shift down</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VPopupCalendar[0]#popupButton</td>
+ <td>9,4</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VPopupCalendar[0]#popupButton</td>
+ <td>9,9</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldExtendedRangeInMonthView::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VPopupCalendar[0]#popupButton</td>
+ <td>21,4</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRange.java b/tests/testbench/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRange.java
new file mode 100644
index 0000000000..4fc8f87398
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRange.java
@@ -0,0 +1,69 @@
+package com.vaadin.tests.components.datefield;
+
+import java.util.Calendar;
+import java.util.Locale;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Button.ClickListener;
+import com.vaadin.ui.DateField;
+import com.vaadin.ui.PopupDateField;
+
+@SuppressWarnings("serial")
+public class PopupDateFieldExtendedRange extends TestBase {
+
+ private Calendar date = Calendar.getInstance();
+
+ @Override
+ protected void setup() {
+ date.set(2011, 0, 1);
+
+ getLayout().setSpacing(true);
+
+ final PopupDateField[] fields = new PopupDateField[3];
+
+ fields[0] = makeDateField();
+ fields[0].setLocale(new Locale("fi", "FI"));
+ fields[0].setCaption("Finnish locale");
+
+ fields[1] = makeDateField();
+ fields[1].setLocale(new Locale("en", "US"));
+ fields[1].setCaption("US English locale");
+
+ fields[2] = makeDateField();
+ fields[2].setLocale(new Locale("fi", "FI"));
+ fields[2].setShowISOWeekNumbers(true);
+ fields[2].setCaption("Finnish locale with week numbers");
+
+ for (PopupDateField f : fields) {
+ addComponent(f);
+ }
+
+ addComponent(new Button("Change date", new ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ date.set(2010, 1, 16);
+ for (PopupDateField f : fields) {
+ f.setValue(date.getTime());
+ }
+ }
+ }));
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Show a few days of the preceding and following months in the datefield popup";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 6718;
+ }
+
+ private PopupDateField makeDateField() {
+ PopupDateField pdf = new PopupDateField();
+ pdf.setResolution(DateField.RESOLUTION_DAY);
+ pdf.setValue(date.getTime());
+ return pdf;
+ }
+}