JBoss Rich Faces SVN: r8832 - in trunk/test-applications/seleniumTest/src: main/webapp/WEB-INF and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-05-29 14:42:06 -0400 (Thu, 29 May 2008)
New Revision: 8832
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/InputNumberSliderBean.java
trunk/test-applications/seleniumTest/src/main/webapp/pages/inputNumberSlider/
trunk/test-applications/seleniumTest/src/main/webapp/pages/inputNumberSlider/inputNumberSliderTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
Input number slider test.
Added: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/InputNumberSliderBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/InputNumberSliderBean.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/InputNumberSliderBean.java 2008-05-29 18:42:06 UTC (rev 8832)
@@ -0,0 +1,55 @@
+/* License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.bean;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+
+public class InputNumberSliderBean {
+ private int value;
+
+ public InputNumberSliderBean() {
+ value = 40;
+ }
+
+ public void validate(FacesContext context, UIComponent component,
+ Object value) throws ValidatorException {
+ if (((Integer)value).intValue() > 90) {
+ throw new ValidatorException(new FacesMessage("Fake validation. Value is more than 90."));
+ }
+ }
+
+ public String action() {
+ this.value += 10;
+ return null;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+
+}
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-05-29 16:50:08 UTC (rev 8831)
+++ trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-05-29 18:42:06 UTC (rev 8832)
@@ -113,5 +113,10 @@
<managed-bean-name>dataTableBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.bean.DataTableBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>sliderBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.InputNumberSliderBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>
\ No newline at end of file
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/inputNumberSlider/inputNumberSliderTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/inputNumberSlider/inputNumberSliderTest.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/inputNumberSlider/inputNumberSliderTest.xhtml 2008-05-29 18:42:06 UTC (rev 8832)
@@ -0,0 +1,30 @@
+<!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.template}">
+ <ui:define name="component">
+ <h:form id="_form">
+ <rich:inputNumberSlider id="slider"
+ minValue="0"
+ maxValue="100"
+ value="#{sliderBean.value}"
+ barStyle="width: 1000px;"
+ validator="#{sliderBean.validate}" />
+
+ <h:panelGrid columns="2" >
+ <a4j:commandButton value="Ajax Command" id="ajax" reRender="slider,output,messages" action="#{sliderBean.action}" />
+ <h:commandButton value="Server Command" id="server" action="#{sliderBean.action}" />
+ </h:panelGrid>
+ <h:panelGrid columns="2" >
+ <h:outputText value="#{sliderBean.value}" id="output" />
+ <rich:messages id="messages" />
+ </h:panelGrid>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-05-29 16:50:08 UTC (rev 8831)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-05-29 18:42:06 UTC (rev 8832)
@@ -42,7 +42,7 @@
protected static final String serverPort = "8085";
- private static final String WINDOW_JS_RESOLVER = "selenium.browserbot.getCurrentWindow().";
+ protected static final String WINDOW_JS_RESOLVER = "selenium.browserbot.getCurrentWindow().";
/** Parent component id */
private String parentId;
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSliderTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSliderTest.java 2008-05-29 18:42:06 UTC (rev 8832)
@@ -0,0 +1,142 @@
+/* License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.testng;
+
+import org.richfaces.RichSeleniumTest;
+import org.richfaces.SeleniumTestBase;
+import org.richfaces.Templates;
+import org.testng.Assert;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class InputNumberSliderTest extends SeleniumTestBase implements RichSeleniumTest {
+ private static final int BAR_SCALE = 10;
+
+ public InputNumberSliderTest() {
+ super("http", "localhost", serverPort);
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testInputNumberSliderComponent() throws Exception {
+ _testInputNumberSlider(Templates.SIMPLE);
+ _testInputNumberSlider(Templates.DATATABLE);
+ //_testInputNumberSlider(Templates.MODALPANEL);
+ }
+
+ private void _testInputNumberSlider(Templates template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+ String slider = parentId + "slider";
+
+ String input = slider + "Input";
+ String tip = slider + "Tip";
+ String track = slider + "Track";
+
+ String ajax = parentId + "ajax";
+ String server = parentId + "server";
+ String output = parentId + "output";
+
+ writeStatus("Checking initial rendering");
+ Assert.assertFalse(isVisibleById(tip));
+ checkSliderVisualState(slider, 40);
+ AssertTextEquals(output, "40");
+
+ writeStatus("Checking if tip is visible during click");
+ selenium.mouseDownAt("id=" + track, "800,1");
+ Assert.assertTrue(isVisibleById(tip));
+ selenium.mouseUpAt("id=" + track, "800,1");
+ Assert.assertFalse(isVisibleById(tip));
+
+ writeStatus("Checking if value is changed with previous click");
+ checkSliderVisualState(slider, 80);
+
+ writeStatus("Checking if value is changed with input field");
+ selenium.runScript("var input = $('" + input + "'); input.focus(); input.value = 22; input.blur();");
+ checkSliderVisualState(slider, 22);
+
+ writeStatus("Checking if slider is properly re-rendered and submitted with ajax");
+ clickById(ajax);
+ waitForAjaxCompletion();
+ checkSliderVisualState(slider, 32);
+ AssertTextEquals(output, "32");
+
+ writeStatus("Checking if slider is properly submitted");
+ clickCommandAndWait(server);
+ checkSliderVisualState(slider, 42);
+ AssertTextEquals(output, "42");
+
+ writeStatus("Checking validation");
+ selenium.mouseDownAt("id=" + track, "950,1");
+ selenium.mouseUpAt("id=" + track, "950,1");
+ clickById(ajax);
+ waitForAjaxCompletion();
+ checkSliderVisualState(slider, 95);
+ AssertTextEquals(output, "42");
+
+ selenium.mouseDownAt("id=" + track, "300,1");
+ selenium.mouseUpAt("id=" + track, "300,1");
+ clickById(ajax);
+ waitForAjaxCompletion();
+ checkSliderVisualState(slider, 40);
+ AssertTextEquals(output, "40");
+ }
+
+ private void checkSliderVisualState(String id, int value) {
+ writeStatus("Checking value in input field");
+ AssertValueEquals(id + "Input", new Integer(value).toString());
+ AssertTextEquals(id + "Tip", new Integer(value).toString());
+
+ writeStatus("Checking tip and tracker position");
+ String actualHandle = selenium.getEval(WINDOW_JS_RESOLVER + "document.getElementById('" + id + "Handle').style.left");
+ String actualTip = selenium.getEval(WINDOW_JS_RESOLVER + "document.getElementById('" + id + "Tip').style.left");
+
+ Assert.assertEquals(actualHandle, actualTip);
+ Assert.assertTrue(actualTip.endsWith("px"));
+
+ int actual = new Integer(actualTip.replace("px", "")).intValue();
+ int expected = BAR_SCALE*value;
+ Assert.assertTrue(Math.abs(actual - expected) <= BAR_SCALE, "Handle position is not syncronized with slider value!");
+ }
+
+ public String getTestUrl() {
+ return "/faces/pages/inputNumberSlider/inputNumberSliderTest.xhtml";
+ }
+}
16 years, 9 months
JBoss Rich Faces SVN: r8831 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-05-29 12:50:08 -0400 (Thu, 29 May 2008)
New Revision: 8831
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-3587
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml 2008-05-29 16:48:04 UTC (rev 8830)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml 2008-05-29 16:50:08 UTC (rev 8831)
@@ -66,8 +66,8 @@
</h:form>
</a4j:outputPanel>
- <a4j:outputPanel layout="none">
- <h:outputText id="out2" rendered="#{not empty rsBean.text2}" value="Approved Text: #{rsBean.text2}" />
+ <a4j:outputPanel id="out2">
+ <h:outputText rendered="#{not empty rsBean.text2}" value="Approved Text: #{rsBean.text2}" />
</a4j:outputPanel>
</a4j:outputPanel>
</h:panelGrid>
16 years, 9 months
JBoss Rich Faces SVN: r8830 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-05-29 12:48:04 -0400 (Thu, 29 May 2008)
New Revision: 8830
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-3554
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-05-29 16:36:03 UTC (rev 8829)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-05-29 16:48:04 UTC (rev 8830)
@@ -21,7 +21,7 @@
locale="#{calendarBean.locale}"
popup="#{calendarBean.popup}"
datePattern="#{calendarBean.pattern}"
- showApplyButton="#{calendarBean.showApply}" cellWidth="24px" cellHeight="22px"/>
+ showApplyButton="#{calendarBean.showApply}" cellWidth="24px" cellHeight="22px" style="width:200px"/>
</a4j:outputPanel>
<h:panelGrid columns="2">
16 years, 9 months
JBoss Rich Faces SVN: r8829 - trunk/test-applications/jsp/src/main/webapp/DragAndDrop.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-05-29 12:36:03 -0400 (Thu, 29 May 2008)
New Revision: 8829
Modified:
trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp
Log:
remove onsubmit
Modified: trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp 2008-05-29 15:32:11 UTC (rev 8828)
+++ trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp 2008-05-29 16:36:03 UTC (rev 8829)
@@ -23,7 +23,7 @@
<h:panelGrid styleClass="dropzoneDecoration" id="drag1">
<h:outputText value="#{type} - drag" />
<rich:dragSupport dragType="#{type}" dragValue="#{type} - value" actionListener="#{dndBean.actListenerDrag}" action="#{dndBean.dragAction}" dragListener="#{dndBean.processDrag}"
- oncomplete="#{event.oncomplete}" ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}" onsubmit="#{event.onsubmit}" onbeforedomupdate="#{event.onbeforedomupdate}" ondropout="#{event.ondropout}" ondropover="#{event.ondropover}">
+ oncomplete="#{event.oncomplete}" ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}" onbeforedomupdate="#{event.onbeforedomupdate}" ondropout="#{event.ondropout}" ondropover="#{event.ondropover}">
</rich:dragSupport>
</h:panelGrid>
</h:column>
@@ -35,7 +35,7 @@
<h:outputText value="#{type} - drop" />
<rich:dropSupport reRender="dragValueText" actionListener="#{dndBean.actListenerDrop}"
action="#{dndBean.dropAction}" acceptedTypes="#{type}" dropListener="#{dndBean.processDrop}" dropValue="#{type} - value"
- ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}" ondrop="#{event.ondrop}" ondropend="#{event.ondropend}" oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}" onbeforedomupdate="#{event.onbeforedomupdate}">
+ ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}" ondrop="#{event.ondrop}" ondropend="#{event.ondropend}" oncomplete="#{event.oncomplete}" onbeforedomupdate="#{event.onbeforedomupdate}">
</rich:dropSupport>
</h:panelGrid>
</h:column>
16 years, 9 months
JBoss Rich Faces SVN: r8828 - trunk/test-applications/jsp/src/main/webapp/Columns.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-05-29 11:32:11 -0400 (Thu, 29 May 2008)
New Revision: 8828
Modified:
trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp 2008-05-29 14:30:14 UTC (rev 8827)
+++ trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp 2008-05-29 15:32:11 UTC (rev 8828)
@@ -13,6 +13,7 @@
<h:outputText value="Enter quantity of lines [data 1]" />
<h:panelGroup>
<h:inputText value="#{columns.length1}" />
+ <h:commandButton action="#{columns.addNewItem1}" value="ok"></h:commandButton>
<h:commandButton action="#{columns.addNewItem1}" value="ok" ></h:commandButton>
</h:panelGroup>
16 years, 9 months
JBoss Rich Faces SVN: r8827 - trunk/test-applications/facelets/src/main/webapp/Columns.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-05-29 10:30:14 -0400 (Thu, 29 May 2008)
New Revision: 8827
Modified:
trunk/test-applications/facelets/src/main/webapp/Columns/ColumnsProperty.xhtml
Log:
Modified: trunk/test-applications/facelets/src/main/webapp/Columns/ColumnsProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Columns/ColumnsProperty.xhtml 2008-05-29 14:22:34 UTC (rev 8826)
+++ trunk/test-applications/facelets/src/main/webapp/Columns/ColumnsProperty.xhtml 2008-05-29 14:30:14 UTC (rev 8827)
@@ -9,13 +9,13 @@
<h:outputText value="Enter quantity of lines [data 1]" />
<h:panelGroup>
<h:inputText value="#{columns.length1}" />
- <h:commandButton action="#{columns.addNewItem1}" value="ok" onclick="submit();"></h:commandButton>
+ <h:commandButton action="#{columns.addNewItem1}" value="ok"></h:commandButton>
</h:panelGroup>
<h:outputText value="Enter quantity of lines [data 2]" />
<h:panelGroup>
<h:inputText value="#{columns.length2}" />
- <h:commandButton action="#{columns.addNewItem2}" value="ok" onclick="submit();"></h:commandButton>
+ <h:commandButton action="#{columns.addNewItem2}" value="ok"></h:commandButton>
</h:panelGroup>
<h:outputText value="columns (*):"></h:outputText>
16 years, 9 months
JBoss Rich Faces SVN: r8826 - trunk/test-applications/jsp/src/main/webapp/Columns.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-05-29 10:22:34 -0400 (Thu, 29 May 2008)
New Revision: 8826
Modified:
trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp
Log:
RF-3573
Modified: trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp 2008-05-29 14:19:17 UTC (rev 8825)
+++ trunk/test-applications/jsp/src/main/webapp/Columns/ColumnsProperty.jsp 2008-05-29 14:22:34 UTC (rev 8826)
@@ -13,13 +13,13 @@
<h:outputText value="Enter quantity of lines [data 1]" />
<h:panelGroup>
<h:inputText value="#{columns.length1}" />
- <h:commandButton action="#{columns.addNewItem1}" value="ok" onclick="submit();"></h:commandButton>
+ <h:commandButton action="#{columns.addNewItem1}" value="ok" ></h:commandButton>
</h:panelGroup>
<h:outputText value="Enter quantity of lines [data 2]" />
<h:panelGroup>
<h:inputText value="#{columns.length2}" />
- <h:commandButton action="#{columns.addNewItem2}" value="ok" onclick="submit();"></h:commandButton>
+ <h:commandButton action="#{columns.addNewItem2}" value="ok"></h:commandButton>
</h:panelGroup>
<h:outputText value="columns (*):"></h:outputText>
16 years, 9 months
JBoss Rich Faces SVN: r8825 - trunk/test-applications/jsp/src/main/java/util/event.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-05-29 10:19:17 -0400 (Thu, 29 May 2008)
New Revision: 8825
Modified:
trunk/test-applications/jsp/src/main/java/util/event/Event.java
Log:
+opened for simpleTooglePanel
Modified: trunk/test-applications/jsp/src/main/java/util/event/Event.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/util/event/Event.java 2008-05-29 13:46:49 UTC (rev 8824)
+++ trunk/test-applications/jsp/src/main/java/util/event/Event.java 2008-05-29 14:19:17 UTC (rev 8825)
@@ -111,10 +111,20 @@
private String onviewactivation;
private String onbeforehide;
private String onbeforeshow;
+ private String opened;
+ public String getOpened() {
+ return opened;
+ }
+
+ public void setOpened(String opened) {
+ this.opened = opened;
+ }
+
// showEvent('onkeypressInputID', 'onkeypress work!')
public Event() {
onLoadMap = "showEvent('onLoadMapInputID', 'onLoadMap work!')";
+ opened = "showEvent('openedInputID', 'opened work!')";
onRowClick = "showEvent('onRowClickInputID', 'onRowClick work!')";
onRowDblClick = "showEvent('onRowDblClickInputID', 'onRowDblClick work!')";
onRowMouseDown = "showEvent('onRowMouseDownInputID', 'onRowMouseDown work!')";
16 years, 9 months
JBoss Rich Faces SVN: r8824 - in trunk/test-applications/seleniumTest/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-05-29 09:46:49 -0400 (Thu, 29 May 2008)
New Revision: 8824
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/progressBar/progressBarTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ProgressBarTest.java
Log:
progressBar test refactoring
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/progressBar/progressBarTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/progressBar/progressBarTest.xhtml 2008-05-29 13:43:45 UTC (rev 8823)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/progressBar/progressBarTest.xhtml 2008-05-29 13:46:49 UTC (rev 8824)
@@ -31,6 +31,8 @@
<a4j:commandButton id="_reset" actionListener="#{progressBarBean.reset}" value="Reset value"></a4j:commandButton><br/>
<a4j:commandButton id="_complete" reRender="progressBar1" actionListener="#{progressBarBean.complete}" value="Complete"></a4j:commandButton>
</h:form>
+ <input type="button" value="enable" onclick="$(getParentId() + '_form:progressBar1').component.enable()"/>
+ <input type="button" value="disable" onclick="$(getParentId() + '_form:progressBar1').component.disable()"/>
</ui:define>
<ui:define name="description">
<ui:include src="progressBarDescription.xhtml" />
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ProgressBarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ProgressBarTest.java 2008-05-29 13:43:45 UTC (rev 8823)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ProgressBarTest.java 2008-05-29 13:46:49 UTC (rev 8824)
@@ -42,16 +42,16 @@
private void _testProgressBarComponent(Templates template) {
- renderPage(getTestUrl(), template);
+ renderPage(template);
String parentId = getParentId() + "_form:";
String progressBarId = parentId + "progressBar1";
int value = getProgressBarValue(progressBarId);
- Assert.assertTrue(value < 0);
+ Assert.assertTrue(value < 0, "Progress value should be negative");
String text = getTextById(progressBarId);
writeStatus("Check if process not started");
- Assert.assertTrue(text.startsWith("Process not started"));
+ Assert.assertTrue(text.startsWith("Process not started"), "Initial facet does not appear");
writeStatus("Enable polling");
enableProgressBar(progressBarId, true);
@@ -63,18 +63,18 @@
writeStatus("Check label");
text = getTextById(progressBarId + ":remain");
- Assert.assertTrue(text.endsWith("%"));
+ Assert.assertTrue(text.endsWith("%"), "Percent label doesnot appear");
writeStatus("Check value");
value = getProgressBarValue(progressBarId);
- Assert.assertTrue(value > 0);
+ Assert.assertTrue(value > 0, "Progress value should be positive");
writeStatus("Enable polling");
enableProgressBar(progressBarId, true);
pause(5000, progressBarId);
writeStatus("Check value");
- Assert.assertTrue((getProgressBarValue(progressBarId).intValue() != value));
+ Assert.assertTrue((getProgressBarValue(progressBarId).intValue() != value), "Progress has been terminated abnormal");
writeStatus("Disable polling");
enableProgressBar(progressBarId, false);
@@ -82,13 +82,13 @@
value = getProgressBarValue(progressBarId);
pause(1500, progressBarId);
writeStatus("Check value");
- Assert.assertTrue(getProgressBarValue(progressBarId) == value);
+ Assert.assertTrue(getProgressBarValue(progressBarId) == value, "Progress didnt stop after progressBar disabling");
clickById(parentId + "_complete");
waitForAjaxCompletion();
writeStatus("Check if process completed");
text = getTextById(progressBarId);
- Assert.assertTrue(text.startsWith("Process completed"));
+ Assert.assertTrue(text.startsWith("Process completed"),"Comlete facet does not appear");
// - Test client mode
@@ -96,21 +96,21 @@
writeStatus("Check value");
progressBarId = parentId + "progressBar2";
value = getProgressBarValue(progressBarId);
- Assert.assertTrue(value == -5);
+ Assert.assertTrue(value == -5, "Progress value should be -5 ");
text = getTextById(progressBarId);
writeStatus("Check if process not started");
- Assert.assertTrue(text.startsWith("Process not started"));
+ Assert.assertTrue(text.startsWith("Process not started"), "Initial facet does not appear");
setProgressBarValue(progressBarId, 20);
value = getProgressBarValue(progressBarId);
writeStatus("Check value");
- Assert.assertTrue(value == 20);
+ Assert.assertTrue(value == 20, "Progress value should be 20 ");
setProgressBarValue(progressBarId, 60);
value = getProgressBarValue(progressBarId);
writeStatus("Check value");
- Assert.assertTrue(value == 60);
+ Assert.assertTrue(value == 60,"Progress value should be 60");
clickById(parentId + "_reset");
waitForAjaxCompletion();
16 years, 9 months
JBoss Rich Faces SVN: r8823 - in trunk/samples/richfaces-demo/src/main/webapp: templates/include and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-05-29 09:43:45 -0400 (Thu, 29 May 2008)
New Revision: 8823
Modified:
trunk/samples/richfaces-demo/src/main/webapp/css/common.css
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
Log:
RF-3526
Modified: trunk/samples/richfaces-demo/src/main/webapp/css/common.css
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/css/common.css 2008-05-29 13:35:53 UTC (rev 8822)
+++ trunk/samples/richfaces-demo/src/main/webapp/css/common.css 2008-05-29 13:43:45 UTC (rev 8823)
@@ -170,13 +170,16 @@
background-position : left;
background-repeat : repeat-y;
background-color : transparent;
- padding : 0px 1px 0px 0px;
+ padding : 0px 2px 0px 2px;
}
html>body .panel_menu {
padding : 0;
}
-
+ .dr-pnlbar-ext {
+ zoom: 1;
+ }
+
.panel_menu div {
background-color:transparent;
padding:0;
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2008-05-29 13:35:53 UTC (rev 8822)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2008-05-29 13:43:45 UTC (rev 8823)
@@ -7,7 +7,7 @@
<ui:composition>
<rich:panel styleClass="panel_menu" bodyClass="rich-laguna-panel-no-header">
-<rich:panelBar selectedPanel="#{componentNavigator.currentComponent.group}" width="100%" height="605px" contentStyle="background:none;">
+<rich:panelBar style="width: auto;" selectedPanel="#{componentNavigator.currentComponent.group}" height="605px" contentStyle="background:none;">
<rich:panelBarItem id="ajaxSupport" label="Ajax Support">
<ui:include src="/templates/include/components-group.xhtml" >
<ui:param name="components" value="#{componentNavigator.ajaxSupport}" />
16 years, 9 months