Author: konstantin.mishin
Date: 2009-02-25 10:58:25 -0500 (Wed, 25 Feb 2009)
New Revision: 12742
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
Log:
RF-6185
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java 2009-02-25
14:55:13 UTC (rev 12741)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java 2009-02-25
15:58:25 UTC (rev 12742)
@@ -82,6 +82,7 @@
private int rows;
private String trace;
private Set<Integer> ajaxKeys;
+ private Boolean rendered;
public A4JRepeatTestBean() {
init();
@@ -100,6 +101,7 @@
ajaxKeys.add(i);
}
}
+ rendered = true;
}
public void submit(ActionEvent event) {
@@ -166,4 +168,12 @@
};
}
+
+ public void setRendered(Boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public Boolean getRendered() {
+ return rendered;
+ }
}
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java 2009-02-25
14:55:13 UTC (rev 12741)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxRepeatTest.java 2009-02-25
15:58:25 UTC (rev 12742)
@@ -37,6 +37,8 @@
private String rows;
+ private String rendered;
+
private String panelGroup;
private String repeat;
@@ -51,6 +53,7 @@
renderPage(null, template, "#{a4jRepeatBean.init}");
String attrForm = getParentId() + "attrForm";
rows = attrForm + ":rows";
+ rendered = attrForm + ":rendered";
String mainForm = getParentId() + "mainForm";
panelGroup = mainForm + ":panelGroup";
repeat = mainForm + ":repeat";
@@ -162,6 +165,17 @@
}
}
+ /**
+ * component with rendered = false is not present on the page
+ */
+ @Test
+ public void testRendered(Template template) {
+ init(template);
+ Assert.assertFalse(selenium.getXpathCount("id('"+ panelGroup +
"')/div").intValue() == 0);
+ clickAjaxCommandAndWait(rendered);
+ Assert.assertTrue(selenium.getXpathCount("id('"+ panelGroup +
"')/div").intValue() == 0);
+ }
+
@Override
public String getTestUrl() {
return "pages/ajaxRepeat/ajaxRepeatTest.xhtml";
Show replies by date