Author: jjamrich
Date: 2011-05-01 16:52:05 -0400 (Sun, 01 May 2011)
New Revision: 22459
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java
Log:
Fix tests for showDetail and showSummary attribute
There was wrong locators - firstly locator for summary/detail
is not direct child of message container,
secondly this locator cannot be created by pjq (why... its clear)...
Another fix is remove waitForPageToLoad after form submit
performed by a4j:command button
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java 2011-04-29
15:26:10 UTC (rev 22458)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java 2011-05-01
20:52:05 UTC (rev 22459)
@@ -144,8 +144,8 @@
} else {
waitModel.until(elementPresent.locator(hCommandBtn));
selenium.click(hCommandBtn);
+ selenium.waitForPageToLoad();
}
- selenium.waitForPageToLoad();
}
private JQueryLocator getInput4Attribute(RichMessageAttributes attribute) {
@@ -217,12 +217,14 @@
public void testShowSummary() {
// span with class=rf-msg-sum should appear when set to true
- JQueryLocator summary = mainMessage.getChild(pjq("span.rf-msg-sum"));
+ JQueryLocator summary =
mainMessage.getDescendant(jq("span.rf-msg-sum"));
attributes.setShowSummary(Boolean.TRUE);
- waitGui.until(elementPresent.locator(summary));
+ generateValidationMessages(false);
+ waitModel.until(elementPresent.locator(summary));
attributes.setShowSummary(Boolean.FALSE);
+ generateValidationMessages(false);
waitGui.until(isNotDisplayed.locator(summary));
}
@@ -233,12 +235,14 @@
public void testShowDetail() {
// span with class=rf-msg-det should appear when set to true
- JQueryLocator detail = mainMessage.getChild(pjq("span.rf-msg-det"));
+ JQueryLocator detail =
mainMessage.getDescendant(jq("span.rf-msg-det"));
attributes.setShowDetail(Boolean.TRUE);
+ generateValidationMessages(false);
waitGui.until(elementPresent.locator(detail));
attributes.setShowDetail(Boolean.FALSE);
+ generateValidationMessages(false);
waitGui.until(isNotDisplayed.locator(detail));
}
Show replies by date