Author: andrei_exadel
Date: 2009-01-16 08:37:35 -0500 (Fri, 16 Jan 2009)
New Revision: 12308
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
Log:
RF-5549
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml 2009-01-16
13:37:35 UTC (rev 12308)
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="#{templateBean.autoTestTemplate}">
+ <ui:define name="component">
+ <rich:tabPanel id="componentId"
+ actionListener="#{autoTestBean.actionListener}"
+ switchType="ajax"
+ >
+ <rich:tab id="tab1"
+ label="Tab1"
+ actionListener="#{autoTestBean.actionListener}"
+ immediate="true"
+ reRender="#{autoTestBean.reRender}"
+ >
+ <h:outputText value="Tab1"></h:outputText>
+ </rich:tab>
+ <rich:tab id="tab2"
+ label="Tab2"
+ actionListener="#{autoTestBean.actionListener}"
+ reRender="#{autoTestBean.reRender}"
+ immediate="true">
+ <h:outputText value="Tab2"></h:outputText>
+ </rich:tab>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-16
12:22:51 UTC (rev 12307)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-16
13:37:35 UTC (rev 12308)
@@ -52,6 +52,8 @@
private final static String TAB_FACET_TEST_URL =
"pages/tabPanel/tabFacetTest.xhtml";
private final static String DISABLED_TAB_URL =
"pages/tabPanel/testDisabledTab.xhtml";
+
+ private final static String IMMEDIATE_TAB_URL =
"pages/tabPanel/immediateTabTest.xhtml";
private static Map<String, String> params = new HashMap<String,
String>();
@@ -295,6 +297,24 @@
AssertTextEquals(_inputsId, "{}", "Text for the inputs should not be
applied to model in case of disabled tab");
}
+
+ @Test
+ public void testImmediateTab(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(IMMEDIATE_TAB_URL, template, RESET_METHOD);
+
+ tester.testImmediate();
+
+ }
+
+ @Test
+ public void testImmediateTabWithExternalValidationFailure(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(IMMEDIATE_TAB_URL, template, RESET_METHOD);
+
+ tester.testImmediateWithExternalValidationFailed();
+
+ }
private void testListener(String parentId) {