Author: abelevich
Date: 2009-03-06 06:17:41 -0500 (Fri, 06 Mar 2009)
New Revision: 12854
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java
Log:
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java 2009-03-06
11:17:17 UTC (rev 12853)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java 2009-03-06
11:17:41 UTC (rev 12854)
@@ -28,6 +28,7 @@
import org.ajax4jsf.template.Template;
import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
import org.testng.annotations.Test;
public class ToggleControlTest extends SeleniumTestBase {
@@ -145,6 +146,24 @@
tester.testNestedActionListener();
}
+ @Test
+ public void testComponentLayout(Template template) {
+ renderPage(template, RESET_METHOD);
+
+ String parentId = getParentId() + "mainForm:";
+ String controlId = parentId + "ajax_next";
+
+ String controlHtml = getHTMLById(controlId);
+ if(!"Ajax next".equals(controlHtml)){
+ Assert.fail("toggle control should be output as link with text defined as value
attribute");
+ }
+
+ int i =
selenium.getXpathCount("//a[(a)id='"+controlId+"']").intValue();
+ if (i != 1) {
+ Assert.fail("toggle control should be rendered as <a> tag");
+ }
+ }
+
@Override
public void sendAjax() {
clickAjaxCommandAndWait(getAutoTester(this).getClientId(AutoTester.COMPONENT_ID));
Show replies by date