Thursday, 20 November
2008
Thu, 20 Nov
'08
4:44 a.m.
Author: andrei_exadel
Date: 2008-11-20 05:44:45 -0500 (Thu, 20 Nov 2008)
New Revision: 11259
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/effect/effectTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/EffectTest.java
Log:
RF-4965
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/effect/effectTest.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/effect/effectTest.xhtml 2008-11-20
10:18:47 UTC (rev 11258)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/effect/effectTest.xhtml 2008-11-20
10:44:45 UTC (rev 11259)
@@ -9,19 +9,27 @@
<ui:composition template="#{templateBean.template}">
<ui:define name="component">
- <input type="button" id="button1" />
- <h:commandButton id="button2"></h:commandButton>
+ <input type="button" id="button1"
value="Button1"/>
+ <h:commandButton id="button2"
value="Button2"></h:commandButton>
+ <h:commandButton id="button3" value="Button3">
+ <rich:effect event="onclick" type="Fade" params="duration:
0"></rich:effect>
+ <rich:effect event="onclick" for="button3"
type="Appear" params="delay: 1"></rich:effect>
+ </h:commandButton>
<br/>
<a href="#" id="hideLink1">Hide Button</a><br/>
+ <a href="#" id="showLink2">Show Command
Button</a><br/>
<a href="#" id="hideLink2">Hide Command Button</a>
<rich:effect for="hideLink1" event="onclick"
type="Fade"
params="targetId: 'button1', duration: 2.0, from: 1.0, to:
0.0"></rich:effect>
<rich:effect for="hideLink2" event="onclick"
type="Fade"
- params="targetId: 'button2', duration: 0, from: 1.0, to:
0.0"></rich:effect>
+ params="targetId: getParentId() + 'button2', duration: 0, from: 1.0, to:
0.0"></rich:effect>
+
+ <rich:effect for="showLink2" event="onclick"
type="Appear"
+ params="targetId: getParentId() + 'button2', duration:
0"></rich:effect>
</ui:define>
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/EffectTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/EffectTest.java 2008-11-20
10:18:47 UTC (rev 11258)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/EffectTest.java 2008-11-20
10:44:45 UTC (rev 11259)
@@ -15,6 +15,33 @@
@Test
+ public void testComponentHideShow(Template template) {
+ renderPage(template);
+ String parentId = getParentId();
+
+ String button2Id = parentId + "button2";
+ String button3Id = parentId + "button3";
+
+ String hideLink2 = "hideLink2";
+ String showLink2 = "showLink2";
+
+ AssertVisible(button2Id);
+ clickById(hideLink2);
+ AssertNotVisible(button2Id, "Command Button has not been hidden by Fade
effect");
+ clickById(showLink2);
+ AssertVisible(button2Id, "Command Button has not been appeared by Fade
effect");
+
+ AssertVisible(button3Id);
+ clickById(button3Id);
+ AssertNotVisible(button3Id, "Command Button has not been hidden by Fade effect
attached to parent");
+
+ pause(1500, button3Id);
+ AssertVisible(button3Id, "Command Button has not been appeared after 1 second
duration by Fade effect attached to parent");
+
+ }
+
+
+ @Test
public void testFadeEffect(Template template) {
renderPage(template);
String parentId = getParentId();
@@ -35,10 +62,10 @@
pause(2000, hideLink1);
- AssertNotVisible(button1Id, "Input button has not been hidden by Fade
effect");
+ AssertNotVisible(button1Id, "Input button has not been hidden by Fade effect or
targetId has not been resolved");
clickById(hideLink2);
- AssertNotVisible(button1Id, "Command Button has not been hidden by Fade
effect");
+ AssertNotVisible(button2Id, "Command Button has not been hidden by Fade effect or
targetId has not been resolved");
}
Show replies by date