Author: ppitonak(a)redhat.com
Date: 2010-12-02 08:25:54 -0500 (Thu, 02 Dec 2010)
New Revision: 20304
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
Log:
https://jira.jboss.org/browse/RFPL-875
* added buttons for switching tabs
* added a test for attribute name
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml 2010-12-02
13:20:26 UTC (rev 20303)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml 2010-12-02
13:25:54 UTC (rev 20304)
@@ -94,6 +94,25 @@
</rich:tab>
</rich:tabPanel>
+ <br/><br/>
+
+ <h:commandButton id="firstTabButton" value="First
tab">
+ <rich:toggleControl targetPanel="tabPanel"
targetItem="@first" />
+ </h:commandButton>
+ <h:commandButton id="prevTabButton" value="Previous
tab">
+ <rich:toggleControl targetPanel="tabPanel"
targetItem="@prev" />
+ </h:commandButton>
+ <h:commandButton id="nextTabButton" value="Next
tab">
+ <rich:toggleControl targetPanel="tabPanel"
targetItem="@next" />
+ </h:commandButton>
+ <h:commandButton id="lastTabButton" value="Last
tab">
+ <rich:toggleControl targetPanel="tabPanel"
targetItem="@last" />
+ </h:commandButton>
+ <h:commandButton id="customTabButton" value="Custon tab
(#{richTabBean.attributes['name'].value})">
+ <rich:toggleControl targetPanel="tabPanel"
targetItem="#{richTabBean.attributes['name'].value}" />
+ </h:commandButton>
+
+
</ui:define>
<ui:define name="outOfTemplateAfter">
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2010-12-02
13:20:26 UTC (rev 20303)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2010-12-02
13:25:54 UTC (rev 20304)
@@ -223,6 +223,18 @@
}
@Test
+ public void testName() {
+ selenium.type(pjq("input[type=text][id$=nameInput]"),
"metamer");
+ selenium.waitForPageToLoad();
+
+ selenium.click(pjq("input[id$=lastTabButton]"));
+ waitGui.failWith("Item 3 was not
displayed.").until(isDisplayed.locator(itemContents[4]));
+
+ selenium.click(pjq("input[id$=customTabButton]"));
+ waitGui.failWith("Item 1 was not
displayed.").until(isDisplayed.locator(itemContents[0]));
+ }
+
+ @Test
public void testOnclick() {
testFireEvent(Event.CLICK, tab);
}