Author: ppitonak(a)redhat.com
Date: 2011-10-12 07:39:52 -0400 (Wed, 12 Oct 2011)
New Revision: 22786
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java
Log:
added new test for tabindex in popup panel
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-10-12
09:26:03 UTC (rev 22785)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java 2011-10-12
11:39:52 UTC (rev 22786)
@@ -48,6 +48,7 @@
import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
@@ -288,7 +289,7 @@
for (int i = 2; i < 42; i += 7) {
if (!selenium.belongsClass(cellDay.format(i),
"rf-cal-boundary-day")) {
assertTrue(selenium.belongsClass(cellDay.format(i),
"yellowDay"), "Cell nr. " + i
- + " should be yellow.");
+ + " should be yellow.");
}
}
@@ -299,12 +300,12 @@
for (int i = 0; i < 42; i++) {
assertFalse(selenium.belongsClass(cellDay.format(i), "yellowDay"),
"Cell nr. " + i
- + " should not be yellow.");
+ + " should not be yellow.");
}
}
@Test
- @RegressionTest({"https://issues.jboss.org/browse/RF-9837",
"https://issues.jboss.org/browse/RF-10085"})
+ @RegressionTest({ "https://issues.jboss.org/browse/RF-9837",
"https://issues.jboss.org/browse/RF-10085" })
public void testDefaultTime() {
selenium.type(pjq("input[type=text][id$=defaultTimeInput]"),
"21:24");
selenium.waitForPageToLoad();
@@ -354,7 +355,7 @@
selenium.click(input);
- String[] labels = {"", "Sat", "Sun",
"Mon", "Tue", "Wed", "Thu", "Fri"};
+ String[] labels = { "", "Sat", "Sun",
"Mon", "Tue", "Wed", "Thu", "Fri" };
for (int i = 0; i < 8; i++) {
String label = selenium.getText(weekDayLabel.format(i));
@@ -375,7 +376,7 @@
// }
}
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-10821")
public void testImmediate() {
selenium.click(pjq("input[name$=immediateInput][value=true]"));
@@ -432,7 +433,7 @@
selenium.click(input);
- String[] labels = {"", "Вс", "Пн", "Вт",
"Ср", "Чт", "Пт", "Сб"};
+ String[] labels = { "", "Вс", "Пн", "Вт",
"Ср", "Чт", "Пт", "Сб" };
for (int i = 0; i < 8; i++) {
String label = selenium.getText(weekDayLabel.format(i));
@@ -445,7 +446,8 @@
String selectedDate = null;
try {
- Date date = new SimpleDateFormat("d MMMM, yyyy hh:mm", new
Locale("ru")).parse(day + " " + month + " 12:00");
+ Date date = new SimpleDateFormat("d MMMM, yyyy hh:mm", new
Locale("ru"))
+ .parse(day + " " + month + " 12:00");
selectedDate = new SimpleDateFormat("MMM d, yyyy hh:mm", new
Locale("ru")).format(date);
} catch (ParseException ex) {
fail(ex.getMessage());
@@ -458,7 +460,8 @@
@Test
public void testMonthLabels() {
- String[] labels = {"január", "február", "marec",
"apríl", "máj", "jún", "júl", "august",
"september", "október", "november", "december"};
+ String[] labels = { "január", "február", "marec",
"apríl", "máj", "jún", "júl", "august",
"september",
+ "október", "november", "december" };
String labelsString = "január,február,marec,apríl,máj,jún,
júl,august,september,október,november,december";
selenium.type(pjq("input[id$=monthLabelsInput]"), labelsString);
@@ -479,7 +482,7 @@
@Test
public void testMonthLabelsShort() {
- String[] labels = {"jan", "feb", "mar",
"apr", "máj", "jún", "júl", "aug",
"sep", "okt", "nov", "dec"};
+ String[] labels = { "jan", "feb", "mar",
"apr", "máj", "jún", "júl", "aug",
"sep", "okt", "nov", "dec" };
String labelsString = "jan,feb,mar,apr,máj,jún,
júl,aug,sep,okt,nov,dec";
selenium.type(pjq("input[id$=monthLabelsShortInput]"), labelsString);
@@ -524,7 +527,8 @@
selenium.click(cellDay.format(18));
selenium.click(applyButton);
- waitGui.failWith("Attribute onchange does not work
correctly").until(new EventFiredCondition(new Event("change")));
+ waitGui.failWith("Attribute onchange does not work correctly").until(
+ new EventFiredCondition(new Event("change")));
}
@Test
@@ -536,7 +540,8 @@
selenium.click(cellDay.format(18));
selenium.click(cleanButton);
- waitGui.failWith("Attribute onclean does not work correctly").until(new
EventFiredCondition(new Event("clean")));
+ waitGui.failWith("Attribute onclean does not work correctly")
+ .until(new EventFiredCondition(new Event("clean")));
}
@Test
@@ -549,7 +554,8 @@
selenium.click(input);
guardXhr(selenium).click(nextMonthButton);
- waitGui.failWith("Attribute oncomplete does not work
correctly").until(new EventFiredCondition(new Event("complete")));
+ waitGui.failWith("Attribute oncomplete does not work
correctly").until(
+ new EventFiredCondition(new Event("complete")));
}
@Test
@@ -560,7 +566,8 @@
selenium.click(input);
selenium.fireEvent(cellDay.format(18), Event.MOUSEOUT);
- waitGui.failWith("Attribute ondatemouseout does not work
correctly").until(new EventFiredCondition(new Event("datemouseout")));
+ waitGui.failWith("Attribute ondatemouseout does not work
correctly").until(
+ new EventFiredCondition(new Event("datemouseout")));
}
@Test
@@ -571,7 +578,8 @@
selenium.click(input);
selenium.fireEvent(cellDay.format(18), Event.MOUSEOVER);
- waitGui.failWith("Attribute ondatemouseover does not work
correctly").until(new EventFiredCondition(new Event("datemouseover")));
+ waitGui.failWith("Attribute ondatemouseover does not work
correctly").until(
+ new EventFiredCondition(new Event("datemouseover")));
}
@Test
@@ -582,7 +590,8 @@
selenium.click(input);
selenium.click(cellDay.format(18));
- waitGui.failWith("Attribute ondateselect does not work
correctly").until(new EventFiredCondition(new Event("dateselect")));
+ waitGui.failWith("Attribute ondateselect does not work
correctly").until(
+ new EventFiredCondition(new Event("dateselect")));
}
@Test
@@ -613,7 +622,7 @@
selenium.type(input, "Dec 23, 2010 19:27");
waitGui.failWith("Attribute oninputchange does not work
correctly").until(
- new EventFiredCondition(new Event("inputchange")));
+ new EventFiredCondition(new Event("inputchange")));
}
@Test
@@ -873,11 +882,18 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(exclude = "richPopupPanel")
public void testTabindexInput() {
testHtmlAttribute(input, "tabindex", "99");
}
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(value = "richPopupPanel")
+ public void testTabindexInputInPopupPanel() {
+ testHtmlAttribute(input, "tabindex", "99");
+ }
+
@Test
public void testTabindexButton() {
testHtmlAttribute(image, "tabindex", "99");
@@ -912,7 +928,7 @@
private void assertNoDateSelected() {
for (int i = 0; i < 42; i++) {
assertFalse(selenium.belongsClass(cellDay.format(i), "rf-cal-sel"),
"Cell nr. " + i
- + " should not be selected.");
+ + " should not be selected.");
}
}
@@ -936,10 +952,10 @@
for (int i = lowerBoundary; i < upperBoundary; i++) {
if (exceptOfDate.equals(selenium.getText(cellDay.format(i)))) {
assertTrue(selenium.belongsClass(cellDay.format(i),
"rf-cal-sel"), "Cell nr. " + i
- + " should not be selected.");
+ + " should not be selected.");
} else {
assertFalse(selenium.belongsClass(cellDay.format(i),
"rf-cal-sel"), "Cell nr. " + i
- + " should not be selected.");
+ + " should not be selected.");
}
}
@@ -949,7 +965,7 @@
// check other 3 lines of cells
for (int i = lowerBoundary; i < upperBoundary; i++) {
assertFalse(selenium.belongsClass(cellDay.format(i), "rf-cal-sel"),
"Cell nr. " + i
- + " should not be selected.");
+ + " should not be selected.");
}
}
}