JBoss Rich Faces SVN: r15552 - branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/queue.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2009-09-14 09:05:18 -0400 (Mon, 14 Sep 2009)
New Revision: 15552
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/queue/QueueTestCase.java
Log:
- QueueTestCase - add waiting cycle instead of assertion for case of appearing enqueued item in list
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/queue/QueueTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/queue/QueueTestCase.java 2009-09-14 12:50:37 UTC (rev 15551)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/queue/QueueTestCase.java 2009-09-14 13:05:18 UTC (rev 15552)
@@ -20,9 +20,8 @@
*/
package org.jboss.richfaces.integrationTest.queue;
-import static org.testng.Assert.*;
-
import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
+import org.jboss.test.selenium.waiting.Condition;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -45,17 +44,22 @@
for (int i = 0; i < order.length; i++) {
final String locButtonImage = format(LOC_BUTTON_IMAGE_PREFORMATTED, order[i]);
final String locQueueItem = format(LOC_OUTPUT_QUEUE_ITEM, order[i]);
-
+
selenium.click(locButtonImage);
-
+
scrollIntoView(locButtonImage, true);
waitFor(1000);
scrollIntoView(locQueueItem, false);
-
- assertTrue(selenium.isElementPresent(locQueueItem), format("The enqueued item isn't present '{0}'",
- locQueueItem));
+
+ waitModelUpdate.failWith(format("The enqueued item isn't present '{0}'", locQueueItem)).until(
+ new Condition() {
+
+ public boolean isTrue() {
+ return selenium.isElementPresent(locQueueItem);
+ }
+ });
}
}
15 years, 4 months
JBoss Rich Faces SVN: r15551 - branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/extendedDataTable.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2009-09-14 08:50:37 -0400 (Mon, 14 Sep 2009)
New Revision: 15551
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/extendedDataTable/AbstractExtendedDataTableTestCase.java
Log:
* AbstractExtendedDataTableTestCase - modified waitForSplashScreen - longer wait timeout when waiting for splash screen appears - now period defined in waitModelUpdate (10s)
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/extendedDataTable/AbstractExtendedDataTableTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/extendedDataTable/AbstractExtendedDataTableTestCase.java 2009-09-14 12:06:09 UTC (rev 15550)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/extendedDataTable/AbstractExtendedDataTableTestCase.java 2009-09-14 12:50:37 UTC (rev 15551)
@@ -52,7 +52,7 @@
* Wait for splash screen indicating request of table rerendering disappears
*/
protected void waitForSplash() {
- Wait.dontFail().interval(5).timeout(2000).until(new Condition() {
+ waitModelUpdate.interval(5).until(new Condition() {
public boolean isTrue() {
return selenium.isElementPresent(LOC_DIV_SPLASH_SCREEN);
}
15 years, 4 months
JBoss Rich Faces SVN: r15550 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test: java/org/jboss/richfaces/integrationTest/separator and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2009-09-14 08:06:09 -0400 (Mon, 14 Sep 2009)
New Revision: 15550
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/progressBar/ProgressBarTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/separator/SeparatorTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/messages.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/messages.properties
Log:
* SeparatorTestCase and ProgressBarTestCase refactored
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/progressBar/ProgressBarTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/progressBar/ProgressBarTestCase.java 2009-09-14 09:45:52 UTC (rev 15549)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/progressBar/ProgressBarTestCase.java 2009-09-14 12:06:09 UTC (rev 15550)
@@ -1,6 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
package org.jboss.richfaces.integrationTest.progressBar;
-import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
@@ -16,185 +37,136 @@
*/
public class ProgressBarTestCase extends AbstractSeleniumRichfacesTestCase {
- // messages
- private final String MSG_COMPONENT_DESCRIPTION = getMess("COMPONENT_DESCRIPTION");
- private final String MSG_BUTTON_SHOULD_BE_PRESENT = getMess("BUTTON_SHOULD_BE_PRESENT");
- private final String MSG_BUTTON_SHOULD_NOT_BE_PRESENT = getMess("BUTTON_SHOULD_NOT_BE_PRESENT");
- private final String MSG_FIRST_PROGRESS_BAR_LABEL = getMess("FIRST_PROGRESS_BAR_LABEL");
- private final String MSG_SECOND_PROGRESS_BAR_UPLOAD = getMess("SECOND_PROGRESS_BAR_UPLOAD");
- private final String MSG_SECOND_PB_INITIAL_LABEL_SHOULD_BE_VISIBLE = getMess("SECOND_PB_INITIAL_LABEL_SHOULD_BE_VISIBLE");
- private final String MSG_SECOND_PB_INITIAL_LABEL_SHOULD_NOT_BE_VISIBLE = getMess("SECOND_PB_INITIAL_LABEL_SHOULD_NOT_BE_VISIBLE");
- private final String MSG_SECOND_PB_FINISHED_LABEL_SHOULD_BE_VISIBLE = getMess("SECOND_PB_FINISHED_LABEL_SHOULD_BE_VISIBLE");
- private final String MSG_SECOND_PB_FINISHED_LABEL_SHOULD_NOT_BE_VISIBLE = getMess("SECOND_PB_FINISHED_LABEL_SHOULD_NOT_BE_VISIBLE");
+ // locators
+ private final String LOC_EXAMPLE_1_HEADER = getLoc("EXAMPLE_1_HEADER");
+ private final String LOC_EXAMPLE_2_HEADER = getLoc("EXAMPLE_2_HEADER");
+ private final String LOC_FIRST_BUTTON = getLoc("FIRST_BUTTON");
+ private final String LOC_FIRST_PROGRESS_BAR_STYLE = getLoc("FIRST_PROGRESS_BAR_STYLE");
+ private final String LOC_SECOND_BUTTON = getLoc("SECOND_BUTTON");
+ private final String LOC_SECOND_LABEL_FINISHED = getLoc("SECOND_LABEL_FINISHED");
+ private final String LOC_SECOND_LABEL_INITIAL = getLoc("SECOND_LABEL_INITIAL");
+ private final String LOC_SECOND_PROGRESS_BAR_STYLE = getLoc("SECOND_PROGRESS_BAR_STYLE");
- // locators
- private final String LOC_EXAMPLE_1_HEADER = getLoc("EXAMPLE_1_HEADER");
- private final String LOC_EXAMPLE_2_HEADER = getLoc("EXAMPLE_2_HEADER");
- private final String LOC_FIRST_BUTTON = getLoc("FIRST_BUTTON");
- private final String LOC_FIRST_PROGRESS_BAR_LABEL = getLoc("FIRST_PROGRESS_BAR_LABEL");
- private final String LOC_FIRST_PROGRESS_BAR_STYLE = getLoc("FIRST_PROGRESS_BAR_STYLE");
- private final String LOC_SECOND_BUTTON = getLoc("SECOND_BUTTON");
- private final String LOC_SECOND_LABEL_FINISHED = getLoc("SECOND_LABEL_FINISHED");
- private final String LOC_SECOND_LABEL_INITIAL = getLoc("SECOND_LABEL_INITIAL");
- private final String LOC_SECOND_PROGRESS_BAR_STYLE = getLoc("SECOND_PROGRESS_BAR_STYLE");
+ /**
+ * Tests the first example. It checks that the button is visible and then it
+ * click on the button. The process starts and the test checks 3 times that
+ * the label of the progress bar and its "width" attribute equal.
+ */
+ @Test
+ public void testFirstExample() {
+ scrollIntoView(LOC_EXAMPLE_1_HEADER, true);
- /**
- * Tests the first example. It checks that the button is visible and then it
- * click on the button. The process starts and the test checks 3 times that
- * the label of the progress bar and its "width" attribute equal.
- */
- @Test
- public void testFirstExample() {
- scrollIntoView(LOC_EXAMPLE_1_HEADER, true);
+ boolean present = selenium.isElementPresent(LOC_FIRST_BUTTON);
+ assertTrue(present, "Button should be present on the page.");
- boolean present = selenium.isElementPresent(LOC_FIRST_BUTTON);
- assertTrue(present, MSG_BUTTON_SHOULD_BE_PRESENT);
+ selenium.click(LOC_FIRST_BUTTON);
- selenium.click(LOC_FIRST_BUTTON);
+ waitFor(500);
+ present = selenium.isElementPresent(LOC_FIRST_BUTTON);
+ assertFalse(present, "Button \"Restart Process\" should not be present on the page.");
- waitFor(500);
- present = selenium.isElementPresent(LOC_FIRST_BUTTON);
- assertFalse(present, MSG_BUTTON_SHOULD_NOT_BE_PRESENT);
+ int value1 = 0;
+ int value2 = 0;
- int value1 = 0;
- int value2 = 0;
+ for (int i = 0; i < 6; i++) {
+ waitFor(2000);
+ value2 = value1;
+ value1 = (int) Double.parseDouble(getStyle(LOC_FIRST_PROGRESS_BAR_STYLE, "width").replace("px", ""));
+ assertTrue(value1 > value2, "Progress bar should move to the right.");
+ }
+ }
- for (int i = 0; i < 4; i++) {
- value1 = getValue(LOC_FIRST_PROGRESS_BAR_STYLE);
- value2 = Integer.parseInt(selenium.getText(
- LOC_FIRST_PROGRESS_BAR_LABEL).replace(" %", ""));
- assertEquals(value1, value2, MSG_FIRST_PROGRESS_BAR_LABEL);
- waitFor(6000);
- }
- }
+ /**
+ * Tests the second example. First it checks the displayed label. Then it
+ * clicks on the button and verifies several times that the progress bar is
+ * moving right. Then it waits for process to finish and checks that a label
+ * was displayed.
+ */
+ @Test
+ public void testSecondExample() {
+ scrollIntoView(LOC_EXAMPLE_2_HEADER, true);
- /**
- * Tests the second example. First it checks the displayed label. Then it
- * clicks on the button and verifies several times that the progress bar is
- * moving right. Then it waits for process to finish and checks that a label
- * was displayed.
- */
- @Test
- public void testSecondExample() {
- scrollIntoView(LOC_EXAMPLE_2_HEADER, true);
+ assertTrue(isDisplayed(LOC_SECOND_LABEL_INITIAL), "Initial label should be visible.");
+ assertFalse(isDisplayed(LOC_SECOND_LABEL_FINISHED), "Finished label should not be visible.");
- String text = null;
- try {
- text = selenium.getAttribute(LOC_SECOND_LABEL_INITIAL + "@style");
- assertTrue(!text.contains("display: none;"),
- MSG_SECOND_PB_INITIAL_LABEL_SHOULD_BE_VISIBLE);
- } catch (Exception e) {
- // OK -- there is no style attribute
- }
- text = selenium.getAttribute(LOC_SECOND_LABEL_FINISHED + "@style");
- assertFalse(!text.contains("display: none;"),
- MSG_SECOND_PB_FINISHED_LABEL_SHOULD_NOT_BE_VISIBLE);
+ selenium.click(LOC_SECOND_BUTTON);
- selenium.click(LOC_SECOND_BUTTON);
+ int current = 0;
+ int previous = 0;
+ waitFor(2200);
- int current = 0;
- int previous = 0;
- waitFor(2200);
+ for (int i = 0; i < 10; i++) {
+ waitFor(2000);
+ current = (int) Double.parseDouble(getStyle(LOC_SECOND_PROGRESS_BAR_STYLE, "width").replace("px", ""));
+ assertTrue(current >= previous, "Progress of the progress bar -- the current value should be greater then the one 2 seconds ago.");
+ previous = current;
+ }
- for (int i = 0; i < 10; i++) {
- waitFor(2000);
- current = getValue(LOC_SECOND_PROGRESS_BAR_STYLE);
- assertTrue(current >= previous, MSG_SECOND_PROGRESS_BAR_UPLOAD);
- previous = current;
- }
+ waitFor(82000);
- waitFor(82000);
+ assertFalse(isDisplayed(LOC_SECOND_LABEL_INITIAL), "Initial label should not be visible.");
+ assertTrue(isDisplayed(LOC_SECOND_LABEL_FINISHED), "Finished label should be visible.");
+ }
- text = selenium.getAttribute(LOC_SECOND_LABEL_INITIAL + "@style");
- assertFalse(!text.contains("display: none;"),
- MSG_SECOND_PB_INITIAL_LABEL_SHOULD_NOT_BE_VISIBLE);
- try {
- text = selenium.getAttribute(LOC_SECOND_LABEL_FINISHED + "@style");
- assertTrue(!text.contains("display: none;"),
- MSG_SECOND_PB_FINISHED_LABEL_SHOULD_BE_VISIBLE);
- } catch (Exception e) {
- // OK -- there is no style attribute
- }
+ /**
+ * Tests the "View Source" in the first example. It checks that the source
+ * code is not visible, clicks on the link, and checks 7 lines of source
+ * code.
+ */
+ @Test
+ public void testFirstExampleSource() {
+ String[] strings = new String[] { "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
+ "<a4j:outputPanel id=\"progressPanel\">",
+ "<rich:progressBar value=\"#{progressBarBean.currentValue}\"",
+ "interval=\"2000\" label=\"#{progressBarBean.currentValue} %\"",
+ "enabled=\"#{progressBarBean.enabled}\" minValue=\"-1\" maxValue=\"100\"",
+ "reRenderAfterComplete=\"progressPanel\">",
+ "<a4j:commandButton action=\"#{progressBarBean.startProcess}\"", };
- }
+ abstractTestSource(1, "View Source", strings);
+ }
- /**
- * Tests the "View Source" in the first example. It checks that the source
- * code is not visible, clicks on the link, and checks 7 lines of source
- * code.
- */
- @Test
- public void testFirstExampleSource() {
- String[] strings = new String[] {
- "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
- "<a4j:outputPanel id=\"progressPanel\">",
- "<rich:progressBar value=\"#{progressBarBean.currentValue}\"",
- "interval=\"2000\" label=\"#{progressBarBean.currentValue} %\"",
- "enabled=\"#{progressBarBean.enabled}\" minValue=\"-1\" maxValue=\"100\"",
- "reRenderAfterComplete=\"progressPanel\">",
- "<a4j:commandButton action=\"#{progressBarBean.startProcess}\"", };
+ /**
+ * Tests the "View Java Bean Source" in the first example. It checks that
+ * the source code is not visible, clicks on the link, and checks 7 lines of
+ * source code.
+ */
+ @Test
+ public void testFirstExampleBeanSource() {
+ String[] strings = new String[] { "package org.richfaces.demo.progressBar;", "public class ProgressBarBean {",
+ "private boolean buttonRendered = true;", "setStartTime(new Date().getTime());",
+ "Long current = (new Date().getTime() - startTime)/1000;", "public void setEnabled(boolean enabled) {",
+ "this.buttonRendered = buttonRendered;", };
- abstractTestSource(1, "View Source", strings);
- }
+ abstractTestSource(1, "View Java Bean Source", strings);
+ }
- /**
- * Tests the "View Java Bean Source" in the first example. It checks that
- * the source code is not visible, clicks on the link, and checks 7 lines of
- * source code.
- */
- @Test
- public void testFirstExampleBeanSource() {
- String[] strings = new String[] {
- "package org.richfaces.demo.progressBar;",
- "public class ProgressBarBean {",
- "private boolean buttonRendered = true;",
- "setStartTime(new Date().getTime());",
- "Long current = (new Date().getTime() - startTime)/1000;",
- "public void setEnabled(boolean enabled) {",
- "this.buttonRendered = buttonRendered;", };
+ /**
+ * Tests the "View Source" in the second example. It checks that the source
+ * code is not visible, clicks on the link, and checks 7 lines of source
+ * code.
+ */
+ @Test
+ public void testSecondExampleSource() {
+ String[] strings = new String[] {
+ "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
+ "$('form:progressBar').component.setValue(counter*5);",
+ "document.getElementById('button').disabled=false;",
+ "<h:form id=\"form\">",
+ "</f:facet>",
+ "</rich:progressBar>",
+ "<rich:progressBar mode=\"client\" id=\"progressBar\">",
+ "<button type=\"button\" onclick=\"startProgress();\" style=\"margin: 9px 0px 5px;\" id=\"button\">Start Progress</button>", };
- abstractTestSource(1, "View Java Bean Source", strings);
- }
+ abstractTestSource(2, "View Source", strings);
+ }
- /**
- * Tests the "View Source" in the second example. It checks that the source
- * code is not visible, clicks on the link, and checks 7 lines of source
- * code.
- */
- @Test
- public void testSecondExampleSource() {
- String[] strings = new String[] {
- "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
- "$('form:progressBar').component.setValue(counter*5);",
- "document.getElementById('button').disabled=false;",
- "<h:form id=\"form\">",
- "</f:facet>",
- "</rich:progressBar>",
- "<rich:progressBar mode=\"client\" id=\"progressBar\">",
- "<button type=\"button\" onclick=\"startProgress();\" style=\"margin: 9px 0px 5px;\" id=\"button\">Start Progress</button>", };
-
- abstractTestSource(2, "View Source", strings);
- }
-
- /**
- * Returns the value of progress bar from the style attribute.
- *
- * @param locator
- * locator of the style attribute
- * @return the value of the attribute style (%)
- */
- private int getValue(String locator) {
- String attr = selenium.getAttribute(locator);
- attr = attr.substring(attr.indexOf("width"));
- attr = attr.substring(7, attr.indexOf("%;"));
- return (int) Double.parseDouble(attr);
- }
-
- /**
- * Loads the page containing the component.
- */
- @BeforeMethod
- private void loadPage() {
- super.loadPage("richOutputs", 6, 1, MSG_COMPONENT_DESCRIPTION);
- }
+ /**
+ * Loads the page containing the component.
+ */
+ @SuppressWarnings("unused")
+ @BeforeMethod
+ private void loadPage() {
+ openComponent("Progress Bar");
+ }
}
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/separator/SeparatorTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/separator/SeparatorTestCase.java 2009-09-14 09:45:52 UTC (rev 15549)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/separator/SeparatorTestCase.java 2009-09-14 12:06:09 UTC (rev 15550)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
package org.jboss.richfaces.integrationTest.separator;
import static org.testng.Assert.assertEquals;
@@ -4,7 +26,6 @@
import static org.testng.Assert.fail;
import java.io.IOException;
-import java.security.NoSuchAlgorithmException;
import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
import org.jboss.test.selenium.utils.URLUtils;
@@ -19,156 +40,153 @@
*/
public class SeparatorTestCase extends AbstractSeleniumRichfacesTestCase {
- // messages
- private final String MSG_COMPONENT_DESCRIPTION = getMess("COMPONENT_DESCRIPTION");
- private final String MSG_HEIGHT_OF_SEPARATOR = getMess("HEIGHT_OF_SEPARATOR");
- private final String MSG_WIDTH_OF_SEPARATOR = getMess("WIDTH_OF_SEPARATOR");
- private final String MSG_HASH_CODE = getMess("HASH_CODE");
+ // messages
+ private final String MSG_FIRST_HEIGHT = getMsg("FIRST_HEIGHT");
+ private final String MSG_FIRST_HASH = getMsg("FIRST_HASH");
+ private final String MSG_SECOND_HEIGHT = getMsg("SECOND_HEIGHT");
+ private final String MSG_SECOND_HASH = getMsg("SECOND_HASH");
+ private final String MSG_THIRD_HEIGHT = getMsg("THIRD_HEIGHT");
+ private final String MSG_THIRD_HASH = getMsg("THIRD_HASH");
+ private final String MSG_FOURTH_HEIGHT = getMsg("FOURTH_HEIGHT");
+ private final String MSG_FOURTH_HASH = getMsg("FOURTH_HASH");
+ private final String MSG_FIFTH_HEIGHT = getMsg("FIFTH_HEIGHT");
+ private final String MSG_FIFTH_HASH = getMsg("FIFTH_HASH");
+ private final String MSG_SIXTH_HEIGHT = getMsg("SIXTH_HEIGHT");
+ private final String MSG_SIXTH_HASH = getMsg("SIXTH_HASH");
- // locators
- private final String LOC_EXAMPLE_HEADER = getLoc("EXAMPLE_HEADER");
- private final String LOC_SEPARATOR_N = getLoc("SEPARATOR_N");
+ // locators
+ private final String LOC_EXAMPLE_HEADER = getLoc("EXAMPLE_HEADER");
+ private final String LOC_SEPARATOR_N = getLoc("SEPARATOR_N");
- /**
- * Tests the first separator. It checks both height of the separator and
- * hash code of the image used in separator.
- */
- @Test
- public void testFirstSeparator() {
- String text = getStyle(String.format(LOC_SEPARATOR_N, 1), "height");
- assertEquals(text, "6px", MSG_HEIGHT_OF_SEPARATOR);
+ /**
+ * Tests the first separator. It checks both height of the separator and
+ * hash code of the image used in separator.
+ */
+ @Test
+ public void testFirstSeparator() {
+ String text = getStyle(format(LOC_SEPARATOR_N, 1), "height");
+ assertEquals(text, MSG_FIRST_HEIGHT, "Height of the separator.");
- text = getSeparatorHash(String.format(LOC_SEPARATOR_N, 1) + "@style");
- assertEquals(text, "c8568515d1a22227648977798c87cfb0", MSG_HASH_CODE);
- }
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 1));
+ assertEquals(text, MSG_FIRST_HASH, "Hash code of the image that makes the separator.");
+ }
- /**
- * Tests the second separator. It checks height of the separator, width of
- * the separator, and hash code of the image used in separator.
- */
- @Test
- public void testSecondSeparator() {
- String text = getStyle(String.format(LOC_SEPARATOR_N, 2), "height");
- assertEquals(text, "8px", MSG_HEIGHT_OF_SEPARATOR);
+ /**
+ * Tests the second separator. It checks height of the separator, width of
+ * the separator, and hash code of the image used in separator.
+ */
+ @Test
+ public void testSecondSeparator() {
+ String text = getStyle(format(LOC_SEPARATOR_N, 2), "height");
+ assertEquals(text, MSG_SECOND_HEIGHT, "Height of the separator.");
- double widthFull = Double.parseDouble(getStyle(
- String.format(LOC_SEPARATOR_N, 1), "width").replace("px", ""));
- double width75 = Double.parseDouble(getStyle(
- String.format(LOC_SEPARATOR_N, 2), "width").replace("px", ""));
+ double widthFull = Double.parseDouble(getStyle(format(LOC_SEPARATOR_N, 1), "width").replace("px", ""));
+ double width75 = Double.parseDouble(getStyle(format(LOC_SEPARATOR_N, 2), "width").replace("px", ""));
- assertEquals(width75, widthFull * 0.75, MSG_WIDTH_OF_SEPARATOR);
+ assertEquals(width75, widthFull * 0.75, "Width of the separator.");
- text = getSeparatorHash(String.format(LOC_SEPARATOR_N, 2) + "@style");
- assertEquals(text, "350f395b0570f1c1cb528ef18299dd5d", MSG_HASH_CODE);
- }
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 2));
+ assertEquals(text, MSG_SECOND_HASH, "Hash code of the image that makes the separator.");
+ }
- /**
- * Tests the third separator. It checks both height of the separator and
- * hash code of the image used in separator.
- */
- @Test
- public void testThirdSeparator() {
- String text = getStyle(String.format(LOC_SEPARATOR_N, 3), "height");
- assertEquals(text, "2px", MSG_HEIGHT_OF_SEPARATOR);
+ /**
+ * Tests the third separator. It checks both height of the separator and
+ * hash code of the image used in separator.
+ */
+ @Test
+ public void testThirdSeparator() {
+ String text = getStyle(format(LOC_SEPARATOR_N, 3), "height");
+ assertEquals(text, MSG_THIRD_HEIGHT, "Height of the separator.");
- // FIXME the hash code is not valid
- // text = getSeparatorHash(String.format(LOC_SEPARATOR_N, 3) +
- // "@style");
- // assertEquals(text, "0bf81058de26083a10657f2db675e3ea",
- // MSG_HASH_CODE);
- }
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 3));
+ assertEquals(text, MSG_THIRD_HASH, "Hash code of the image that makes the separator.");
+ }
- /**
- * Tests the fourth separator. It checks both height of the separator and
- * hash code of the image used in separator.
- */
- @Test
- public void testFourthSeparator() {
- String text = getStyle(String.format(LOC_SEPARATOR_N, 4), "height");
- assertEquals(text, "2px", MSG_HEIGHT_OF_SEPARATOR);
+ /**
+ * Tests the fourth separator. It checks both height of the separator and
+ * hash code of the image used in separator.
+ */
+ @Test
+ public void testFourthSeparator() {
+ String text = getStyle(format(LOC_SEPARATOR_N, 4), "height");
+ assertEquals(text, MSG_FOURTH_HEIGHT, "Height of the separator.");
- text = getSeparatorHash(String.format(LOC_SEPARATOR_N, 4) + "@style");
- assertEquals(text, "94779ca2ce53f57796d3704454cabb2f", MSG_HASH_CODE);
- }
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 4));
+ assertEquals(text, MSG_FOURTH_HASH, "Hash code of the image that makes the separator.");
+ }
- /**
- * Tests the fifth separator. It checks both height of the separator and
- * hash code of the image used in separator.
- */
- @Test
- public void testFifthSeparator() {
- String text = getStyle(String.format(LOC_SEPARATOR_N, 5), "height");
- assertEquals(text, "4px", MSG_HEIGHT_OF_SEPARATOR);
+ /**
+ * Tests the fifth separator. It checks both height of the separator and
+ * hash code of the image used in separator.
+ */
+ @Test
+ public void testFifthSeparator() {
+ String text = getStyle(format(LOC_SEPARATOR_N, 5), "height");
+ assertEquals(text, MSG_FIFTH_HEIGHT, "Height of the separator.");
- text = getSeparatorHash(String.format(LOC_SEPARATOR_N, 5) + "@style");
- assertEquals(text, "14c1dfe353747b738a586a51070f631a", MSG_HASH_CODE);
- }
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 5));
+ assertEquals(text, MSG_FIFTH_HASH, "Hash code of the image that makes the separator.");
+ }
- /**
- * Tests the sixth separator. It checks both height of the separator and
- * hash code of the image used in separator.
- */
- @Test
- public void testSixthSeparator() {
- String text = getStyle(String.format(LOC_SEPARATOR_N, 6), "height");
- assertEquals(text, "2px", MSG_HEIGHT_OF_SEPARATOR);
+ /**
+ * Tests the sixth separator. It checks both height of the separator and
+ * hash code of the image used in separator.
+ */
+ @Test
+ public void testSixthSeparator() {
+ String text = getStyle(format(LOC_SEPARATOR_N, 6), "height");
+ assertEquals(text, MSG_SIXTH_HEIGHT, "Height of the separator.");
- text = getSeparatorHash(String.format(LOC_SEPARATOR_N, 6) + "@style");
- assertEquals(text, "6ab8ba31211c2a0ecbbeff9cc61bc950", MSG_HASH_CODE);
- }
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 6));
+ assertEquals(text, MSG_SIXTH_HASH, "Hash code of the image that makes the separator.");
+ }
- /**
- * Tests the "View Source" in the example. It checks that the source code is
- * not visible, clicks on the link, and checks 7 lines of source code.
- */
- @Test
- public void testFirstExampleSource() {
- String[] strings = new String[] {
- "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
- "<rich:separator/>",
- "<rich:separator lineType=\"beveled\" height=\"8\" width=\"75%\" align=\"center\"/>",
- "<rich:separator height=\"2\" lineType=\"dotted\"/><br/>",
- "<rich:separator height=\"2\" lineType=\"dashed\"/><br/>",
- "<rich:separator height=\"4\" lineType=\"double\"/><br/>",
- "<rich:separator height=\"2\" lineType=\"solid\"/><br/>", };
+ /**
+ * Tests the "View Source" in the example. It checks that the source code is
+ * not visible, clicks on the link, and checks 7 lines of source code.
+ */
+ @Test
+ public void testFirstExampleSource() {
+ String[] strings = new String[] { "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
+ "<rich:separator/>",
+ "<rich:separator lineType=\"beveled\" height=\"8\" width=\"75%\" align=\"center\"/>",
+ "<rich:separator height=\"2\" lineType=\"dotted\"/><br/>",
+ "<rich:separator height=\"2\" lineType=\"dashed\"/><br/>",
+ "<rich:separator height=\"4\" lineType=\"double\"/><br/>",
+ "<rich:separator height=\"2\" lineType=\"solid\"/><br/>", };
- abstractTestSource(1, "View Source", strings);
- }
+ abstractTestSource(1, "View Source", strings);
+ }
- /**
- * Returns hash code of the separator's image.
- *
- * @param locator
- * style attribute of the separator
- */
- private String getSeparatorHash(String locator) {
- // create URL of the image
- String tmp = selenium.getAttribute(locator);
+ /**
+ * Returns hash code of the separator's image.
+ *
+ * @param locator
+ * style attribute of the separator
+ */
+ private String getSeparatorHash(String locator) {
+ // create URL of the image
+ String url = getStyle(locator, "background-image");
+ url = url.replace("url(", "").replace(")", "");
- int index = tmp.indexOf("background-image:");
- tmp = tmp.substring(index + 22);
- tmp = tmp.substring(0, tmp.indexOf(");"));
+ String hash = null;
+ try {
+ hash = URLUtils.resourceMd5Digest(url);
+ } catch (IOException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
- index = selenium.getLocation().indexOf('/', 7);
- String url = selenium.getLocation().substring(0, index);
- url += tmp;
+ return hash;
+ }
- try {
- tmp = URLUtils.resourceMd5Digest(url);
- } catch (IOException e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
-
- return tmp;
- }
-
- /**
- * Loads the page containing the component.
- */
- @BeforeMethod
- private void loadPage() {
- super.loadPage("richOutputs", 7, 1, MSG_COMPONENT_DESCRIPTION);
- scrollIntoView(LOC_EXAMPLE_HEADER, true);
- }
+ /**
+ * Loads the page containing the component.
+ */
+ @SuppressWarnings("unused")
+ @BeforeMethod
+ private void loadPage() {
+ openComponent("Separator");
+ scrollIntoView(LOC_EXAMPLE_HEADER, true);
+ }
}
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/locators.properties 2009-09-14 09:45:52 UTC (rev 15549)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/locators.properties 2009-09-14 12:06:09 UTC (rev 15550)
@@ -2,13 +2,12 @@
EXAMPLE_2_HEADER=//fieldset[2]/legend
FIRST_BUTTON=//fieldset[1]/div/form/span/div/input
-FIRST_PROGRESS_BAR_LABEL=//fieldset[1]/div/form/span/div/div[2]
-FIRST_PROGRESS_BAR_STYLE=//fieldset[1]/div/form/span/div/div[2]@style
+FIRST_PROGRESS_BAR_STYLE=//fieldset[1]/div/form/span/div/div[2]
SECOND_BUTTON=//button[@id='button']
SECOND_LABEL_FINISHED=//fieldset[2]/div/form/div/div[3]
SECOND_LABEL_INITIAL=//fieldset[2]/div/form/div/div[1]
-SECOND_PROGRESS_BAR_STYLE=//fieldset[2]/div/form/div/div[2]/div@style
+SECOND_PROGRESS_BAR_STYLE=//fieldset[2]/div/form/div/div[2]/div
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/messages.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/messages.properties 2009-09-14 09:45:52 UTC (rev 15549)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/messages.properties 2009-09-14 12:06:09 UTC (rev 15550)
@@ -1,11 +0,0 @@
-COMPONENT_DESCRIPTION=rich:progressBar is a component which could be used to display progress of any client or server side process.
-
-BUTTON_SHOULD_BE_PRESENT=Button should be present on the page.
-BUTTON_SHOULD_NOT_BE_PRESENT=Button "Restart Process" should not be present on the page.
-FIRST_PROGRESS_BAR_LABEL=The value in the label and real value should equal.
-
-SECOND_PROGRESS_BAR_UPLOAD=Progress of the progress bar -- the current value should be greater then the one 2 seconds ago.
-SECOND_PB_INITIAL_LABEL_SHOULD_BE_VISIBLE=Initial label should be visible.
-SECOND_PB_INITIAL_LABEL_SHOULD_NOT_BE_VISIBLE=Initial label should not be visible.
-SECOND_PB_FINISHED_LABEL_SHOULD_BE_VISIBLE=Finished label should be visible.
-SECOND_PB_FINISHED_LABEL_SHOULD_NOT_BE_VISIBLE=Finished label should not be visible.
\ No newline at end of file
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/locators.properties 2009-09-14 09:45:52 UTC (rev 15549)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/locators.properties 2009-09-14 12:06:09 UTC (rev 15550)
@@ -1,5 +1,5 @@
EXAMPLE_HEADER=//fieldset/legend
-SEPARATOR_N=//fieldset/div/div[%d]/div
+SEPARATOR_N=//fieldset/div/div[{0}]/div
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/messages.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/messages.properties 2009-09-14 09:45:52 UTC (rev 15549)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/messages.properties 2009-09-14 12:06:09 UTC (rev 15550)
@@ -1,4 +1,18 @@
-COMPONENT_DESCRIPTION= Separator is used to draw a horizontal line on a page.
-HEIGHT_OF_SEPARATOR=Height of the separator.
-WIDTH_OF_SEPARATOR=Width of the separator.
-HASH_CODE=Hash code of the image that makes the separator.
+FIRST_HEIGHT=6px
+FIRST_HASH=c8568515d1a22227648977798c87cfb0
+
+SECOND_HEIGHT=8px
+SECOND_HASH=350f395b0570f1c1cb528ef18299dd5d
+
+THIRD_HEIGHT=2px
+THIRD_HASH=bf81058de26083a10657f2db675e3ea
+
+FOURTH_HEIGHT=2px
+FOURTH_HASH=94779ca2ce53f57796d3704454cabb2f
+
+FIFTH_HEIGHT=4px
+FIFTH_HASH=14c1dfe353747b738a586a51070f631a
+
+SIXTH_HEIGHT=2px
+SIXTH_HASH=6ab8ba31211c2a0ecbbeff9cc61bc950
+
15 years, 4 months
JBoss Rich Faces SVN: r15549 - branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-09-14 05:45:52 -0400 (Mon, 14 Sep 2009)
New Revision: 15549
Modified:
branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java
Log:
Investigate and fix photoalbum tests
https://jira.jboss.org/jira/browse/RFPL-86
Modified: branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java 2009-09-13 23:43:17 UTC (rev 15548)
+++ branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java 2009-09-14 09:45:52 UTC (rev 15549)
@@ -200,13 +200,30 @@
if (isLogined(selenium)) {
logout(selenium);
}
- selenium.click(HtmlConstants.LogInOutArea.LOGIN_ID);
- try {
- Thread.sleep(5000);
- }catch (Exception e) {
- Assert.fail("Test failed caused by: " + e);
- }
+ for (int i = 0; i < 3; i++) {
+ try {
+ selenium.click(HtmlConstants.LogInOutArea.LOGIN_ID);
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ Assert.fail("Error : " + e.getMessage());
+ }
+ break;
+ } catch (Exception e) {
+ // Do nothing.
+ System.out.println("RealWorldHelper.login -1- ");
+ }
+
+ try {
+ selenium.click("//*[@id='mainform:bodyPanel_body']/a");
+ } catch (Exception e) {
+ // Do nothing.
+ System.out.println("RealWorldHelper.login -2- ");
+ }
+ }
+
Assert.assertTrue(selenium.isVisible(HtmlConstants.LoginPanel.usernameId), "Input for username in not visible");
Assert.assertTrue(selenium.isVisible(HtmlConstants.LoginPanel.passwordId), "Input for password in not visible");
15 years, 4 months
JBoss Rich Faces SVN: r15548 - in branches/community/3.3.X/ui/panelbar/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-09-13 19:43:17 -0400 (Sun, 13 Sep 2009)
New Revision: 15548
Modified:
branches/community/3.3.X/ui/panelbar/src/main/config/component/panelbar.xml
branches/community/3.3.X/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java
branches/community/3.3.X/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
Log:
https://jira.jboss.org/jira/browse/RF-7763
Modified: branches/community/3.3.X/ui/panelbar/src/main/config/component/panelbar.xml
===================================================================
--- branches/community/3.3.X/ui/panelbar/src/main/config/component/panelbar.xml 2009-09-13 23:28:31 UTC (rev 15547)
+++ branches/community/3.3.X/ui/panelbar/src/main/config/component/panelbar.xml 2009-09-13 23:43:17 UTC (rev 15548)
@@ -98,6 +98,14 @@
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
+ <property>
+ <name>onitemchanged</name>
+ <classname>java.lang.String</classname>
+ <description>
+ The client-side script method to be called after a panel bar item has been changed
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
<property>
<name>onmouseover</name>
<classname>java.lang.String</classname>
Modified: branches/community/3.3.X/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java
===================================================================
--- branches/community/3.3.X/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java 2009-09-13 23:28:31 UTC (rev 15547)
+++ branches/community/3.3.X/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java 2009-09-13 23:43:17 UTC (rev 15548)
@@ -164,28 +164,20 @@
return items;
}
-
+
public void encodeScript(FacesContext context, UIComponent component) throws IOException{
if(component instanceof UIPanelBar){
UIPanelBar panelBar = (UIPanelBar)component;
- List items = getScriptPanelBarItems(context, panelBar);
+ List<?> items = getScriptPanelBarItems(context, panelBar);
ScriptOptions options = new ScriptOptions(component);
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
-
- Object changeScript = panelBar.getAttributes().get("onitemchange");
-
- if (changeScript != null && !changeScript.equals("")) {
- JSFunctionDefinition function = new JSFunctionDefinition();
- function.addParameter("event");
- function.addToBody(changeScript);
- options.addOption("onitemchange",function);
- } else {
- options.addOption("onitemchange","");
- }
+
+ addHandlerOption(panelBar, options, "onitemchange");
+ addHandlerOption(panelBar, options, "onitemchanged");
options.addOption("onclick", panelBar.getAttributes().get("onclick"));
options.addOption("mouseover", panelBar.getAttributes().get("onmouseover"));
@@ -209,4 +201,18 @@
writer.endElement(HTML.SCRIPT_ELEM);
}
}
+
+ private void addHandlerOption(UIPanelBar component, ScriptOptions options,
+ String handlerName) {
+ Object changeScript = component.getAttributes().get(handlerName);
+
+ if (changeScript != null && !changeScript.equals("")) {
+ JSFunctionDefinition function = new JSFunctionDefinition();
+ function.addParameter("event");
+ function.addToBody(changeScript);
+ options.addOption(handlerName, function);
+ } else {
+ options.addOption(handlerName, "");
+ }
+ }
}
Modified: branches/community/3.3.X/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
===================================================================
--- branches/community/3.3.X/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2009-09-13 23:28:31 UTC (rev 15547)
+++ branches/community/3.3.X/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2009-09-13 23:43:17 UTC (rev 15548)
@@ -25,6 +25,7 @@
this.ch=this.panel.clientHeight;
this.options = options;
this.onitemchange = options.onitemchange;
+ this.onitemchanged = options.onitemchanged;
this.onclick = options.onclick;
this.items = options.items;
@@ -301,6 +302,8 @@
this.slidePanel.panel.style.maxHeight="";
this.slidePanel.panel.style.minHeight="";
+
+ this.slidePanel.invokeEvent("onchangeditem", event, leaveElement, enterElement, this.slidePanel.panel, this.slidePanel.onitemchanged);
},
headerOnSelectStart: function() {
15 years, 4 months
JBoss Rich Faces SVN: r15547 - in branches/community/3.3.X: docs and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-09-13 19:28:31 -0400 (Sun, 13 Sep 2009)
New Revision: 15547
Modified:
branches/community/3.3.X/cdk/maven-archetype-theme/
branches/community/3.3.X/docs/
branches/community/3.3.X/extensions/
branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java
branches/community/3.3.X/ui/layout/
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java
branches/community/3.3.X/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java
Log:
https://jira.jboss.org/jira/browse/RF-7764
Property changes on: branches/community/3.3.X/cdk/maven-archetype-theme
___________________________________________________________________
Name: svn:ignore
- target
+ target
.project
.settings
Property changes on: branches/community/3.3.X/docs
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: branches/community/3.3.X/extensions
___________________________________________________________________
Name: svn:ignore
+ target
Modified: branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java
===================================================================
--- branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java 2009-09-11 17:49:10 UTC (rev 15546)
+++ branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java 2009-09-13 23:28:31 UTC (rev 15547)
@@ -133,12 +133,6 @@
} else {
setValue(newValue);
}
-
- if (AjaxRendererUtils.isAjaxRequest(facesContext)
- /* && this.getSwitchType().equals(AJAX_METHOD)*/) { // RF-7292
-
- AjaxRendererUtils.addRegionByName(facesContext, this, this.getId());
- }
}
} else /* component should throw IllegalArgumentException for unknown events - RF-30 */ {
super.broadcast(facesEvent);
Property changes on: branches/community/3.3.X/ui/layout
___________________________________________________________________
Name: svn:ignore
- target
+ target
.classpath
.project
.settings
Modified: branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java
===================================================================
--- branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java 2009-09-11 17:49:10 UTC (rev 15546)
+++ branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java 2009-09-13 23:28:31 UTC (rev 15547)
@@ -89,9 +89,10 @@
* @see org.ajax4jsf.framework.ajax.AjaxActionComponent#setupReRender()
*/
//TODO remove
- protected void setupReRender() {
- super.setupReRender();
- AjaxRendererUtils.addRegionByName(getFacesContext(), this, this.getId());
+ protected void setupReRender(FacesContext context) {
+ super.setupReRender(context);
+ UITabPanel tabPanel = getPane();
+ AjaxRendererUtils.addRegionByName(context, tabPanel, tabPanel.getId());
}
/**
Modified: branches/community/3.3.X/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java
===================================================================
--- branches/community/3.3.X/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java 2009-09-11 17:49:10 UTC (rev 15546)
+++ branches/community/3.3.X/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java 2009-09-13 23:28:31 UTC (rev 15547)
@@ -89,6 +89,8 @@
AjaxRendererUtils.addRegionByName(facesContext, togglePanel,
togglePanel.getId());
+ AjaxRendererUtils.addRegionByName(facesContext, this,
+ this.getId());
}
@Override
15 years, 4 months
JBoss Rich Faces SVN: r15546 - branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-09-11 13:49:10 -0400 (Fri, 11 Sep 2009)
New Revision: 15546
Modified:
branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java
Log:
revert
Modified: branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java 2009-09-11 17:19:52 UTC (rev 15545)
+++ branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java 2009-09-11 17:49:10 UTC (rev 15546)
@@ -200,25 +200,13 @@
if (isLogined(selenium)) {
logout(selenium);
}
+ selenium.click(HtmlConstants.LogInOutArea.LOGIN_ID);
+ try {
+ Thread.sleep(5000);
+ }catch (Exception e) {
+ Assert.fail("Test failed caused by: " + e);
+ }
- for (int i = 0; i < 3; i++) {
- if (selenium.getXpathCount(HtmlConstants.LogInOutArea.LOGIN_ID).intValue() > 0) {
- selenium.click(HtmlConstants.LogInOutArea.LOGIN_ID);
- try {
- Thread.sleep(5000);
- } catch (InterruptedException e) {
- e.printStackTrace();
- Assert.fail("Error : " + e.getMessage());
- }
- break;
- }
-
- String photoalbumPath = "//*[@id='mainform:bodyPanel_body']/a";
- if (selenium.getXpathCount(photoalbumPath).intValue() > 0) {
- selenium.click(photoalbumPath);
- }
- }
-
Assert.assertTrue(selenium.isVisible(HtmlConstants.LoginPanel.usernameId), "Input for username in not visible");
Assert.assertTrue(selenium.isVisible(HtmlConstants.LoginPanel.passwordId), "Input for password in not visible");
15 years, 4 months
JBoss Rich Faces SVN: r15545 - in branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum: testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-09-11 13:19:52 -0400 (Fri, 11 Sep 2009)
New Revision: 15545
Modified:
branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java
branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/OpenAreasUseCasesTest.java
Log:
Investigate and fix photoalbum tests
https://jira.jboss.org/jira/browse/RFPL-86
Modified: branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java 2009-09-11 15:02:59 UTC (rev 15544)
+++ branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java 2009-09-11 17:19:52 UTC (rev 15545)
@@ -200,13 +200,25 @@
if (isLogined(selenium)) {
logout(selenium);
}
- selenium.click(HtmlConstants.LogInOutArea.LOGIN_ID);
- try {
- Thread.sleep(5000);
- }catch (Exception e) {
- Assert.fail("Test failed caused by: " + e);
- }
+ for (int i = 0; i < 3; i++) {
+ if (selenium.getXpathCount(HtmlConstants.LogInOutArea.LOGIN_ID).intValue() > 0) {
+ selenium.click(HtmlConstants.LogInOutArea.LOGIN_ID);
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ Assert.fail("Error : " + e.getMessage());
+ }
+ break;
+ }
+
+ String photoalbumPath = "//*[@id='mainform:bodyPanel_body']/a";
+ if (selenium.getXpathCount(photoalbumPath).intValue() > 0) {
+ selenium.click(photoalbumPath);
+ }
+ }
+
Assert.assertTrue(selenium.isVisible(HtmlConstants.LoginPanel.usernameId), "Input for username in not visible");
Assert.assertTrue(selenium.isVisible(HtmlConstants.LoginPanel.passwordId), "Input for password in not visible");
Modified: branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/OpenAreasUseCasesTest.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/OpenAreasUseCasesTest.java 2009-09-11 15:02:59 UTC (rev 15544)
+++ branches/community/3.3.X/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/OpenAreasUseCasesTest.java 2009-09-11 17:19:52 UTC (rev 15545)
@@ -25,7 +25,7 @@
@Test
public void testOpenAlbumAndImageWithAuthentication() {
renderPage();
- RealWorldHelper.login(selenium);
+ RealWorldHelper.login(selenium, "Viking");
RealWorldHelper.openAlbumFromPreview(selenium);
RealWorldHelper.openImageFromPreview(selenium);
}
@@ -33,7 +33,7 @@
@Test
public void testOpenUserProfile() {
renderPage();
- RealWorldHelper.login(selenium);
+ RealWorldHelper.login(selenium, "Viking");
selenium.click(HtmlConstants.LogInOutArea.USER_INFO_PATH);
waitForAjaxCompletion();
RealWorldHelper.testUserProfile(selenium, UserInfoConstants.LOGIN_NAME);
@@ -42,7 +42,7 @@
@Test
public void testOpenFilesUpload() {
renderPage();
- RealWorldHelper.login(selenium);
+ RealWorldHelper.login(selenium, "Viking");
selenium.click(HtmlConstants.ToolBarArea.ADD_IMAGE_PATH);
waitForAjaxCompletion();
RealWorldHelper.testFilesUpload(selenium);
@@ -52,7 +52,7 @@
@Test
public void testToolbarViewButtons() {
renderPage();
- RealWorldHelper.login(selenium);
+ RealWorldHelper.login(selenium, "Viking");
selenium.click(HtmlConstants.ToolBarArea.VIEW_SHELFS_PATH);
waitForAjaxCompletion();
15 years, 4 months
JBoss Rich Faces SVN: r15544 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2009-09-11 11:02:59 -0400 (Fri, 11 Sep 2009)
New Revision: 15544
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_dataTable.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_extendedDataTable.xml
Log:
https://jira.jboss.org/jira/browse/RF-7847 - updating the components descriptions with explanation of the difference between tadaTable and extendedDataTable;
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_dataTable.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_dataTable.xml 2009-09-11 14:41:17 UTC (rev 15543)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_dataTable.xml 2009-09-11 15:02:59 UTC (rev 15544)
@@ -61,6 +61,15 @@
</emphasis> attributes for data iteration components in the
<ulink url="http://www.jboss.org/community/wiki/UsingtheajaxKeysattributeforrichdataList">RichFaces Cookbook article</ulink>.</para>
+ <note>
+ <title>Note:</title>
+ <para>If you need to render a table with some extended features like data scrolling, hiding the columns with the help of the context menu and
+ <link linkend="extDataTable_key_features">some others</link>,
+ then use the <link linkend="rich_extendedDataTable"><emphasis role="bold">
+ <property><rich:extendedDataTable></property>
+ </emphasis></link> component instead.</para>
+ </note>
+
<para id="table_ex">The component allows to use <emphasis>
<property>"header"</property>
</emphasis>, <emphasis>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_extendedDataTable.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_extendedDataTable.xml 2009-09-11 14:41:17 UTC (rev 15543)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_extendedDataTable.xml 2009-09-11 15:02:59 UTC (rev 15544)
@@ -10,9 +10,9 @@
</title>
<section>
<title>Description</title>
- <para>The component for tables extending standard component <emphasis role="bold">
+ <para>The component is meant for rendering tables and differs from the standard <emphasis role="bold">
<property moreinfo="none"><rich:dataTable></property>
- </emphasis>.</para>
+ </emphasis> component in that supports some extended features.</para>
<figure float="0">
<title>
<emphasis role="bold">
@@ -25,7 +25,7 @@
</mediaobject>
</figure>
</section>
- <section>
+ <section id="extDataTable_key_features">
<title>Key Features</title>
<itemizedlist>
<listitem>
@@ -62,7 +62,10 @@
<property moreinfo="none"><rich:extendedDataTable></property>
</emphasis> component is similar to the <emphasis role="bold">
<property moreinfo="none"><rich:dataTable></property>
- </emphasis>. The data in component is scrollable. You can also set the
+ </emphasis>, but <emphasis role="bold">
+ <property moreinfo="none"><rich:extendedDataTable></property>
+ </emphasis> supports some extended features (see the "Key Features" section above).
+ The data in the component is scrollable. You can also set the
type of selection (<emphasis>
<property moreinfo="none">"none",</property>
</emphasis>
15 years, 4 months
JBoss Rich Faces SVN: r15543 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-09-11 10:41:17 -0400 (Fri, 11 Sep 2009)
New Revision: 15543
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_panelBar.xml
Log:
RF-7804: Rich Output component group description review --> rich:panelBar
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_panelBar.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_panelBar.xml 2009-09-11 14:40:30 UTC (rev 15542)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_panelBar.xml 2009-09-11 14:41:17 UTC (rev 15543)
@@ -201,10 +201,6 @@
<entry>Defines styles for panelBar content</entry>
</row>
<row>
- <entry>.rich-panelbar-content</entry>
- <entry>Defines styles for panelBar content</entry>
- </row>
- <row>
<entry>.rich-panel-header</entry>
<entry>Defines styles for active header element</entry>
</row>
@@ -213,6 +209,10 @@
<entry>Defines styles for header element</entry>
</row>
<row>
+ <entry>.rich-panelbar-content</entry>
+ <entry>Defines styles for panelBar content</entry>
+ </row>
+ <row>
<entry>.rich-panelbar-interior</entry>
<entry>Defines styles for panelBar content</entry>
</row>
15 years, 4 months