JBoss Rich Faces SVN: r21693 - trunk/ui/output/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-02-16 08:05:01 -0500 (Wed, 16 Feb 2011)
New Revision: 21693
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java
Log:
RF-10436 Panel Menu Item - doesn't fire item change listener when @bypassUpdates or @immediate is true when @mode=ajax
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java 2011-02-16 12:59:51 UTC (rev 21692)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java 2011-02-16 13:05:01 UTC (rev 21693)
@@ -97,8 +97,11 @@
if (previous == null || !previous.equalsIgnoreCase(activeItem)) {
AbstractPanelMenuItem prevItm = getItem(previous);
AbstractPanelMenuItem actItm = getItem(activeItem);
+
ItemChangeEvent event = new ItemChangeEvent(this, previous, activeItem);
- if (isImmediate() || (prevItm.isImmediate() || actItm.isImmediate())) {
+ if (isImmediate() ||
+ ((prevItm != null && prevItm.isImmediate()) ||
+ (actItm != null && actItm.isImmediate()))) {
event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
} else if (prevItm.isBypassUpdates() || actItm.isBypassUpdates()) {
event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
15 years, 2 months
JBoss Rich Faces SVN: r21692 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-02-16 07:59:51 -0500 (Wed, 16 Feb 2011)
New Revision: 21692
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarFAjax.java
Log:
added new sample for calendar + tests
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml 2011-02-16 12:59:51 UTC (rev 21692)
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, 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.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ <style type="text/css">
+ .yellowDay {
+ background: yellow !important;
+ }
+
+ .aquaDay {
+ background: aqua !important;
+ }
+
+ </style>
+
+ <script type="text/javascript">
+ function yellowTuesdays(day) {
+ if (day.date.getDay() == 2) {
+ return 'yellowDay';
+ }
+ return false;
+ }
+
+ function aquaWeekends(day) {
+ if (day.isWeekend) {
+ return 'aquaDay';
+ }
+ return false;
+ }
+
+ function disableTuesdays(day) {
+ if (day.date.getDay() == 2) {
+ return false;
+ }
+ return true;
+ }
+
+ function disableWeekends(day) {
+ if (day.isWeekend) {
+ return false;
+ }
+ return true;
+ }
+
+ testedComponentId = "#{rich:clientId('calendar')}";
+ </script>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <div style="padding: 250px">
+ <rich:calendar id="calendar"
+ boundaryDatesMode="#{richCalendarBean.attributes['boundaryDatesMode'].value}"
+ buttonClass="#{richCalendarBean.attributes['buttonClass'].value}"
+ buttonDisabledIcon="#{richCalendarBean.attributes['buttonDisabledIcon'].value}"
+ buttonIcon="#{richCalendarBean.attributes['buttonIcon'].value}"
+ buttonLabel="#{richCalendarBean.attributes['buttonLabel'].value}"
+ converterMessage="#{richCalendarBean.attributes['converterMessage'].value}"
+ currentDate="#{richCalendarBean.attributes['currentDate'].value}"
+ datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+ dayClassFunction="#{richCalendarBean.attributes['dayClassFunction'].value}"
+ dayDisableFunction="#{richCalendarBean.attributes['dayDisableFunction'].value}"
+ defaultTime="#{richCalendarBean.attributes['defaultTime'].value}"
+ direction="#{richCalendarBean.attributes['direction'].value}"
+ disabled="#{richCalendarBean.attributes['disabled'].value}"
+ enableManualInput="#{richCalendarBean.attributes['enableManualInput'].value}"
+ firstWeekDay="#{richCalendarBean.attributes['firstWeekDay'].value}"
+ hidePopupOnScroll="#{richCalendarBean.attributes['hidePopupOnScroll'].value}"
+ horizontalOffset="#{richCalendarBean.attributes['horizontalOffset'].value}"
+ immediate="#{richCalendarBean.attributes['immediate'].value}"
+ inputClass="#{richCalendarBean.attributes['inputClass'].value}"
+ inputSize="#{richCalendarBean.attributes['inputSize'].value}"
+ inputStyle="#{richCalendarBean.attributes['inputStyle'].value}"
+ jointPoint="#{richCalendarBean.attributes['jointPoint'].value}"
+ locale="#{richCalendarBean.attributes['locale'].value}"
+ minDaysInFirstWeek="#{richCalendarBean.attributes['minDaysInFirstWeek'].value}"
+ mode="#{richCalendarBean.attributes['mode'].value}"
+ onbeforecurrentdateselect="#{richCalendarBean.attributes['onbeforecurrentdateselect'].value}"
+ onbeforedateselect="#{richCalendarBean.attributes['onbeforedateselect'].value}"
+ onbeforetimeselect="#{richCalendarBean.attributes['onbeforetimeselect'].value}"
+ onchange="#{richCalendarBean.attributes['onchange'].value}"
+ onclean="#{richCalendarBean.attributes['onclean'].value}"
+ oncomplete="#{richCalendarBean.attributes['oncomplete'].value}"
+ oncurrentdateselect="#{richCalendarBean.attributes['oncurrentdateselect'].value}"
+ ondatemouseout="#{richCalendarBean.attributes['ondatemouseout'].value}"
+ ondatemouseover="#{richCalendarBean.attributes['ondatemouseover'].value}"
+ ondateselect="#{richCalendarBean.attributes['ondateselect'].value}"
+ onhide="#{richCalendarBean.attributes['ondateselect'].value}"
+ oninputblur="#{richCalendarBean.attributes['oninputblur'].value}"
+ oninputchange="#{richCalendarBean.attributes['oninputchange'].value}"
+ oninputclick="#{richCalendarBean.attributes['oninputclick'].value}"
+ oninputdblclick="#{richCalendarBean.attributes['oninputdblclick'].value}"
+ oninputfocus="#{richCalendarBean.attributes['oninputfocus'].value}"
+ oninputkeydown="#{richCalendarBean.attributes['oninputkeydown'].value}"
+ oninputkeypress="#{richCalendarBean.attributes['oninputkeypress'].value}"
+ oninputkeyup="#{richCalendarBean.attributes['oninputkeyup'].value}"
+ oninputmousedown="#{richCalendarBean.attributes['oninputmousedown'].value}"
+ oninputmousemove="#{richCalendarBean.attributes['oninputmousemove'].value}"
+ oninputmouseout="#{richCalendarBean.attributes['oninputmouseout'].value}"
+ oninputmouseover="#{richCalendarBean.attributes['oninputmouseover'].value}"
+ oninputmouseup="#{richCalendarBean.attributes['oninputmouseup'].value}"
+ oninputselect="#{richCalendarBean.attributes['oninputselect'].value}"
+ onshow="#{richCalendarBean.attributes['onshow'].value}"
+ ontimeselect="#{richCalendarBean.attributes['ontimeselect'].value}"
+ popup="#{richCalendarBean.attributes['popup'].value}"
+ preloadDateRangeBegin="#{richCalendarBean.attributes['preloadDateRangeBegin'].value}"
+ preloadDateRangeEnd="#{richCalendarBean.attributes['preloadDateRangeEnd'].value}"
+ rendered="#{richCalendarBean.attributes['rendered'].value}"
+ required="#{richCalendarBean.attributes['required'].value}"
+ requiredMessage="#{richCalendarBean.attributes['requiredMessage'].value}"
+ resetTimeOnDateSelect="#{richCalendarBean.attributes['resetTimeOnDateSelect'].value}"
+ showApplyButton="#{richCalendarBean.attributes['showApplyButton'].value}"
+ showFooter="#{richCalendarBean.attributes['showFooter'].value}"
+ showHeader="#{richCalendarBean.attributes['showHeader'].value}"
+ showInput="#{richCalendarBean.attributes['showInput'].value}"
+ showWeekDaysBar="#{richCalendarBean.attributes['showWeekDaysBar'].value}"
+ showWeeksBar="#{richCalendarBean.attributes['showWeeksBar'].value}"
+ style="#{richCalendarBean.attributes['style'].value}"
+ tabindex="#{richCalendarBean.attributes['tabindex'].value}"
+ timeZone="#{richCalendarBean.timeZone}"
+ todayControlMode="#{richCalendarBean.attributes['todayControlMode'].value}"
+ validatorMessage="#{richCalendarBean.attributes['validatorMessage'].value}"
+ value="#{richCalendarBean.attributes['value'].value}"
+ valueChangeListener="#{richCalendarBean.valueChangeListener}"
+ verticalOffset="#{richCalendarBean.attributes['verticalOffset'].value}"
+ zindex="#{richCalendarBean.attributes['zindex'].value}"
+ >
+ <f:ajax event="change" render="output :phasesPanel" />
+ </rich:calendar>
+ </div>
+
+ <br/><br/>
+
+ output:
+ <h:outputText id="output" value="#{richCalendarBean.attributes['value'].value}">
+ <f:convertDateTime pattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"/>
+ </h:outputText>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richCalendarBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarFAjax.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarFAjax.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarFAjax.java 2011-02-16 12:59:51 UTC (rev 21692)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, 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.richfaces.tests.metamer.ftest.richCalendar;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.testng.annotations.Test;
+
+/**
+ * Test case for basic functionality of calendar on page faces/components/richCalendar/fAjax.xhtml.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestRichCalendarFAjax extends AbstractCalendarTest {
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richCalendar/fAjax.xhtml");
+ }
+
+ @Test
+ @Override
+ public void testOpenPopupClickOnInput() {
+ super.testOpenPopupClickOnInput();
+ }
+
+ @Test
+ @Override
+ public void testOpenPopupClickOnImage() {
+ super.testOpenPopupClickOnImage();
+ }
+
+ @Test
+ @Override
+ public void testHeaderButtons() {
+ super.testHeaderButtons();
+ }
+
+ @Test
+ @Override
+ public void testFooterButtons() {
+ super.testFooterButtons();
+ }
+
+ @Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10536")
+ @Override
+ public void testApplyButton() {
+ super.testApplyButton();
+ }
+}
15 years, 2 months
JBoss Rich Faces SVN: r21691 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-02-16 07:59:07 -0500 (Wed, 16 Feb 2011)
New Revision: 21691
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarBasic.java
Log:
added a new sample for calendar - using f:ajax
tests for calendar refactored
added 5 new tests
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml 2011-02-16 12:58:26 UTC (rev 21690)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml 2011-02-16 12:59:07 UTC (rev 21691)
@@ -35,6 +35,10 @@
Simple page containing <b>rich:calendar</b> and inputs for all its attributes.
</metamer:testPageLink>
+ <metamer:testPageLink id="fAjax" outcome="fAjax" value="f:ajax">
+ Simple page containing <b>rich:calendar</b> with f:ajax and inputs for all its attributes.
+ </metamer:testPageLink>
+
<metamer:testPageLink id="dataModel" outcome="dataModel" value="Data Model">
Page containing <b>rich:calendar</b> with data model and inputs for all its attributes.
</metamer:testPageLink>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2011-02-16 12:58:26 UTC (rev 21690)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2011-02-16 12:59:07 UTC (rev 21691)
@@ -159,7 +159,7 @@
verticalOffset="#{richCalendarBean.attributes['verticalOffset'].value}"
zindex="#{richCalendarBean.attributes['zindex'].value}"
>
- <a4j:ajax event="change" render="output, phasesPanel" limitRender="#{true}"/>
+ <a4j:ajax event="change" render="output, phasesPanel" />
</rich:calendar>
</div>
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java 2011-02-16 12:58:26 UTC (rev 21690)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java 2011-02-16 12:59:07 UTC (rev 21691)
@@ -21,6 +21,19 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richCalendar;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardNoRequest;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.faces.event.PhaseId;
+
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
@@ -99,4 +112,99 @@
protected JQueryLocator dateEditorYears = pjq("div[id$=calendarDateEditorLayoutY{0}]");
// other
protected JQueryLocator output = pjq("span[id$=output]");
+
+ public void testOpenPopupClickOnInput() {
+ guardNoRequest(selenium).click(input);
+ assertTrue(selenium.isDisplayed(popup), "Popup should be visible.");
+ }
+
+ public void testOpenPopupClickOnImage() {
+ guardNoRequest(selenium).click(image);
+ assertTrue(selenium.isDisplayed(popup), "Popup should be visible.");
+ }
+
+ public void testHeaderButtons() {
+ selenium.click(input);
+
+ boolean displayed = selenium.isDisplayed(prevYearButton);
+ assertTrue(displayed, "Previous year button should be visible.");
+ String buttonText = selenium.getText(prevYearButton);
+ assertEquals(buttonText, "<<", "Previous year button");
+
+ displayed = selenium.isDisplayed(prevMonthButton);
+ assertTrue(displayed, "Previous month button should be visible.");
+ buttonText = selenium.getText(prevMonthButton);
+ assertEquals(buttonText, "<", "Previous month button");
+
+ displayed = selenium.isDisplayed(nextMonthButton);
+ assertTrue(displayed, "Next month button should be visible.");
+ buttonText = selenium.getText(nextMonthButton);
+ assertEquals(buttonText, ">", "Next month button");
+
+ displayed = selenium.isDisplayed(nextYearButton);
+ assertTrue(displayed, "Next year button should be visible.");
+ buttonText = selenium.getText(nextYearButton);
+ assertEquals(buttonText, ">>", "Next year button");
+
+ displayed = selenium.isDisplayed(closeButton);
+ assertTrue(displayed, "Close button should be visible.");
+ buttonText = selenium.getText(closeButton);
+ assertEquals(buttonText, "x", "Close button");
+ }
+
+ public void testFooterButtons() {
+ selenium.click(input);
+
+ boolean displayed = selenium.isDisplayed(todayButton);
+ assertTrue(displayed, "Today button should be visible.");
+ String buttonText = selenium.getText(todayButton);
+ assertEquals(buttonText, "Today", "Button's text");
+
+ displayed = selenium.isDisplayed(applyButton);
+ assertTrue(displayed, "Apply button should be visible.");
+ buttonText = selenium.getText(applyButton);
+ assertEquals(buttonText, "Apply", "Button's text");
+
+ displayed = selenium.isElementPresent(cleanButton);
+ assertFalse(displayed, "Clean button should not be visible.");
+
+ displayed = selenium.isElementPresent(timeButton);
+ assertFalse(displayed, "Time button should not be visible.");
+
+ selenium.click(cellWeekDay.format(3, 3));
+
+ displayed = selenium.isDisplayed(cleanButton);
+ assertTrue(displayed, "Clean button should be visible.");
+ buttonText = selenium.getText(cleanButton);
+ assertEquals(buttonText, "Clean", "Button's text");
+
+ displayed = selenium.isDisplayed(timeButton);
+ assertTrue(displayed, "Time button should be visible.");
+ buttonText = selenium.getText(timeButton);
+ assertEquals(buttonText, "12:00", "Button's text");
+ }
+
+ public void testApplyButton() {
+ selenium.click(input);
+
+ selenium.click(cellDay.format(6));
+ String day = selenium.getText(cellDay.format(6));
+ String month = selenium.getText(monthLabel);
+
+ String selectedDate = null;
+ try {
+ Date date = new SimpleDateFormat("d MMMM, yyyy hh:mm").parse(day + " " + month + " 12:00");
+ selectedDate = new SimpleDateFormat("MMM d, yyyy hh:mm").format(date);
+ } catch (ParseException ex) {
+ fail(ex.getMessage());
+ }
+
+ guardXhr(selenium).click(applyButton);
+ assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
+
+ String inputDate = selenium.getValue(input);
+ assertEquals(inputDate, selectedDate, "Input doesn't contain selected date.");
+
+ phaseInfo.assertListener(PhaseId.PROCESS_VALIDATIONS, "value changed: null -> " + selectedDate);
+ }
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarBasic.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarBasic.java 2011-02-16 12:58:26 UTC (rev 21690)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarBasic.java 2011-02-16 12:59:07 UTC (rev 21691)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -33,6 +33,7 @@
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
@@ -68,45 +69,21 @@
}
@Test
+ @Override
public void testOpenPopupClickOnInput() {
- guardNoRequest(selenium).click(input);
- assertTrue(selenium.isDisplayed(popup), "Popup should be visible.");
+ super.testOpenPopupClickOnInput();
}
@Test
+ @Override
public void testOpenPopupClickOnImage() {
- guardNoRequest(selenium).click(image);
- assertTrue(selenium.isDisplayed(popup), "Popup should be visible.");
+ super.testOpenPopupClickOnImage();
}
@Test
+ @Override
public void testHeaderButtons() {
- selenium.click(input);
-
- boolean displayed = selenium.isDisplayed(prevYearButton);
- assertTrue(displayed, "Previous year button should be visible.");
- String buttonText = selenium.getText(prevYearButton);
- assertEquals(buttonText, "<<", "Previous year button");
-
- displayed = selenium.isDisplayed(prevMonthButton);
- assertTrue(displayed, "Previous month button should be visible.");
- buttonText = selenium.getText(prevMonthButton);
- assertEquals(buttonText, "<", "Previous month button");
-
- displayed = selenium.isDisplayed(nextMonthButton);
- assertTrue(displayed, "Next month button should be visible.");
- buttonText = selenium.getText(nextMonthButton);
- assertEquals(buttonText, ">", "Next month button");
-
- displayed = selenium.isDisplayed(nextYearButton);
- assertTrue(displayed, "Next year button should be visible.");
- buttonText = selenium.getText(nextYearButton);
- assertEquals(buttonText, ">>", "Next year button");
-
- displayed = selenium.isDisplayed(closeButton);
- assertTrue(displayed, "Close button should be visible.");
- buttonText = selenium.getText(closeButton);
- assertEquals(buttonText, "x", "Close button");
+ super.testHeaderButtons();
}
@Test
@@ -119,36 +96,9 @@
}
@Test
+ @Override
public void testFooterButtons() {
- selenium.click(input);
-
- boolean displayed = selenium.isDisplayed(todayButton);
- assertTrue(displayed, "Today button should be visible.");
- String buttonText = selenium.getText(todayButton);
- assertEquals(buttonText, "Today", "Button's text");
-
- displayed = selenium.isDisplayed(applyButton);
- assertTrue(displayed, "Apply button should be visible.");
- buttonText = selenium.getText(applyButton);
- assertEquals(buttonText, "Apply", "Button's text");
-
- displayed = selenium.isElementPresent(cleanButton);
- assertFalse(displayed, "Clean button should not be visible.");
-
- displayed = selenium.isElementPresent(timeButton);
- assertFalse(displayed, "Time button should not be visible.");
-
- selenium.click(cellWeekDay.format(3, 3));
-
- displayed = selenium.isDisplayed(cleanButton);
- assertTrue(displayed, "Clean button should be visible.");
- buttonText = selenium.getText(cleanButton);
- assertEquals(buttonText, "Clean", "Button's text");
-
- displayed = selenium.isDisplayed(timeButton);
- assertTrue(displayed, "Time button should be visible.");
- buttonText = selenium.getText(timeButton);
- assertEquals(buttonText, "12:00", "Button's text");
+ super.testFooterButtons();
}
@Test
@@ -310,25 +260,8 @@
}
@Test
+ @Override
public void testApplyButton() {
- selenium.click(input);
-
- selenium.click(cellDay.format(6));
- String day = selenium.getText(cellDay.format(6));
- String month = selenium.getText(monthLabel);
-
- String selectedDate = null;
- try {
- Date date = new SimpleDateFormat("d MMMM, yyyy hh:mm").parse(day + " " + month + " 12:00");
- selectedDate = new SimpleDateFormat("MMM d, yyyy hh:mm").format(date);
- } catch (ParseException ex) {
- fail(ex.getMessage());
- }
-
- guardXhr(selenium).click(applyButton);
- assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
-
- String inputDate = selenium.getValue(input);
- assertEquals(inputDate, selectedDate, "Input doesn't contain selected date.");
+ super.testApplyButton();
}
}
15 years, 2 months
JBoss Rich Faces SVN: r21690 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-02-16 07:58:26 -0500 (Wed, 16 Feb 2011)
New Revision: 21690
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/TestRichMenuItem.java
Log:
fixed testMode for rich:menuItem
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/TestRichMenuItem.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/TestRichMenuItem.java 2011-02-16 12:57:58 UTC (rev 21689)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/TestRichMenuItem.java 2011-02-16 12:58:26 UTC (rev 21690)
@@ -286,13 +286,13 @@
listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(6)"));
assertEquals(listenerOutput, "* action invoked", "Action's output");
- selenium.type(pjq("input[id$=modeInput]"), "server");
+ selenium.click(pjq("input[name$=modeInput][value=server]"));
selenium.waitForPageToLoad();
selenium.mouseOver(fileMenu);
guardHttp(selenium).click(menuItem1);
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION, PhaseId.RENDER_RESPONSE);
listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(5)"));
15 years, 2 months
JBoss Rich Faces SVN: r21689 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropDownMenu.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-02-16 07:57:58 -0500 (Wed, 16 Feb 2011)
New Revision: 21689
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropDownMenu/TestRichDropDownMenu.java
Log:
3 tests for rich:dropDownMenu fixed
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropDownMenu/TestRichDropDownMenu.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropDownMenu/TestRichDropDownMenu.java 2011-02-16 12:55:58 UTC (rev 21688)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropDownMenu/TestRichDropDownMenu.java 2011-02-16 12:57:58 UTC (rev 21689)
@@ -139,8 +139,8 @@
}
@Test
- public void testModeNone() {
- selenium.type(pjq("input[id$=modeInput]"), "");
+ public void testModeNull() {
+ selenium.click(pjq("input[name$=modeInput][value=]"));
selenium.waitForPageToLoad();
testModeServer();
@@ -148,7 +148,7 @@
@Test
public void testModeServer() {
- selenium.type(pjq("input[id$=modeInput]"), "server");
+ selenium.click(pjq("input[name$=modeInput][value=server]"));
selenium.waitForPageToLoad();
selenium.mouseOver(fileMenuLabel);
@@ -158,7 +158,7 @@
@Test
public void testModeClient() {
- selenium.type(pjq("input[id$=modeInput]"), "client");
+ selenium.click(pjq("input[name$=modeInput][value=client]"));
selenium.waitForPageToLoad();
selenium.mouseOver(fileMenuLabel);
15 years, 2 months
JBoss Rich Faces SVN: r21688 - in trunk/ui/output/ui/src/main/java/org/richfaces: renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-02-16 07:55:58 -0500 (Wed, 16 Feb 2011)
New Revision: 21688
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
Log:
RF-10436 Panel Menu Item - doesn't fire item change listener when @bypassUpdates or @immediate is true when @mode=ajax
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java 2011-02-16 12:46:40 UTC (rev 21687)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java 2011-02-16 12:55:58 UTC (rev 21688)
@@ -23,13 +23,6 @@
package org.richfaces.component;
-import org.richfaces.PanelMenuMode;
-import org.richfaces.cdk.annotations.*;
-import org.richfaces.event.ItemChangeEvent;
-import org.richfaces.event.ItemChangeListener;
-import org.richfaces.event.ItemChangeSource;
-import org.richfaces.renderkit.util.PanelIcons;
-
import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
@@ -39,6 +32,18 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
+import org.richfaces.PanelMenuMode;
+import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.cdk.annotations.EventName;
+import org.richfaces.cdk.annotations.JsfComponent;
+import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
+import org.richfaces.event.ItemChangeEvent;
+import org.richfaces.event.ItemChangeListener;
+import org.richfaces.event.ItemChangeSource;
+import org.richfaces.renderkit.util.PanelIcons;
+
/**
* @author akolonitsky
* @since 2010-10-25
@@ -90,7 +95,17 @@
setSubmittedActiveItem(null);
if (previous == null || !previous.equalsIgnoreCase(activeItem)) {
- queueEvent(new ItemChangeEvent(this, previous, activeItem));
+ AbstractPanelMenuItem prevItm = getItem(previous);
+ AbstractPanelMenuItem actItm = getItem(activeItem);
+ ItemChangeEvent event = new ItemChangeEvent(this, previous, activeItem);
+ if (isImmediate() || (prevItm.isImmediate() || actItm.isImmediate())) {
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else if (prevItm.isBypassUpdates() || actItm.isBypassUpdates()) {
+ event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
+ } else {
+ event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ }
+ event.queue();
}
} catch (RuntimeException e) {
context.renderResponse();
@@ -99,23 +114,6 @@
}
@Override
- public void queueEvent(FacesEvent event) {
- if ((event instanceof ItemChangeEvent) && (event.getComponent() == this)) {
- setEventPhase(event);
- }
-
- super.queueEvent(event);
- }
-
- protected void setEventPhase(FacesEvent event) {
- if (isImmediate()) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else {
- event.setPhaseId(PhaseId.INVOKE_APPLICATION);
- }
- }
-
- @Override
public void broadcast(FacesEvent event) throws AbortProcessingException {
super.broadcast(event);
@@ -124,8 +122,6 @@
}
}
-
-
public String getSubmittedActiveItem() {
return this.submittedActiveItem;
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2011-02-16 12:46:40 UTC (rev 21687)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2011-02-16 12:55:58 UTC (rev 21688)
@@ -74,10 +74,16 @@
Map<String, String> requestMap =
context.getExternalContext().getRequestParameterMap();
+ AbstractPanelMenuItem menuItem = (AbstractPanelMenuItem) component;
String compClientId = component.getClientId(context);
if (requestMap.get(compClientId) != null) {
- new ActionEvent(component).queue();
+ AbstractPanelMenu pm = getParentPanelMenu(menuItem);
+ if (pm.isImmediate()) {
+ menuItem.setImmediate(true);
+ }
+ new ActionEvent(menuItem).queue();
+
if (context.getPartialViewContext().isPartialRequest()) {
//TODO nick - why render item by default?
@@ -236,6 +242,10 @@
return AbstractPanelMenuItem.class;
}
+ private static AbstractPanelMenu getParentPanelMenu(AbstractPanelMenuItem menuItem) {
+ return (AbstractPanelMenu) ComponentIterators.getParent(menuItem, PARENT_PANEL_MENU_PREDICATE);
+ }
+
static boolean isParentPanelMenuDisabled(AbstractPanelMenuItem menuItem) {
AbstractPanelMenu parentPanelMenu = (AbstractPanelMenu) ComponentIterators.getParent(menuItem, PARENT_PANEL_MENU_PREDICATE);
if (parentPanelMenu != null) {
15 years, 2 months
JBoss Rich Faces SVN: r21687 - in modules/tests/metamer/trunk: application/src/main/webapp/components/richDropTarget and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-02-16 07:46:40 -0500 (Wed, 16 Feb 2011)
New Revision: 21687
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropListenerBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/DropTargetAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java
Log:
dropTarget - added tests @execute, @immediate, @bypassUpdates - removed issue tracking for (RF-10334, RF-10535)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropListenerBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropListenerBean.java 2011-02-16 12:45:40 UTC (rev 21686)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropListenerBean.java 2011-02-16 12:46:40 UTC (rev 21687)
@@ -43,6 +43,8 @@
private RichDropTargetBean richDropTargetBean;
public void processDragging(DropEvent dropEvent) {
+ RichBean.logToPage("* dropListener");
+
DragValue dragValue = (DragValue) dropEvent.getDragValue();
DropValue dropValue = (DropValue) dropEvent.getDropValue();
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml 2011-02-16 12:45:40 UTC (rev 21686)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml 2011-02-16 12:46:40 UTC (rev 21687)
@@ -86,6 +86,7 @@
acceptedTypes="#{richDropTargetBean.attributes['acceptedTypes'].value}"
bypassUpdates="#{richDropTargetBean.attributes['bypassUpdates'].value}"
immediate="#{richDropTargetBean.attributes['immediate'].value}"
+ execute="#{richDropTargetBean.attributes['execute'].value}"
render="#{richDropTargetBean.attributes['render'].value}"
rendered="#{richDropTargetBean.attributes['rendered'].value}"
value="#{richDropTargetBean.attributes['value'].value}"
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/DropTargetAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/DropTargetAttributes.java 2011-02-16 12:45:40 UTC (rev 21686)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/DropTargetAttributes.java 2011-02-16 12:46:40 UTC (rev 21687)
@@ -39,4 +39,16 @@
public void setRendered(Boolean rendered) {
setProperty("rendered", rendered);
}
+
+ public void setExecute(String execute) {
+ setProperty("execute", execute);
+ }
+
+ public void setImmediate(Boolean immediate) {
+ setProperty("immediate", immediate);
+ }
+
+ public void setBypassUpdates(Boolean bypassUpdates) {
+ setProperty("bypassUpdates", bypassUpdates);
+ }
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java 2011-02-16 12:45:40 UTC (rev 21686)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java 2011-02-16 12:46:40 UTC (rev 21687)
@@ -21,6 +21,12 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richDropTarget;
+import static javax.faces.event.PhaseId.ANY_PHASE;
+import static javax.faces.event.PhaseId.APPLY_REQUEST_VALUES;
+import static javax.faces.event.PhaseId.INVOKE_APPLICATION;
+import static javax.faces.event.PhaseId.PROCESS_VALIDATIONS;
+import static javax.faces.event.PhaseId.RESTORE_VIEW;
+import static javax.faces.event.PhaseId.UPDATE_MODEL_VALUES;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.richfaces.tests.metamer.ftest.richDragIndicator.Indicator.IndicatorState.ACCEPTING;
@@ -29,7 +35,6 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
import java.net.URL;
@@ -138,21 +143,39 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10334")
public void testExecute() {
- fail("not working currently");
+ attributes.setExecute("executeChecker");
+
+ testAcception(drg1, ACCEPTING);
+ drag.drop();
+
+ phaseInfo.assertListener(UPDATE_MODEL_VALUES, "executeChecker");
+ phaseInfo.assertListener(INVOKE_APPLICATION, "dropListener");
+ phaseInfo.assertPhases(ANY_PHASE);
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10334")
+ @IssueTracking("https://issues.jboss.org/browse/RF-10535")
public void testImmediate() {
- fail("not working currently");
+ attributes.setImmediate(true);
+
+ testAcception(drg1, ACCEPTING);
+ drag.drop();
+
+ phaseInfo.assertListener(APPLY_REQUEST_VALUES, "dropListener");
+ phaseInfo.assertPhases(RESTORE_VIEW, APPLY_REQUEST_VALUES);
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10334")
+ @IssueTracking("https://issues.jboss.org/browse/RF-10535")
public void testBypassUpdates() {
- fail("not working currently");
+ attributes.setBypassUpdates(true);
+
+ testAcception(drg1, ACCEPTING);
+ drag.drop();
+
+ phaseInfo.assertListener(PROCESS_VALIDATIONS, "dropListener");
+ phaseInfo.assertPhases(RESTORE_VIEW, APPLY_REQUEST_VALUES, PROCESS_VALIDATIONS);
}
private void testAcceptedDropping(Draggable draggable) {
15 years, 2 months
JBoss Rich Faces SVN: r21686 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-02-16 07:45:40 -0500 (Wed, 16 Feb 2011)
New Revision: 21686
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java
Log:
removed action and actionListener and removed issue tracking (RF-10336)
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml 2011-02-16 11:21:58 UTC (rev 21685)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml 2011-02-16 12:45:40 UTC (rev 21686)
@@ -82,8 +82,6 @@
id="richDropTarget1"
dropValue="#{richDropTargetBean.dropValue}"
dropListener="#{richDropListenerBean.processDragging}"
- action="#{richBean.dummyAction}"
- actionListener="#{richBean.dummyActionListener}"
acceptedTypes="#{richDropTargetBean.attributes['acceptedTypes'].value}"
bypassUpdates="#{richDropTargetBean.attributes['bypassUpdates'].value}"
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java 2011-02-16 11:21:58 UTC (rev 21685)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java 2011-02-16 12:45:40 UTC (rev 21686)
@@ -138,18 +138,6 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10336")
- public void testAction() {
- fail("not working currently");
- }
-
- @Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10336")
- public void testActionListener() {
- fail("not working currently");
- }
-
- @Test
@IssueTracking("https://issues.jboss.org/browse/RF-10334")
public void testExecute() {
fail("not working currently");
15 years, 2 months
JBoss Rich Faces SVN: r21685 - in trunk/ui/input/ui/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-02-16 06:21:58 -0500 (Wed, 16 Feb 2011)
New Revision: 21685
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.js
trunk/ui/input/ui/src/main/templates/inputnumberslider.template.xml
Log:
RF-10494: Input Number Slider is fixed for IE 7
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss 2011-02-16 09:37:03 UTC (rev 21684)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss 2011-02-16 11:21:58 UTC (rev 21685)
@@ -91,8 +91,13 @@
text-align: left;
/* outline style fix for chrome */
font-size: 0px;
+ max-width: 100%;
}
+.rf-insl-hnd-cntr {
+ min-width: 0;
+}
+
.rf-insl-hnd, .rf-insl-hnd-dis, .rf-insl-dec, .rf-insl-inc, .rf-insl-dec-dis, .rf-insl-inc-dis {
display: inline-block;
width: 7px;
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.js 2011-02-16 09:37:03 UTC (rev 21684)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.js 2011-02-16 11:21:58 UTC (rev 21685)
@@ -44,15 +44,15 @@
this.element = jQuery(this.attachToDom());
this.input = this.element.children(".rf-insl-inp-cntr").children(".rf-insl-inp");
this.track = this.element.children(".rf-insl-trc-cntr").children(".rf-insl-trc");
- var handleContainer = this.track.children("span");
- this.handle = handleContainer.children(".rf-insl-hnd, .rf-insl-hnd-dis");
+ this.handleContainer = this.track.children("span");
+ this.handle = this.handleContainer.children(".rf-insl-hnd, .rf-insl-hnd-dis");
this.tooltip = this.element.children(".rf-insl-tt");
var value = Number(this.input.val());
if (isNaN(value)) {
value = this.minValue;
}
- handleContainer.css("display", "block");
+ this.handleContainer.css("display", "block");
this.track.css("padding-right", this.handle.width() + "px");
this.__setValue(value, null, true);
@@ -104,7 +104,7 @@
if (value != this.value) {
this.input.val(value);
var left = 100 * (value - this.minValue) / this.range;
- this.handle.css("margin-left", left + "%");
+ this.handleContainer.css("padding-left", left + "%");
this.tooltip.text(value);
this.tooltip.setPosition(this.handle,{from: 'LT', offset: [0, 5]}); //TODO Seems offset doesn't work now.
this.value = value;
Modified: trunk/ui/input/ui/src/main/templates/inputnumberslider.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/inputnumberslider.template.xml 2011-02-16 09:37:03 UTC (rev 21684)
+++ trunk/ui/input/ui/src/main/templates/inputnumberslider.template.xml 2011-02-16 11:21:58 UTC (rev 21685)
@@ -56,7 +56,7 @@
<span class="rf-insl-mx">#{component.attributes['maxValue']}</span>
</c:if>
<span class="rf-insl-trc #{component.attributes['trackClass']}">
- <span>
+ <span class="rf-insl-hnd-cntr">
<span class="rf-insl-hnd#{component.attributes['disabled'] ? '-dis' : ''} #{component.attributes['handleClass']}" />
</span>
</span>
15 years, 2 months
JBoss Rich Faces SVN: r21684 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richInplaceInput and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-02-16 04:37:03 -0500 (Wed, 16 Feb 2011)
New Revision: 21684
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java
Log:
transitioned issue tracking to regression testing (RF-10115, RF-10044, RF-9976, RF-10165)
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java 2011-02-16 09:36:18 UTC (rev 21683)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java 2011-02-16 09:37:03 UTC (rev 21684)
@@ -41,6 +41,7 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
import org.testng.annotations.Test;
/**
@@ -394,7 +395,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10115")
+ @RegressionTest("https://issues.jboss.org/browse/RF-10115")
public void testType() {
AttributeLocator attr = button.getAttribute(Attribute.TYPE);
JQueryLocator typeInput = pjq("select[id$=typeInput]");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java 2011-02-16 09:36:18 UTC (rev 21683)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java 2011-02-16 09:37:03 UTC (rev 21684)
@@ -21,9 +21,9 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richInplaceInput;
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardNoRequest;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
@@ -41,6 +41,7 @@
import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
import org.testng.annotations.Test;
/**
@@ -234,7 +235,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10044")
+ @RegressionTest("https://issues.jboss.org/browse/RF-10044")
public void testOnchange() {
selenium.type(pjq("input[type=text][id$=onchangeInput]"), "metamerEvents += \"change \"");
selenium.waitForPageToLoad();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-02-16 09:36:18 UTC (rev 21683)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-02-16 09:37:03 UTC (rev 21684)
@@ -300,7 +300,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10165")
+ @RegressionTest("https://issues.jboss.org/browse/RF-10165")
public void testItemchangeEvents() {
selenium.type(pjq("input[type=text][id$=onbeforeitemchangeInput]"), "metamerEvents += \"beforeitemchange \"");
selenium.waitForPageToLoad();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java 2011-02-16 09:36:18 UTC (rev 21683)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java 2011-02-16 09:37:03 UTC (rev 21684)
@@ -36,7 +36,7 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
-import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.Test;
@@ -87,7 +87,7 @@
@Test
@Use(field = "item", value = "items")
- @IssueTracking("https://issues.jboss.org/browse/RF-9976")
+ @RegressionTest("https://issues.jboss.org/browse/RF-9976")
public void testItemClass() {
testStyleClass(item, "itemClass");
}
@@ -156,7 +156,7 @@
@Test
@Use(field = "item", value = "items")
- @IssueTracking("https://issues.jboss.org/browse/RF-9976")
+ @RegressionTest("https://issues.jboss.org/browse/RF-9976")
public void testItemStyle() {
testStyle(item, "itemStyle");
}
15 years, 2 months