Author: jpapouse
Date: 2011-08-17 11:06:31 -0400 (Wed, 17 Aug 2011)
New Revision: 22640
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelectFAjax.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestSelectsWithJSR303.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
Log:
added issue tracking and tried to fix JSR 303 tests for inplace select (not tested)
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2011-08-17
12:16:51 UTC (rev 22639)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2011-08-17
15:06:31 UTC (rev 22640)
@@ -76,7 +76,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-9664")
+ @IssueTracking("https://issues.jboss.org/browse/RF-11227")
public void testClick() {
guardNoRequest(selenium).click(select);
assertFalse(selenium.belongsClass(edit, "rf-is-none"), "Edit
should not contain class rf-is-none when popup is open.");
@@ -104,6 +104,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11227")
public void testChangedClass() {
selenium.type(pjq("input[id$=changedClassInput]"),
"metamer-ftest-class");
selenium.waitForPageToLoad();
@@ -172,6 +173,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11227")
public void testActiveClass() {
selenium.type(pjq("input[id$=activeClassInput]"),
"metamer-ftest-class");
selenium.waitForPageToLoad();
@@ -187,6 +189,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11227")
public void testImmediate() {
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
@@ -271,7 +274,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-9849")
+ @IssueTracking("https://issues.jboss.org/browse/RF-11227")
public void testOnblur() {
selenium.type(pjq("input[id$=onblurInput]"), "metamerEvents +=
\"blur \"");
selenium.waitForPageToLoad(TIMEOUT);
@@ -283,7 +286,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-9571")
+ @IssueTracking("https://issues.jboss.org/browse/RF-11227")
public void testOnchange() {
selenium.type(pjq("input[type=text][id$=onchangeInput]"),
"metamerEvents += \"change \"");
selenium.waitForPageToLoad();
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelectFAjax.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelectFAjax.java 2011-08-17
12:16:51 UTC (rev 22639)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelectFAjax.java 2011-08-17
15:06:31 UTC (rev 22640)
@@ -61,7 +61,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10538")
+ @IssueTracking("https://issues.jboss.org/browse/RF-11227")
public void testClick() {
guardNoRequest(selenium).click(select);
assertFalse(selenium.belongsClass(edit, "rf-is-none"), "Edit
should not contain class rf-is-none when popup is open.");
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestSelectsWithJSR303.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestSelectsWithJSR303.java 2011-08-17
12:16:51 UTC (rev 22639)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestSelectsWithJSR303.java 2011-08-17
15:06:31 UTC (rev 22640)
@@ -26,6 +26,7 @@
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.waiting.TextContainsCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
/**
@@ -103,9 +104,9 @@
selenium.click(notEmptySelect.getDescendant(optionEmpty));
selenium.fireEvent(notEmptyInput, Event.BLUR);
// give selenium time set new value to appropriate field before submit
- waitGui.until(textEquals.locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
selenium.click(a4jCommandButton);
- waitAjax.until(textEquals.locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
+
waitAjax.until(TextContainsCondition.getInstance().locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
setAllCorrect();
@@ -113,10 +114,10 @@
selenium.click(notEmptySelect.getDescendant(optionEmpty));
selenium.fireEvent(notEmptyInput, Event.BLUR);
// give selenium time set new value to appropriate field before submit
- waitGui.until(textEquals.locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
selenium.click(hCommandButton);
selenium.waitForPageToLoad();
- waitGui.until(textEquals.locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
}
protected void verifyRegExpPattern() {
@@ -126,9 +127,9 @@
selenium.click(regExpPatternSelect.getDescendant(option.format(WRONG_REG_EXP)));
selenium.fireEvent(regExpPatternInput, Event.BLUR);
// give selenium time set new value to appropriate field before submit
- waitGui.until(textEquals.locator(input2Msg).text(REGEXP_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input2Msg).text(REGEXP_VALIDATION_MSG));
selenium.click(a4jCommandButton);
- waitGui.until(textEquals.locator(input2Msg).text(REGEXP_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input2Msg).text(REGEXP_VALIDATION_MSG));
setAllCorrect();
@@ -136,10 +137,10 @@
selenium.click(regExpPatternSelect.getDescendant(option.format(WRONG_REG_EXP)));
selenium.fireEvent(regExpPatternInput, Event.BLUR);
// give selenium time set new value to appropriate field before submit
- waitGui.until(textEquals.locator(input2Msg).text(REGEXP_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input2Msg).text(REGEXP_VALIDATION_MSG));
selenium.click(hCommandButton);
selenium.waitForPageToLoad();
- waitGui.until(textEquals.locator(input2Msg).text(REGEXP_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input2Msg).text(REGEXP_VALIDATION_MSG));
}
protected void verifyStringSize() {
@@ -149,9 +150,9 @@
selenium.click(stringSizeSelect.getDescendant(option.format(WRONG_STRING_SIZE)));
selenium.fireEvent(stringSizeInput, Event.BLUR);
// give selenium time set new value to appropriate field before submit
- waitGui.until(textEquals.locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
selenium.click(a4jCommandButton);
- waitGui.until(textEquals.locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
setAllCorrect();
@@ -159,10 +160,10 @@
selenium.click(stringSizeSelect.getDescendant(option.format(WRONG_STRING_SIZE)));
selenium.fireEvent(stringSizeInput, Event.BLUR);
// give selenium time set new value to appropriate field before submit
- waitGui.until(textEquals.locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
selenium.click(hCommandButton);
selenium.waitForPageToLoad();
- waitGui.until(textEquals.locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
}
protected void verifyCustomString() {
@@ -172,9 +173,9 @@
selenium.click(customStringSelect.getDescendant(option.format(WRONG_CUSTOM_STRING)));
selenium.fireEvent(customStringInput, Event.BLUR);
// give selenium time set new value to appropriate field before submit
- waitGui.until(textEquals.locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
selenium.click(a4jCommandButton);
- waitGui.until(textEquals.locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
setAllCorrect();
@@ -182,10 +183,10 @@
selenium.click(customStringSelect.getDescendant(option.format(WRONG_CUSTOM_STRING)));
selenium.fireEvent(customStringInput, Event.BLUR);
// give selenium time set new value to appropriate field before submit
- waitGui.until(textEquals.locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
selenium.click(hCommandButton);
selenium.waitForPageToLoad();
- waitGui.until(textEquals.locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
}
protected void verifyRequired() {
@@ -195,9 +196,9 @@
selenium.click(requiredSelect.getDescendant(optionEmpty));
selenium.fireEvent(requiredInput, Event.BLUR);
// give selenium time set new value to appropriate field before submit
- // waitGui.until(textEquals.locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
+ //
waitGui.until(TextContainsCondition.getInstance().locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
selenium.click(a4jCommandButton);
- waitGui.until(textEquals.locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
setAllCorrect();
@@ -205,10 +206,10 @@
selenium.click(requiredSelect.getDescendant(optionEmpty));
selenium.fireEvent(requiredInput, Event.BLUR);
// give selenium time set new value to appropriate field before submit
- waitGui.until(textEquals.locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
selenium.click(hCommandButton);
selenium.waitForPageToLoad();
- waitGui.until(textEquals.locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
}
@@ -217,22 +218,22 @@
setAllWrong();
selenium.click(a4jCommandButton);
- waitGui.until(textEquals.locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
- waitGui.until(textEquals.locator(input2Msg).text(REGEXP_VALIDATION_MSG));
- waitGui.until(textEquals.locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
- waitGui.until(textEquals.locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
- waitGui.until(textEquals.locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input2Msg).text(REGEXP_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
setAllCorrect();
setAllWrong();
selenium.click(hCommandButton);
selenium.waitForPageToLoad();
- waitGui.until(textEquals.locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
- waitGui.until(textEquals.locator(input2Msg).text(REGEXP_VALIDATION_MSG));
- waitGui.until(textEquals.locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
- waitGui.until(textEquals.locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
- waitGui.until(textEquals.locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input1Msg).text(NOT_EMPTY_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input2Msg).text(REGEXP_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input3Msg).text(STRING_SIZE_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input4Msg).text(CUSTOM_STRING_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
}
protected void verifyAllInputsCorrect() {
@@ -246,15 +247,15 @@
selenium.click(hCommandButton);
selenium.waitForPageToLoad();
- waitGui.until(textEquals.locator(outputFormat.format(NOT_EMPTY_ID))
+
waitGui.until(TextContainsCondition.getInstance().locator(outputFormat.format(NOT_EMPTY_ID))
.text(CORRECT_NOT_EMPTY));
- waitGui.until(textEquals.locator(outputFormat.format(REG_EXP_PATTERN_ID))
+
waitGui.until(TextContainsCondition.getInstance().locator(outputFormat.format(REG_EXP_PATTERN_ID))
.text(CORRECT_REG_EXP));
- waitGui.until(textEquals.locator(outputFormat.format(STRING_SIZE_ID))
+
waitGui.until(TextContainsCondition.getInstance().locator(outputFormat.format(STRING_SIZE_ID))
.text(CORRECT_STRING_SIZE));
- waitGui.until(textEquals.locator(outputFormat.format(CUSTOM_STRING_ID))
+
waitGui.until(TextContainsCondition.getInstance().locator(outputFormat.format(CUSTOM_STRING_ID))
.text(CORRECT_CUSTOM_STRING));
- waitGui.until(textEquals.locator(outputFormat.format(REQUIRED_ID))
+
waitGui.until(TextContainsCondition.getInstance().locator(outputFormat.format(REQUIRED_ID))
.text(CORRECT_REQUIRED_STRING));
// with ajax form submit
@@ -262,15 +263,15 @@
setAllCorrect();
// no submit button click need, values in output fields are updated
- waitGui.until(textEquals.locator(outputFormat.format(NOT_EMPTY_ID))
+
waitGui.until(TextContainsCondition.getInstance().locator(outputFormat.format(NOT_EMPTY_ID))
.text(CORRECT_NOT_EMPTY));
- waitGui.until(textEquals.locator(outputFormat.format(REG_EXP_PATTERN_ID))
+
waitGui.until(TextContainsCondition.getInstance().locator(outputFormat.format(REG_EXP_PATTERN_ID))
.text(CORRECT_REG_EXP));
- waitGui.until(textEquals.locator(outputFormat.format(STRING_SIZE_ID))
+
waitGui.until(TextContainsCondition.getInstance().locator(outputFormat.format(STRING_SIZE_ID))
.text(CORRECT_STRING_SIZE));
- waitGui.until(textEquals.locator(outputFormat.format(CUSTOM_STRING_ID))
+
waitGui.until(TextContainsCondition.getInstance().locator(outputFormat.format(CUSTOM_STRING_ID))
.text(CORRECT_CUSTOM_STRING));
- waitGui.until(textEquals.locator(outputFormat.format(REQUIRED_ID))
+
waitGui.until(TextContainsCondition.getInstance().locator(outputFormat.format(REQUIRED_ID))
.text(CORRECT_REQUIRED_STRING));
}
@@ -278,7 +279,7 @@
selenium.click(notEmptyInput);
selenium.click(notEmptySelect.getDescendant(optionEmpty));
- waitGui.until(textEquals.locator(notEmptyInput).text(WRONG_NOT_EMPTY));
+
waitGui.until(TextContainsCondition.getInstance().locator(notEmptyInput).text(WRONG_NOT_EMPTY));
selenium.fireEvent(notEmptyInput, Event.BLUR);
selenium.click(regExpPatternInput);
@@ -297,7 +298,7 @@
selenium.click(requiredSelect.getDescendant(optionEmpty));
selenium.fireEvent(requiredInput, Event.BLUR);
- waitGui.until(textEquals.locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
+
waitGui.until(TextContainsCondition.getInstance().locator(input5Msg).text(REQUIRED_VALIDATION_MSG));
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2011-08-17
12:16:51 UTC (rev 22639)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2011-08-17
15:06:31 UTC (rev 22640)
@@ -125,7 +125,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-11163")
+ @IssueTracking("https://issues.jboss.org/browse/RF-11320")
public void testFiltering() {
selenium.focus(input);
guardNoRequest(selenium).keyPress(input, "a");
@@ -453,6 +453,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11320")
public void testSelectFirst() {
selenium.click(pjq("input[type=radio][name$=selectFirstInput][value=true]"));
selenium.waitForPageToLoad();