diff options
author | Marc Englund <marc@vaadin.com> | 2012-10-16 12:47:13 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-10-16 12:47:13 +0000 |
commit | 30dc9f083b981aad4b180999d6f2bacf1207bed0 (patch) | |
tree | fff977f13b828309e4638bfbf14ec24eb0eb3087 /uitest/src/com | |
parent | b888fd4ff5ddb973195394d8ddcb4e0ed2ea19f0 (diff) | |
parent | 014f752f5620433cc0f429821c6464534227dfc9 (diff) | |
download | vaadin-framework-30dc9f083b981aad4b180999d6f2bacf1207bed0.tar.gz vaadin-framework-30dc9f083b981aad4b180999d6f2bacf1207bed0.zip |
Merge "Fixed primary stylename handling for Datefield and InlineDatefield #9903"
Diffstat (limited to 'uitest/src/com')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.html | 247 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.java | 42 |
2 files changed, 289 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.html b/uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.html new file mode 100644 index 0000000000..1b3cb8dcab --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.html @@ -0,0 +1,247 @@ +<?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="http://localhost:8888/" /> +<title>New Test</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">New Test</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.datefield.DateFieldPrimaryStyleNames?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VDateFieldCalendar[0]</td> + <td>my-inline-datefield</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VDateFieldCalendar[0]</td> + <td>my-inline-datefield-day</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VDateFieldCalendar[0]/VCalendarPanel[0]/domChild[1]/domChild[0]</td> + <td>my-inline-datefield-calendarpanel-header</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VDateFieldCalendar[0]/VCalendarPanel[0]/domChild[1]/domChild[1]/domChild[0]</td> + <td>my-inline-datefield-calendarpanel-body</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]</td> + <td>my-datefield</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]</td> + <td>my-datefield-popupcalendar</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]</td> + <td>my-datefield-day</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]/domChild[0]</td> + <td>my-datefield-textfield</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]/domChild[1]</td> + <td>my-datefield-button</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]#popupButton</td> + <td>13,0</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//body/div[last()]</td> + <td>my-datefield-popup</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//body/div[last()]</td> + <td>my-datefield-day</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']</td> + <td>my-datefield-calendarpanel</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]</td> + <td>my-datefield-calendarpanel-header</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]/td[1]</td> + <td>my-datefield-calendarpanel-prevyear</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]/td[2]</td> + <td>my-datefield-calendarpanel-prevmonth</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]/td[3]</td> + <td>my-datefield-calendarpanel-month</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]/td[4]</td> + <td>my-datefield-calendarpanel-nextmonth</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]/td[5]</td> + <td>my-datefield-calendarpanel-nextyear</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[2]/td[1]</td> + <td>my-datefield-calendarpanel-body</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[2]/td[1]/table/tbody/tr[1]</td> + <td>my-datefield-calendarpanel-weekdays</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]#popupButton</td> + <td>13,0</td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[2]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VDateFieldCalendar[0]</td> + <td>my-second-inline-datefield</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VDateFieldCalendar[0]</td> + <td>my-second-inline-datefield-day</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VDateFieldCalendar[0]/VCalendarPanel[0]/domChild[1]/domChild[0]</td> + <td>my-second-inline-datefield-calendarpanel-header</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VDateFieldCalendar[0]/VCalendarPanel[0]/domChild[1]/domChild[1]/domChild[0]</td> + <td>my-second-inline-datefield-calendarpanel-body</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]</td> + <td>my-second-datefield</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]</td> + <td>my-second-datefield-popupcalendar</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]</td> + <td>my-second-datefield-day</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]/domChild[0]</td> + <td>my-second-datefield-textfield</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]/domChild[1]</td> + <td>my-second-datefield-button</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]#popupButton</td> + <td>13,0</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//body/div[last()]</td> + <td>my-second-datefield-popup</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//body/div[last()]</td> + <td>my-second-datefield-day</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']</td> + <td>my-second-datefield-calendarpanel</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]</td> + <td>my-second-datefield-calendarpanel-header</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]/td[1]</td> + <td>my-second-datefield-calendarpanel-prevyear</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]/td[2]</td> + <td>my-second-datefield-calendarpanel-prevmonth</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]/td[3]</td> + <td>my-second-datefield-calendarpanel-month</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]/td[4]</td> + <td>my-second-datefield-calendarpanel-nextmonth</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[1]/td[5]</td> + <td>my-second-datefield-calendarpanel-nextyear</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[2]/td[1]</td> + <td>my-second-datefield-calendarpanel-body</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>//*[@id='PID_VAADIN_POPUPCAL']/tbody/tr[2]/td[1]/table/tbody/tr[1]</td> + <td>my-second-datefield-calendarpanel-weekdays</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldPrimaryStyleNames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VPopupCalendar[0]#popupButton</td> + <td>13,0</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.java new file mode 100644 index 0000000000..ca9492b111 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.java @@ -0,0 +1,42 @@ +package com.vaadin.tests.components.datefield; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.DateField; +import com.vaadin.ui.InlineDateField; + +public class DateFieldPrimaryStyleNames extends TestBase { + + @Override + protected void setup() { + final DateField df = new DateField(); + df.setPrimaryStyleName("my-datefield"); + addComponent(df); + + final InlineDateField idf = new InlineDateField(); + idf.setPrimaryStyleName("my-inline-datefield"); + addComponent(idf); + + addComponent(new Button("Set primary stylename", + new Button.ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + df.setPrimaryStyleName("my-second-datefield"); + idf.setPrimaryStyleName("my-second-inline-datefield"); + } + })); + + } + + @Override + protected String getDescription() { + return "Datefield should work with primary stylenames both initially and dynamically"; + } + + @Override + protected Integer getTicketNumber() { + return 9903; + } + +} |