Author: dsvyatobatsko
Date: 2008-11-27 13:07:04 -0500 (Thu, 27 Nov 2008)
New Revision: 11417
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/tree/favorites.gif
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tree/treeTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java
Log:
https://jira.jboss.org/jira/browse/RF-4818
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/tree/favorites.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/tree/favorites.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tree/treeTest.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java 2008-11-27
17:07:11 UTC (rev 11416)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java 2008-11-27
18:07:04 UTC (rev 11417)
@@ -341,7 +341,7 @@
private void testIcon(String location, String iconSubstring) {
String iconSrc = selenium.getAttribute(location + "/@src");
if (null == iconSrc || !iconSrc.matches(".*" + iconSubstring +
".*")) {
- Assert.fail("It looks as if the icon is not proper. Uri of icon is being
tested must contain [" + iconSubstring + "] icon is expected");
+ Assert.fail("It looks as if the icon is not proper. Uri of icon is being
tested must contain [" + iconSubstring + "]");
}
}
@@ -448,6 +448,21 @@
tester.checkNodeExpandedListener(false);
}
+ @Test
+ public void
testNodePresentationCanBeCustomizedUsingRenderedAndNodeFaceAttributes(Template template)
{
+ renderPage(template, null);
+ writeStatus("Check node presentation can be customized using rendered and
nodeFace attributes");
+
+ String compId = getParentId() + "_form:tree";
+ writeStatus("Bretney is not my favourite singer (I don't even know how
it spells). Check it");
+ testIcon("//*[@id='"+ compId +
":childs']/table[1]/tbody/tr/td[2]/img", "singer");
+ AssertTextEquals("//*[@id='"+ compId +
":childs']/table[1]/tbody/tr/td[3]", "Britney Spears");
+
+ writeStatus("Christina is my favourite one. Test it");
+ testIcon("//*[@id='"+ compId +
":childs']/table[2]/tbody/tr/td[2]/img", "favorite");
+ AssertTextEquals("//*[@id='"+ compId +
":childs']/table[2]/tbody/tr/td[3]", "Christina Aguilera [Oh, Lord!
She's my favorite]");
+ }
+
@Override
public void sendAjax() {
AutoTester tester = getAutoTester(this);