Author: dsvyatobatsko
Date: 2008-10-03 08:22:47 -0400 (Fri, 03 Oct 2008)
New Revision: 10658
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
a little assertClassNames method fix
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-10-03
11:07:11 UTC (rev 10657)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-10-03
12:22:47 UTC (rev 10658)
@@ -948,17 +948,17 @@
* @param isId - Pass true if ID is string, false - if ID is expression to load
appropriate DOM element
*/
public void assertClassNames(String id, String[] classNames, String message, boolean
isId) {
- for (String s : classNames) {
- String result = null;
- if (isId) {
-
runScript("$('"+id+"').hasClassName('"+s+"')",
false).toLowerCase();
- }else {
- runScript("$("+id+").hasClassName('"+s+"')",
false).toLowerCase();
- }
- if (Boolean.FALSE.toString().toLowerCase().equals(result)) {
- Assert.fail(message + " Element [id="+id+"] should contain class
name '"+s+"'");
- }
- }
+ for (String s : classNames) {
+ String result = null;
+ if (isId) {
+ result = runScript("$('" + id +
"').hasClassName('" + s + "')", false).toLowerCase();
+ } else {
+ result = runScript("$(" + id + ").hasClassName('"
+ s + "')", false).toLowerCase();
+ }
+ if (Boolean.FALSE.toString().toLowerCase().equals(result)) {
+ Assert.fail(message + " Element [id=" + id + "] should
contain class name '" + s + "'");
+ }
+ }
}
public void assertEvents(List<String> eventsExpected) {
Show replies by date