[richfaces-svn-commits] JBoss Rich Faces SVN: r12280 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Wed Jan 14 12:02:51 EST 2009
Author: dsvyatobatsko
Date: 2009-01-14 12:02:51 -0500 (Wed, 14 Jan 2009)
New Revision: 12280
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabFacetTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5559
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabFacetTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabFacetTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
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-14 17:02:00 UTC (rev 12279)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-14 17:02:51 UTC (rev 12280)
@@ -38,8 +38,11 @@
private final static String INIT_AJAX_CORE_TEST = "#{panelBean.initAjaxCoreTest}";
private final static String INIT_IMMEDIATE_TEST = "#{panelBean.initImmediateTest}";
+
private final static String INIT_IMMEDIATE_TEST_URL = "pages/tabPanel/immediateTabPanelTest.xhtml";
+ private final static String TAB_FACET_TEST_URL = "pages/tabPanel/tabFacetTest.xhtml";
+
private static Map<String, String> params = new HashMap<String, String>();
static {
@@ -107,55 +110,65 @@
testListener(parentId);
testSubmissionModes(parentId);
+ }
+ @Test
+ public void testTabFacetsAreEncodedDecodedCorrectly(Template template) {
+ renderPage(TAB_FACET_TEST_URL, template, null);
+ writeStatus("Check tab facets are encoded/decoded correctly");
+
+ String parentId = getParentId();
+
+ AssertTextEquals(parentId + "tab1_lbl", "Facet: tab1", "Facet for the 1st tab is not rendered");
+ AssertTextEquals(parentId + "tab2_lbl", "Facet: tab2", "Facet for the 2nd tab is not rendered");
+ AssertTextEquals(parentId + "tab3_lbl", "Facet: tab3", "Facet for the 3rd tab is not rendered");
+ AssertTextEquals(parentId + "tab4_lbl", "Facet: tab4", "Facet for the 4th tab is not rendered");
}
-
+
@Test
public void testImmediatePanel(Template template) {
renderPage(INIT_IMMEDIATE_TEST_URL, template, INIT_IMMEDIATE_TEST);
String parentId = getParentId();
-
+
String tabId1 = parentId + FORM_ID + "tab1";
String tabId2 = parentId + FORM_ID + "tab2";
String tabId4 = parentId + FORM_ID + "tab4";
String messages = parentId + FORM_ID + "messages";
-
- //immediate = true and external validation failure
-
+
+ // immediate = true and external validation failure
+
AssertPresent(tabId1);
AssertNotPresent(messages);
-
+
AssertNotPresent(tabId2);
AssertNotPresent(tabId4);
-
- //switch to second tab
+
+ // switch to second tab
clickCommandAndWait(tabId2 + "_lbl");
-
- //second tab should to open
+
+ // second tab should to open
AssertNotPresent(messages);
AssertNotPresent(tabId1);
AssertPresent(tabId2);
AssertNotPresent(tabId4);
-
- //immediate = false and external validation failure
+
+ // immediate = false and external validation failure
reset(parentId);
-
+
AssertPresent(tabId1);
AssertNotPresent(messages);
-
+
AssertNotPresent(tabId2);
AssertNotPresent(tabId4);
-
- //switch to second tab
+
+ // switch to second tab
clickCommandAndWait(tabId2 + "_lbl");
-
- //second tab should not to open - validation message should appear
+
+ // second tab should not to open - validation message should appear
AssertPresent(messages);
AssertPresent(tabId1);
AssertNotPresent(tabId2);
AssertNotPresent(tabId4);
-
-
}
private void testListener(String parentId) {
More information about the richfaces-svn-commits
mailing list