Author: abelevich
Date: 2009-03-26 10:20:36 -0400 (Thu, 26 Mar 2009)
New Revision: 13217
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java
Log:
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java 2009-03-26
14:18:44 UTC (rev 13216)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java 2009-03-26
14:20:36 UTC (rev 13217)
@@ -20,15 +20,7 @@
*/
package org.richfaces.testng;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.ajax4jsf.bean.InplaceInputTestBean;
import org.ajax4jsf.template.Template;
-import org.richfaces.SeleniumEvent;
-import org.richfaces.SeleniumTestBase;
import org.richfaces.testng.util.CommonUtils;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -173,7 +165,7 @@
sun = invokeFromComponent(inplaceInputD, "getValue", null);
Assert.assertEquals(sun, "Sun", "An inputted text has not to be
saved with cancel");
- AssertTextEquals(inplaceInputD, "Sun", "An inputted text has not
to be saved with cancel");
+ AssertTextEquals(inplaceInputD, "Sun");
}
@@ -214,4 +206,15 @@
selenium.runScript("($('" + id +
"')).component.setValue(\"\", {value: \""+ newValue +
"\"})");
//type(id, newValue);
}
+
+ @Override
+ public void AssertTextEquals(String locator, String value, String message) {
+ String _v = selenium.getText(locator);
+ Assert.assertEquals(_v.endsWith(value), true, message);
+ }
+
+ @Override
+ public void AssertTextEquals(String locator, String value) {
+ AssertTextEquals(locator, value, null);
+ }
}
\ No newline at end of file
Show replies by date