Author: dsvyatobatsko
Date: 2008-05-30 09:23:49 -0400 (Fri, 30 May 2008)
New Revision: 8844
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InplaceSelectTest.java
Log:
refactoring
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InplaceSelectTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InplaceSelectTest.java 2008-05-30
13:05:52 UTC (rev 8843)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InplaceSelectTest.java 2008-05-30
13:23:49 UTC (rev 8844)
@@ -40,7 +40,7 @@
}
private void _testInplaceSelectComponent(Templates template) {
- renderPage(getTestUrl(), template);
+ renderPage(template);
String parentId = getParentId() + "_form:";
String inplaceSelectId = parentId + "inplaceSelect";
@@ -71,7 +71,7 @@
writeStatus("Check that a new element is selected");
- Assert.assertEquals(getValue(inplaceSelectId), "Birch");
+ AssertValueEquals(inplaceSelectId + "inplaceValue",
"Birch");
writeStatus("Select another element"); // Aspen
@@ -81,7 +81,7 @@
selenium.fireEvent(cancelButton, "mousedown");
writeStatus("Cancel selected value.");
- Assert.assertEquals(getValue(inplaceSelectId), "Birch", "A value
has not to be changed");
+ AssertValueEquals(inplaceSelectId + "inplaceValue", "Birch",
"A value has not to be changed");
writeStatus("Verify javascript event triggering");
@@ -103,18 +103,8 @@
}
- /**
- * Gets component value.
- * Note: JavaScript component API getValue() doesn't exit
- * @param clientId
- * @return
- */
- private String getValue(String clientId) {
- return runScript("$('" + clientId +
"inplaceValue').value;");
+ public String getTestUrl() {
+ return "/faces/pages/inplaceSelect/inplaceSelectTest.xhtml";
}
- public String getTestUrl() {
- return "/faces/pages/inplaceSelect/inplaceSelectTest.xhtml";
- }
-
}
Show replies by date