Author: ppitonak(a)redhat.com
Date: 2011-01-06 12:14:29 -0500 (Thu, 06 Jan 2011)
New Revision: 20912
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarBasic.java
Log:
* fixed bugs in calendar tests
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java 2011-01-06
16:14:50 UTC (rev 20911)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java 2011-01-06
17:14:29 UTC (rev 20912)
@@ -53,29 +53,29 @@
// basic parts
protected JQueryLocator calendar = pjq("span[id$=calendar]");
protected JQueryLocator inputs = pjq("span[id$=calendarPopup]");
- protected JQueryLocator input = pjq("input.rf-ca-inp");
- protected JQueryLocator image = pjq("img.rf-ca-btn");
- protected JQueryLocator button = pjq("button.rf-ca-btn");
+ protected JQueryLocator input = pjq("input.rf-cal-inp");
+ protected JQueryLocator image = pjq("img.rf-cal-btn");
+ protected JQueryLocator button = pjq("button.rf-cal-btn");
// popup
protected JQueryLocator popup = pjq("table[id$=calendarContent]");
- protected JQueryLocator prevYearButton = pjq("td.rf-ca-tl:eq(0) >
div");
- protected JQueryLocator nextYearButton = pjq("td.rf-ca-tl:eq(3) >
div");
- protected JQueryLocator prevMonthButton = pjq("td.rf-ca-tl:eq(1) >
div");
- protected JQueryLocator nextMonthButton = pjq("td.rf-ca-tl:eq(2) >
div");
- protected JQueryLocator closeButton = pjq("td.rf-ca-tl:eq(4) > div");
- protected JQueryLocator monthLabel = pjq("td.rf-ca-month > div");
+ protected JQueryLocator prevYearButton = pjq("td.rf-cal-tl:eq(0) >
div");
+ protected JQueryLocator nextYearButton = pjq("td.rf-cal-tl:eq(3) >
div");
+ protected JQueryLocator prevMonthButton = pjq("td.rf-cal-tl:eq(1) >
div");
+ protected JQueryLocator nextMonthButton = pjq("td.rf-cal-tl:eq(2) >
div");
+ protected JQueryLocator closeButton = pjq("td.rf-cal-tl:eq(4) > div");
+ protected JQueryLocator monthLabel = pjq("td.rf-cal-hdr-month > div");
// 0 = blank, 1 = Sun, 2 = Mon, 3 = Tue ...
- protected JQueryLocator weekDayLabel = pjq("td.rf-ca-days:eq({0})");
+ protected JQueryLocator weekDayLabel = pjq("td.rf-cal-day-lbl:eq({0})");
// week = 1..6, day = 0..6
protected JQueryLocator cellWeekDay = pjq("tr[id$=calendarWeekNum{0}] >
td:eq({1})");
// day = 0..41
- protected JQueryLocator cellDay = pjq("td.rf-ca-c:eq({0})");
+ protected JQueryLocator cellDay = pjq("td.rf-cal-c:eq({0})");
// 0..6
- protected JQueryLocator week = pjq("td.rf-ca-week:eq({0})");
- protected JQueryLocator cleanButton = pjq("td.rf-ca-tl-ftr:eq(1) >
div");
- protected JQueryLocator timeButton = pjq("td.rf-ca-tl-ftr:eq(2) >
div");
- protected JQueryLocator todayButton = pjq("td.rf-ca-tl-ftr:eq(4) >
div");
- protected JQueryLocator applyButton = pjq("td.rf-ca-tl-ftr:eq(5) >
div");
+ protected JQueryLocator week = pjq("td.rf-cal-week:eq({0})");
+ protected JQueryLocator cleanButton = pjq("td.rf-cal-tl-ftr:eq(1) >
div");
+ protected JQueryLocator timeButton = pjq("td.rf-cal-tl-ftr:eq(2) >
div");
+ protected JQueryLocator todayButton = pjq("td.rf-cal-tl-ftr:eq(4) >
div");
+ protected JQueryLocator applyButton = pjq("td.rf-cal-tl-ftr:eq(5) >
div");
// time panel
protected JQueryLocator timePanel = pjq("table[id$=calendarEditor]");
protected JQueryLocator hoursInput = pjq("input[id$=calendarTimeHours]");
@@ -84,8 +84,8 @@
protected JQueryLocator minutesInput =
pjq("input[id$=calendarTimeMinutes]");
protected JQueryLocator minutesInputUp =
pjq("div[id$=calendarTimeMinutesBtnUp]");
protected JQueryLocator minutesInputDown =
pjq("div[id$=calendarTimeMinutesBtnDown]");
- protected JQueryLocator okButton = pjq("td.rf-ca-time-layout-ok >
div");
- protected JQueryLocator cancelButton = pjq("td.rf-ca-time-layout-cancel >
div");
+ protected JQueryLocator okButton = pjq("td.rf-cal-time-layout-ok >
div");
+ protected JQueryLocator cancelButton = pjq("td.rf-cal-time-layout-cancel >
div");
protected JQueryLocator output = pjq("span[id$=output]");
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java 2011-01-06
16:14:50 UTC (rev 20911)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java 2011-01-06
17:14:29 UTC (rev 20912)
@@ -261,7 +261,7 @@
selenium.click(input);
for (int i = 2; i < 42; i += 7) {
- if (!selenium.belongsClass(cellDay.format(i),
"rf-ca-boundary-dates")) {
+ if (!selenium.belongsClass(cellDay.format(i),
"rf-cal-boundary-day")) {
assertTrue(selenium.belongsClass(cellDay.format(i),
"yellowDay"), "Cell nr. " + i + " should be yellow.");
}
}
@@ -674,7 +674,7 @@
*/
private void assertNoDateSelected() {
for (int i = 0; i < 42; i++) {
- assertFalse(selenium.belongsClass(cellDay.format(i), "rf-ca-sel"),
"Cell nr. " + i + " should not be selected.");
+ assertFalse(selenium.belongsClass(cellDay.format(i), "rf-cal-sel"),
"Cell nr. " + i + " should not be selected.");
}
}
@@ -695,9 +695,9 @@
// check 3 lines of cells that contain selected date
for (int i = lowerBoundary; i < upperBoundary; i++) {
if (exceptOfDate.equals(selenium.getText(cellDay.format(i)))) {
- assertTrue(selenium.belongsClass(cellDay.format(i),
"rf-ca-sel"), "Cell nr. " + i + " should not be
selected.");
+ assertTrue(selenium.belongsClass(cellDay.format(i),
"rf-cal-sel"), "Cell nr. " + i + " should not be
selected.");
} else {
- assertFalse(selenium.belongsClass(cellDay.format(i),
"rf-ca-sel"), "Cell nr. " + i + " should not be
selected.");
+ assertFalse(selenium.belongsClass(cellDay.format(i),
"rf-cal-sel"), "Cell nr. " + i + " should not be
selected.");
}
}
@@ -706,7 +706,7 @@
// check other 3 lines of cells
for (int i = lowerBoundary; i < upperBoundary; i++) {
- assertFalse(selenium.belongsClass(cellDay.format(i), "rf-ca-sel"),
"Cell nr. " + i + " should not be selected.");
+ assertFalse(selenium.belongsClass(cellDay.format(i), "rf-cal-sel"),
"Cell nr. " + i + " should not be selected.");
}
}
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarBasic.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarBasic.java 2011-01-06
16:14:50 UTC (rev 20911)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarBasic.java 2011-01-06
17:14:29 UTC (rev 20912)
@@ -184,7 +184,7 @@
for (int i = lowerBoundary; i < upperBoundary; i++) {
String day = selenium.getText(cellDay.format(i));
if (day.equals(today)) {
- assertTrue(selenium.belongsClass(cellDay.format(i),
"rf-ca-today"), "Today's date is not styled correctly.");
+ assertTrue(selenium.belongsClass(cellDay.format(i),
"rf-cal-today"), "Today's date is not styled correctly.");
return;
}
}
@@ -214,10 +214,10 @@
selenium.click(input);
guardNoRequest(selenium).click(cellDay.format(6));
- assertTrue(selenium.belongsClass(cellDay.format(6), "rf-ca-sel"),
"Last date in the first week is not selected.");
+ assertTrue(selenium.belongsClass(cellDay.format(6), "rf-cal-sel"),
"Last date in the first week is not selected.");
selenium.click(cellDay.format(8));
- assertFalse(selenium.belongsClass(cellDay.format(6), "rf-ca-sel"),
"Last date in the first week should not be selected.");
+ assertFalse(selenium.belongsClass(cellDay.format(6), "rf-cal-sel"),
"Last date in the first week should not be selected.");
}
@Test
@@ -226,7 +226,7 @@
selenium.click(cellDay.format(6));
guardNoRequest(selenium).click(cleanButton);
- assertFalse(selenium.belongsClass(cellDay.format(6), "rf-ca-sel"),
"Last date in the first week should not be selected.");
+ assertFalse(selenium.belongsClass(cellDay.format(6), "rf-cal-sel"),
"Last date in the first week should not be selected.");
}
@Test