JBoss Rich Faces SVN: r23173 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-24 04:11:47 -0500 (Tue, 24 Jan 2012)
New Revision: 23173
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
Log:
RF-10197: add tests for @style for rich:contextMenu
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java 2012-01-24 09:11:32 UTC (rev 23172)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java 2012-01-24 09:11:47 UTC (rev 23173)
@@ -299,9 +299,14 @@
}
- // @Test
+ @Test
public void testStyle() {
-
+ String styleVal = "background-color: yellow;";
+ contextMenuAttributes.set(style, styleVal);
+ clickOnTarget(menuElem);
+ waitModel.until(attributeEquals.locator(contextMenu.getAttribute(Attribute.STYLE)).text(styleVal));
+ String style = selenium.getAttribute(contextMenu.getAttribute(Attribute.STYLE));
+ assertTrue(style.contains(styleVal));
}
@Test
12 years, 11 months
JBoss Rich Faces SVN: r23172 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-24 04:11:32 -0500 (Tue, 24 Jan 2012)
New Revision: 23172
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
Log:
RF-10197: add tests for @styleClass on rich:contextMenu
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java 2012-01-24 09:11:16 UTC (rev 23171)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java 2012-01-24 09:11:32 UTC (rev 23172)
@@ -304,9 +304,12 @@
}
- // @Test
+ @Test
public void testStyleClass() {
-
+ String styleClassVal = "test-style-class";
+ contextMenuAttributes.set(styleClass, styleClassVal);
+ String styleClass = selenium.getAttribute(contextMenu.getAttribute(Attribute.CLASS));
+ assertTrue(styleClass.contains(styleClassVal));
}
@Test
12 years, 11 months
JBoss Rich Faces SVN: r23171 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-24 04:11:16 -0500 (Tue, 24 Jan 2012)
New Revision: 23171
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
Log:
RF-10197: add test for @title on rich:contextMenu
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java 2012-01-23 09:09:32 UTC (rev 23170)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java 2012-01-24 09:11:16 UTC (rev 23171)
@@ -30,6 +30,7 @@
import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.*;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertEquals;
import java.net.URL;
@@ -308,9 +309,11 @@
}
- // @Test
+ @Test
public void testTitle() {
-
+ String titleVal = "test title";
+ contextMenuAttributes.set(title, titleVal);
+ assertEquals(selenium.getAttribute(contextMenu.getAttribute(Attribute.TITLE)), titleVal);
}
// @Test
12 years, 11 months
JBoss Rich Faces SVN: r23170 - in modules/tests/metamer/trunk: application/src/main/webapp/components/richFileUpload and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-23 04:09:32 -0500 (Mon, 23 Jan 2012)
New Revision: 23170
Removed:
modules/tests/metamer/trunk/application/src/main/webapp/resources/script/push.js
modules/tests/metamer/trunk/notes
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml
Log:
RF-10197: fix merge problems
Following files modifies:
modified: application/src/main/webapp/components/richFileUpload/list.xhtml (removed MERGE CONFLICT mark)
deleted: application/src/main/webapp/resources/script/push.js (this file was renamed to pushHelper.js)
deleted: notes (no longer needed)
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml 2012-01-23 09:09:32 UTC (rev 23170)
@@ -34,14 +34,11 @@
<metamer:testPageLink id="simple" outcome="simple" value="Simple">
Simple page containing <b>rich:fileUpload</b> and inputs for all its attributes.
</metamer:testPageLink>
-<<<<<<< HEAD
<metamer:testPageLink id="rf-11825" outcome="rf-11825" value="RF-11825">
Simple page containing composite component containing <b>rich:fileUpload</b>
to demonstrate <a href="https://issues.jboss.org/browse/RF-11825">RF-11825</a>
</metamer:testPageLink>
-=======
->>>>>>> feature/contextMenu
</ui:define>
Deleted: modules/tests/metamer/trunk/application/src/main/webapp/resources/script/push.js
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/resources/script/push.js 2012-01-22 22:30:29 UTC (rev 23169)
+++ modules/tests/metamer/trunk/application/src/main/webapp/resources/script/push.js 2012-01-23 09:09:32 UTC (rev 23170)
@@ -1,6 +0,0 @@
-function updateList(data) {
- author = '<span style="font-weight:bold" class="author">' + data.author + '</span>: ';
- message = '<span class="message">' + data.text + '</span>';
- timestamp = ' <span>[' + data.timestamp + ']</span>';
- jQuery("ul.push-list").append('<li>' + author + message + timestamp + '</li>');
-}
Deleted: modules/tests/metamer/trunk/notes
===================================================================
--- modules/tests/metamer/trunk/notes 2012-01-22 22:30:29 UTC (rev 23169)
+++ modules/tests/metamer/trunk/notes 2012-01-23 09:09:32 UTC (rev 23170)
@@ -1,22 +0,0 @@
-
-label: where should this attribute value apears
-
-showEvent: list of attacheable events (format)
-
-onmouseup: it is ok that this event is triggered before menu show? (so, you get this event everytime you click to trigger menu show)
-
-Doesn't work within following containers:
- - Rich Collapsible Sub Table
- - Rich Data Table
- - Rich Data Grid
- - Rich Exatended Data Table
- - Rich List
- - JSF Data Table
- - UI Repeat
- - A4j Repeat
-
-
-
-
-
-<h:outputScript library="script" name="picturesUtils.js"/>
12 years, 11 months
JBoss Rich Faces SVN: r23169 - in modules/tests/metamer/trunk: application/src/main/java/org/richfaces/tests/metamer/bean and 21 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-22 17:30:29 -0500 (Sun, 22 Jan 2012)
New Revision: 23169
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/
modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/components.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/pics/
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/pics/pic9.jpg
modules/tests/metamer/trunk/application/src/main/webapp/resources/script/push.js
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/ContextMenuAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
modules/tests/metamer/trunk/notes
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jPush/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/keepSaved.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/keepSaved.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/keepSaved.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/editor.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richList/keepSaved.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
modules/tests/metamer/trunk/pom.xml
Log:
RF-10197: Merge contextMenu tests into trunk
Conflicts:
application/src/main/java/org/richfaces/demo/push/TopicsContextMessageProducer.java
application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java
application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichHotKeyBean.java
application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessageBean.java
application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.java
application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTooltipBean.java
application/src/main/webapp/components/a4jPush/simple.xhtml
application/src/main/webapp/components/a4jRepeat/keepSaved.xhtml
application/src/main/webapp/components/richCollapsibleSubTable/keepSaved.xhtml
application/src/main/webapp/components/richDataGrid/keepSaved.xhtml
application/src/main/webapp/components/richDataTable/keepSaved.xhtml
application/src/main/webapp/components/richDragIndicator/simple.xhtml
application/src/main/webapp/components/richDragSource/cc.xhtml
application/src/main/webapp/components/richDragSource/simple.xhtml
application/src/main/webapp/components/richDropTarget/simple.xhtml
application/src/main/webapp/components/richExtendedDataTable/keepSaved.xhtml
application/src/main/webapp/components/richExtendedDataTable/list.xhtml
application/src/main/webapp/components/richFileUpload/list.xhtml
application/src/main/webapp/components/richHotKey/editor.xhtml
application/src/main/webapp/components/richHotKey/orderingList.xhtml
application/src/main/webapp/components/richHotKey/pickList.xhtml
application/src/main/webapp/components/richHotKey/simple.xhtml
application/src/main/webapp/components/richList/keepSaved.xhtml
application/src/main/webapp/components/richTabPanel/list.xhtml
application/src/main/webapp/components/richTooltip/list.xhtml
application/src/main/webapp/components/richTree/rf-10994.xhtml
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTree.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
ftest/src/test/resources/testng-misc.xml
pom.xml
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2012-01-22 22:30:29 UTC (rev 23169)
@@ -132,6 +132,7 @@
richComponents.put("richColumn", "Rich Column");
richComponents.put("richColumnGroup", "Rich Column Group");
richComponents.put("richComponentControl", "Rich Component Control");
+ richComponents.put("richContextMenu", "Rich Context Menu");
richComponents.put("richDataGrid", "Rich Data Grid");
richComponents.put("richDataScroller", "Rich Data Scroller");
richComponents.put("richDataTable", "Rich Data Table");
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java 2012-01-22 22:30:29 UTC (rev 23169)
@@ -72,7 +72,6 @@
topicsContext = TopicsContext.lookup();
attributes = Attributes.getComponentAttributesFromClass(UIPush.class, getClass());
-
}
/**
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java 2012-01-22 22:30:29 UTC (rev 23169)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010-2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIContextMenu;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:contextMenu
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richContextMenuBean")
+@ViewScoped
+public class RichContextMenuBean implements Serializable {
+
+ /** Generated serial version UID */
+ private static final long serialVersionUID = 1323565239250527128L;
+ private static Logger log = LoggerFactory.getLogger(RichContextMenuBean.class);
+
+ private Attributes attributes;
+ private String current;
+
+ @PostConstruct
+ public void init() {
+ log.info("ContextMenu attributes initialized.");
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIContextMenu.class, getClass());
+ attributes.setAttribute("disabled", "false");
+ attributes.setAttribute("rendered", "true");
+ attributes.setAttribute("hideDelay", "600");
+
+ attributes.remove("attachTo");
+ }
+
+ public String doNew() {
+ this.current = "New";
+ return null;
+ }
+
+ public String doOpen() {
+ this.current = "Open";
+ return null;
+ }
+
+ public String doClose() {
+ this.current = "Close";
+ return null;
+ }
+
+ public String doSave() {
+ this.current = "Save";
+ return null;
+ }
+
+ public String doSaveAll() {
+ this.current = "Save All";
+ return null;
+ }
+
+ public String doExit() {
+ this.current = "Exit";
+ return null;
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getCurrent() {
+ return current;
+ }
+
+ public void setCurrent(String current) {
+ this.current = current;
+ }
+
+}
Added: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.properties 2012-01-22 22:30:29 UTC (rev 23169)
@@ -0,0 +1,21 @@
+attr.direction.auto=auto
+attr.direction.topLeft=topLeft
+attr.direction.topRight=topRight
+attr.direction.bottomLeft=bottomLeft
+attr.direction.bottomRight=bottomRight
+attr.direction.autoLeft=autoLeft
+attr.direction.autoRight=autoRight
+attr.direction.topAuto=topAuto
+attr.direction.bottomAuto=bottomAuto
+attr.jointPoint.auto=auto
+attr.jointPoint.topLeft=topLeft
+attr.jointPoint.topRight=topRight
+attr.jointPoint.bottomLeft=bottomLeft
+attr.jointPoint.bottomRight=bottomRight
+attr.jointPoint.autoLeft=autoLeft
+attr.jointPoint.autoRight=autoRight
+attr.jointPoint.topAuto=topAuto
+attr.jointPoint.bottomAuto=bottomAuto
+attr.mode.ajax=ajax
+attr.mode.client=client
+attr.mode.server=server
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jPush/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jPush/simple.xhtml 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jPush/simple.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -59,9 +59,7 @@
</div>
</a4j:outputPanel>
</h:panelGrid>
-
-
</ui:define>
<ui:define name="outOfTemplateAfter">
@@ -69,4 +67,4 @@
</ui:define>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/keepSaved.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/keepSaved.xhtml 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/keepSaved.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -26,7 +26,6 @@
-->
<ui:composition template="/templates/template.xhtml">
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/keepSaved.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/keepSaved.xhtml 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/keepSaved.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -73,4 +73,4 @@
<ui:define name="outOfTemplateAfter"/>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/components.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/components.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/components.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -0,0 +1,131 @@
+<?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:h="http://java.sun.com/jsf/html"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+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="view">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="head">
+
+ </ui:define>
+
+ <ui:define name="component">
+
+ <table>
+ <thead>
+ <td>h:graphicImage</td>
+ <td>h:dataTable</td>
+ <td>h:outputText</td>
+ <td>div</td>
+ <td>rich:panelGroup</td>
+ </thead>
+ <tfoot>
+ <td><i>form:imageClick</i></td>
+ <td><i>form:tableClick</i></td>
+ <td><i>form:outputTextClick</i></td>
+ <td><i>divClick</i></td>
+ <td><i>form:panelClick</i></td>
+ </tfoot>
+ <tr>
+ <td>
+ <h:graphicImage id="imageClick" value="/resources/images/pics/pic9.jpg" style="border : 5px solid #E4EAEF"/>
+ </td>
+ <td>
+ <h:dataTable id="tableClick" style="width:150px; height: 130px; background-color: lightgreen; padding: 10px; border: 5px solid #E4EAEF" />
+ </td>
+ <td>
+ <h:outputLabel id="outputTextClick" value="outputTextClick" />
+ </td>
+ <td>
+ <div id="divClick" style="width:120px; height: 100px; background-color: lightgreen; padding: 10px; border: 5px solid #E4EAEF"/>
+
+ </td>
+ <td>
+ <h:panelGroup id="panelClick" layout="block" style="width:120px; height: 100px; background-color: lightgreen; padding: 10px; border: 5px solid #E4EAEF;"/>
+ </td>
+ </tr>
+ </table>
+
+ <rich:contextMenu id="ctxmenu"
+ attachTo="#{richContextMenuBean.attributes['attachTo'].value}"
+ dir="#{richContextMenuBean.attributes['dir'].value}"
+ direction="#{richContextMenuBean.attributes['direction'].value}"
+ disabled="#{richContextMenuBean.attributes['disabled'].value}"
+ hideDelay="#{richContextMenuBean.attributes['hideDelay'].value}"
+ horizontalOffset="#{richContextMenuBean.attributes['horizontalOffset'].value}"
+ jointPoint="#{richContextMenuBean.attributes['jointPoint'].value}"
+ label="#{richContextMenuBean.attributes['label'].value}"
+ lang="#{richContextMenuBean.attributes['lang'].value}"
+ mode="#{richContextMenuBean.attributes['mode'].value}"
+ onclick="#{richContextMenuBean.attributes['onclick'].value}"
+ ondblclick="#{richContextMenuBean.attributes[''].value}"
+ ongrouphide="#{richContextMenuBean.attributes['ongrouphide'].value}"
+ ongroupshow="#{richContextMenuBean.attributes['ongroupshow'].value}"
+ onhide="#{richContextMenuBean.attributes['onhide'].value}"
+ onitemclick="#{richContextMenuBean.attributes['onitemclick'].value}"
+ onkeydown="#{richContextMenuBean.attributes['onkeydown'].value}"
+ onkeypress="#{richContextMenuBean.attributes['onkeypress'].value}"
+ onkeyup="#{richContextMenuBean.attributes['onkeyup'].value}"
+ onmousedown="#{richContextMenuBean.attributes['onmousedown'].value}"
+ onmousemove="#{richContextMenuBean.attributes['onmousemove'].value}"
+ onmouseout="#{richContextMenuBean.attributes['onmouseout'].value}"
+ onmouseover="#{richContextMenuBean.attributes['onmouseover'].value}"
+ onmouseup="#{richContextMenuBean.attributes['onmouseup'].value}"
+ onshow="#{richContextMenuBean.attributes['onshow'].value}"
+ popupWidth="#{richContextMenuBean.attributes['popupWidth'].value}"
+ rendered="#{richContextMenuBean.attributes['rendered'].value}"
+ showDelay="#{richContextMenuBean.attributes['showDelay'].value}"
+ showEvent="#{richContextMenuBean.attributes['showEvent'].value}"
+ style="#{richContextMenuBean.attributes['showEvent'].value}"
+ styleClass="#{richContextMenuBean.attributes['styleClass'].value}"
+ title="#{richContextMenuBean.attributes['title'].value}"
+ verticalOffset="#{richContextMenuBean.attributes['verticalOffset'].value}"
+ >
+ <rich:menuItem id="menuItem31" label="Save" icon="/resources/images/icons/save.gif" />
+ <rich:menuItem id="zin" label="Zoom In" onclick="enlarge('imageClick');" />
+ <rich:menuItem id="zout" label="Zoom Out" onclick="decrease('imageClick');" />
+ </rich:contextMenu>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richContextMenuBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/list.xhtml (from rev 23160, modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/list.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -0,0 +1,46 @@
+<?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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+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/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Context Menu</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ Simple page that contains rich:contextMenu
+ </metamer:testPageLink>
+
+ <metamer:testPageLink id="components" outcome="components" value="Various components as placeholder">
+ Simple page that contains various components as placeholder to invoke rich:contextMenu
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richContextMenu/simple.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -0,0 +1,125 @@
+<?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:h="http://java.sun.com/jsf/html" 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:a4j="http://richfaces.org/a4j" >
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2012, 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:param name="componentId" value="panelClick" />
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="component">
+ <h:panelGroup layout="block" style="width:500px; background-color: lightgreen; padding: 15px" id="panelClick">
+ Righ click here for a contextMenu
+ </h:panelGroup>
+ <rich:contextMenu id="ctxMenu"
+ attachTo="#{nestedComponentId}"
+ dir="#{richContextMenuBean.attributes['dir'].value}"
+ direction="#{richContextMenuBean.attributes['direction'].value}"
+ disabled="#{richContextMenuBean.attributes['disabled'].value}"
+ hideDelay="#{richContextMenuBean.attributes['hideDelay'].value}"
+ horizontalOffset="#{richContextMenuBean.attributes['horizontalOffset'].value}"
+ jointPoint="#{richContextMenuBean.attributes['jointPoint'].value}"
+ lang="#{richContextMenuBean.attributes['lang'].value}"
+ mode="#{richContextMenuBean.attributes['mode'].value}"
+ onclick="#{richContextMenuBean.attributes['onclick'].value}"
+ ondblclick="#{richContextMenuBean.attributes['ondblclick'].value}"
+ ongrouphide="#{richContextMenuBean.attributes['ongrouphide'].value}"
+ ongroupshow="#{richContextMenuBean.attributes['ongroupshow'].value}"
+ onhide="#{richContextMenuBean.attributes['onhide'].value}"
+ onitemclick="#{richContextMenuBean.attributes['onitemclick'].value}"
+ onkeydown="#{richContextMenuBean.attributes['onkeydown'].value}"
+ onkeypress="#{richContextMenuBean.attributes['onkeypress'].value}"
+ onkeyup="#{richContextMenuBean.attributes['onkeyup'].value}"
+ onmousedown="#{richContextMenuBean.attributes['onmousedown'].value}"
+ onmousemove="#{richContextMenuBean.attributes['onmousemove'].value}"
+ onmouseout="#{richContextMenuBean.attributes['onmouseout'].value}"
+ onmouseover="#{richContextMenuBean.attributes['onmouseover'].value}"
+ onmouseup="#{richContextMenuBean.attributes['onmouseup'].value}"
+ onshow="#{richContextMenuBean.attributes['onshow'].value}"
+ popupWidth="#{richContextMenuBean.attributes['popupWidth'].value}"
+ rendered="#{richContextMenuBean.attributes['rendered'].value}"
+ showDelay="#{richContextMenuBean.attributes['showDelay'].value}"
+ showEvent="#{richContextMenuBean.attributes['showEvent'].value}"
+ style="#{richContextMenuBean.attributes['style'].value}"
+ styleClass="#{richContextMenuBean.attributes['styleClass'].value}"
+ title="#{richContextMenuBean.attributes['title'].value}"
+ verticalOffset="#{richContextMenuBean.attributes['verticalOffset'].value}"
+ >
+ <rich:menuItem id="menuItem2" label="Open" action="#{richContextMenuBean.doOpen}" icon="/resources/images/icons/open.gif" />
+
+ <rich:menuGroup id="menuGroup3" label="Open Recent..." disabled="true">
+ <rich:menuItem id="menuItem31" label="Save" action="#{richContextMenuBean.doSave}" icon="/resources/images/icons/save.gif" />
+ <rich:menuItem id="menuItem32" label="Save All" action="#{richContextMenuBean.doSaveAll}">
+ <f:facet name="icon">
+ <h:graphicImage library="images/icons" name="save_all.gif" />
+ </f:facet>
+ </rich:menuItem>
+ </rich:menuGroup>
+
+ <rich:menuSeparator id="menuSeparator11" />
+
+ <rich:menuGroup id="menuGroup4" label="Save As...">
+ <rich:menuItem id="menuItem41" label="Save" action="#{richContextMenuBean.doSave}" icon="/resources/images/icons/save.gif" />
+ <rich:menuItem id="menuItem42" label="Save All" action="#{richContextMenuBean.doSaveAll}" >
+ <f:facet name="icon">
+ <h:graphicImage library="images/icons" name="save_all.gif" />
+ </f:facet>
+ </rich:menuItem>
+ <rich:menuItem id="menuItem43" label="Send Online" icon="/resources/images/icons/save.gif" disabled="true" />
+ </rich:menuGroup>
+
+ <rich:menuItem id="menuItem5" label="Print" disabled="true"/>
+
+ <rich:menuItem id="menuItem6" label="Close" />
+
+ <rich:menuSeparator id="menuSeparator12" />
+
+ <rich:menuItem id="menuItem7" label="Exit" />
+ </rich:contextMenu>
+
+ <br/>
+ <a4j:outputPanel ajaxRendered="true">
+ Current Selection:
+ <h:outputText id="output" style="font-weight:bold" value="#{richContextMenuBean.current}"></h:outputText>
+ </a4j:outputPanel>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richContextMenuBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
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 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -174,4 +174,4 @@
</ui:define>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/keepSaved.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/keepSaved.xhtml 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/keepSaved.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -79,4 +79,4 @@
<ui:define name="outOfTemplateAfter"/>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -34,11 +34,14 @@
<metamer:testPageLink id="simple" outcome="simple" value="Simple">
Simple page containing <b>rich:fileUpload</b> and inputs for all its attributes.
</metamer:testPageLink>
+<<<<<<< HEAD
<metamer:testPageLink id="rf-11825" outcome="rf-11825" value="RF-11825">
Simple page containing composite component containing <b>rich:fileUpload</b>
to demonstrate <a href="https://issues.jboss.org/browse/RF-11825">RF-11825</a>
</metamer:testPageLink>
+=======
+>>>>>>> feature/contextMenu
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/editor.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/editor.xhtml 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/editor.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -80,4 +80,4 @@
</ui:define>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richList/keepSaved.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richList/keepSaved.xhtml 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richList/keepSaved.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -63,4 +63,4 @@
<ui:define name="outOfTemplateAfter"/>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -92,4 +92,4 @@
</ui:define>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/resources/images/pics/pic9.jpg
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/resources/images/pics/pic9.jpg (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/resources/images/pics/pic9.jpg 2012-01-22 22:30:29 UTC (rev 23169)
@@ -0,0 +1,65 @@
+����
+
+
+
+
+
+��
+��Ǐ�p{g�
+%!O7�'E�����:*F���
+��G�2SIF;}���ǖ~'�Ou����m�
+�b�[-���5��.�/_3�U��ȭ�
+��JPC#=�bڴ�58~�҂��E۔.�Sݢ bv���L#�$��
+tG�Ri�f�f]���r�j��R0�#,E-��G!Rh���Qb��s�#�oo$�VI�Oo�XH��ʵ4�`4�)�;7�ED���J��m�r2�ڸs8�������0jOVi��/B���p0F
+�ˆ��_Kq�Θw�Xq�HB�䞞���a���c�T���T&���O)�#S��(g=��<�k���-��w�{���LK�:�:�pK���H���R��Bof�R���L������B�J�
+�A!�M�L��J���F#ա����r� ]�b%fa�
+�� K/C\��:�kf�t�Ӧ��!K{������+j/�2��p�=G�H�M=���5��V�/�����k쮽�����N�m��s�L_�Z��
+\�kgg-��Giaj��y�DQF���~�v��V�/��9���C����e�G�E'6����K���Q �F�/�4��.N]�Э8��2�T�����I�\�v�\�Lr<�hUl+W-�(fnt��|���er��Muf�yVIm�ӓ���02\��g���Ӥ:�|����o��4��,fJĠ��]�#��\+F��$3�)�TR�N'�Qk-��id��Vn��H�"�(Q���"�2���얡Ml]Ի����Wݤ�`&�{y��n
+B�@ ����#
+R�
+jK濘�rZFX��:�g�Q(��.� 4!hG�W��vtY�����|���&4)e4�<iQ�Z�Y_?1�I�9�d/��2��HFG��bo:�J48Q⸑R�BȦH��l��<(�`Z:#�����k=��km<˛��u�R�FV�QP�1���4�3j��
+yc@��wt��eL9@�
+F(��#H=?��M8铖��
+g�7��xɏu��H�&��F�t4�Ԫ(�&�o�r�\�SL�z�^I�n.8r̒�纽�Id{��T�R3;��wv,I,jY�qϩ}B�����&f
+D�D*j<��8e�)��dwi,b6�PU�d
+9b��Z��eܢ��xڕ�
+B
+���',��"�t/���p72{��q�_���:I_(U�`Z�x�w{;�0�~�J�U�.�G[sK-���0y�5i
+�1�G�|��웵�m7p\�M�s ��̩r�YYe��:�������-��57=�*W%���
+Dg����v��)�0,{�x����ס��y��q�6y�`5NaI�T�#H5L-���R8N�����i�}�7h@anДJ���GDY)[�$�2��W���"A
+Gg����z��Ԛ(�vA�j��dKt�
+*�J�<�$�}0��;�夿Fiֿ2[Au%�NG�cM�l��,���?RT�-��WW�x1J�L��k���m�s��{���Os1�<�"+ZP%G`�2��r��ߵ���3X[���kwrHH�@}SL�UZ�J��jR�oL�����r�4��7�U��s%��j�
+�H��
+Q%M2ɶ�a��w���%a��r��M"깙�8�R��G��&�\��h��w��o����f�k�
+Ck&�θ$[E
+:���'Prœ$�R�EO�i���$����Kw�eɁ��'�j��7-��l���o$��مK}�vYc�Ʒhk��{E
+��Qp�6�قG�ʕ۱OًI([���aHm"�}�
+�%��v0#���T�8���
+��B�\�6�c�����)I���"ߕ�-%+�ʝ��b��a|Ȫ7�x4;>��,�y�lf�]D��2�0�F$�Z�k"L��W5[m3��$�O�=��l{`cWv�y�.x4�I �!��
++� ��q�BW�#���6Lc�����
+B�H@����� �)�f
+�!�cb$��^!k�q�[b��T�&t P5H�������5�ȸ�-$0F�n��������5�ۉY�R�._M��E�����z��
+���Ƹ�����2�P�Ȓ
+X�X�caN��َ+SS�<�
+�YDF�ڈd*=5�P%}$��scS�7QdH
+h
+0*�lc�Y��WX�r�-�w>�T���:4�1��mѢ;b�h�9ԻU��cp�@�a��bU�T}Fg�ְ�[v/Q|�Ӫ�%�!�\�0�
++C�7fyu�Q�Nw['5?1|x��R�T�����
+��4�mt�Q'�|������.���9��hhY*(�0?��z�*��H/X�}�g\��;��ڻ�����X=z�O:,�R;s&�~�z2yM'��`;�~�8R3�<�֜5ۂB; <��>�&�$!!��I�9�p�M���~���1����r�)�{�W����
+�^���
+��
+��f�C�����q�)K�~�ŁY��n��
+k��}���
\ No newline at end of file
Property changes on: modules/tests/metamer/trunk/application/src/main/webapp/resources/images/pics/pic9.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: modules/tests/metamer/trunk/application/src/main/webapp/resources/script/push.js
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/resources/script/push.js (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/resources/script/push.js 2012-01-22 22:30:29 UTC (rev 23169)
@@ -0,0 +1,6 @@
+function updateList(data) {
+ author = '<span style="font-weight:bold" class="author">' + data.author + '</span>: ';
+ message = '<span class="message">' + data.text + '</span>';
+ timestamp = ' <span>[' + data.timestamp + ']</span>';
+ jQuery("ul.push-list").append('<li>' + author + message + timestamp + '</li>');
+}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java 2012-01-22 22:30:29 UTC (rev 23169)
@@ -16,6 +16,7 @@
import org.richfaces.tests.metamer.ftest.richCollapsibleSubTableToggler.CollapsibleSubTableTogglerAttributes;
import org.richfaces.tests.metamer.ftest.richColumn.ColumnAttributes;
import org.richfaces.tests.metamer.ftest.richComponentControl.ComponentControlAttributes;
+import org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes;
import org.richfaces.tests.metamer.ftest.richDataScroller.DataScrollerAttributes;
import org.richfaces.tests.metamer.ftest.richDragIndicator.DragIndicatorAttributes;
import org.richfaces.tests.metamer.ftest.richDragSource.DragSourceAttributes;
@@ -65,5 +66,6 @@
public static Attributes<PickListAttributes> pickListAttributes = new Attributes<PickListAttributes>();
public static Attributes<TreeAttributes> treeAttributes = new Attributes<TreeAttributes>(jq("span[id*=attributes]"));
public static Attributes<MenuItemAttributes> menuItemAttributes = new Attributes<MenuItemAttributes>();
+ public static Attributes<ContextMenuAttributes> contextMenuAttributes = new Attributes<ContextMenuAttributes>();
}
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/ContextMenuAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/ContextMenuAttributes.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/ContextMenuAttributes.java 2012-01-22 22:30:29 UTC (rev 23169)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.richContextMenu;
+
+import org.richfaces.tests.metamer.ftest.attributes.AttributeEnum;
+
+/**
+ * Component attributes for rich:contextMenu
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+public enum ContextMenuAttributes implements AttributeEnum {
+ attachTo,
+ dir,
+ direction,
+ disabled,
+ hideDelay,
+ horizontalOffset,
+ jointPoint,
+ lang,
+ mode,
+ onclick,
+ ondblclick,
+ ongrouphide,
+ ongroupshow,
+ onhide,
+ onitemclick,
+ onkeydown,
+ onkeypress,
+ onkeyup,
+ onmousedown,
+ onmousemove,
+ onmouseout,
+ onmouseover,
+ onmouseup,
+ onshow,
+ popupWidth,
+ endered,
+ showDelay,
+ showEvent,
+ style,
+ styleClass,
+ title,
+ verticalOffset
+}
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java 2012-01-22 22:30:29 UTC (rev 23169)
@@ -0,0 +1,321 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.richContextMenu;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
+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.richfaces.tests.metamer.ftest.attributes.AttributeList.contextMenuAttributes;
+import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.*;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import java.net.URL;
+
+import org.jboss.test.selenium.dom.Event;
+import org.jboss.test.selenium.geometry.Point;
+import org.jboss.test.selenium.locator.Attribute;
+import org.jboss.test.selenium.locator.AttributeLocator;
+import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.locator.LocatorFactory;
+import org.jboss.test.selenium.waiting.EventFiredCondition;
+import org.jboss.test.selenium.waiting.selenium.SeleniumCondition;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.Test;
+
+/**
+ * Test for rich:contextMenu component at faces/components/richContextMenu/simple.xhtml
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+public class TestRichContextMenu extends AbstractMetamerTest {
+
+ private static final Logger log = LoggerFactory.getLogger(TestRichContextMenu.class);
+
+ private JQueryLocator menuElemFormat = pjq("div[id$=:{0}]");
+ private String menuElemId = "panelClick";
+ private JQueryLocator menuElem = menuElemFormat.format(menuElemId);
+ // contextMenu elem is always present (and selenium consider it as displayed and visible as well)
+ private JQueryLocator contextMenu = jq("div[id$=:ctxMenu]");
+ private JQueryLocator ctxMenuItemFormat = jq("div.rf-ctx-itm:eq({0})");
+
+ // content display is triggered by action
+ private JQueryLocator contextMenuContent = jq("div.rf-ctx-lst");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richContextMenu/simple.xhtml");
+ }
+
+ private void clickOnTarget(JQueryLocator target) {
+ // mouseDownRight doesn't work, so have to use left click for common cases
+ contextMenuAttributes.set(showEvent, "click");
+
+ Point position = selenium.getElementPosition(target);
+ selenium.clickAt(target, position.minus(new Point(0, 70)));
+ }
+
+ private void testFireContextMenuEvent(Event event, ElementLocator<?> element) {
+ testFireContextMenuEvent(event, element, event.getEventName());
+ }
+
+ private void testFireContextMenuEvent(Event event, ElementLocator<?> element, String attributeName) {
+ ElementLocator<?> eventInput = pjq("input[id$=on" + attributeName + "Input]");
+ String value = "metamerEvents += \"" + event.getEventName() + " \"";
+
+ guardHttp(selenium).type(eventInput, value);
+
+ clickOnTarget(menuElem);
+
+ waitModel.until(isDisplayed.locator(contextMenuContent));
+
+ selenium.fireEvent(element, event);
+
+ waitGui.failWith("Attribute on" + attributeName + " does not work correctly").until(
+ new EventFiredCondition(event));
+ }
+
+ @Test
+ public void testAttachTo() {
+ contextMenuAttributes.set(attachTo, "form:" + menuElemId);
+
+ // contextMenu element is present always. Check if is displayed
+ assertFalse(selenium.isVisible(contextMenuContent));
+ assertTrue(selenium.isDisplayed(contextMenuContent));
+ clickOnTarget(menuElem);
+ assertTrue(selenium.isVisible(contextMenuContent));
+ assertTrue(selenium.isDisplayed(contextMenuContent));
+ }
+
+ @Test
+ public void testDir() {
+ contextMenuAttributes.set(dir, "rtl");
+ log.debug(selenium.getAttribute(contextMenu.getAttribute(new Attribute("dir"))));
+ }
+
+ // @Test
+ public void testDirection() {
+
+ }
+
+ @Test
+ public void testDisabled() {
+ assertTrue(selenium.isElementPresent(contextMenu));
+ assertTrue(selenium.isElementPresent(contextMenuContent));
+
+ contextMenuAttributes.set(disabled, true);
+
+ // contextMenu is present
+ assertTrue(selenium.isElementPresent(contextMenu));
+ // but content not, when disabled
+ assertFalse(selenium.isElementPresent(contextMenuContent));
+ }
+
+ @Test
+ public void testHideDelay() {
+ contextMenuAttributes.set(hideDelay, "500");
+ clickOnTarget(menuElem);
+ assertTrue(selenium.isVisible(contextMenuContent));
+ assertTrue(selenium.isDisplayed(contextMenuContent));
+
+ selenium.fireEvent(menuElem, Event.MOUSEUP);
+ waitModel.until(isNotDisplayed.locator(contextMenuContent));
+
+ assertFalse(selenium.isVisible(contextMenuContent));
+ assertFalse(selenium.isDisplayed(contextMenuContent));
+
+ }
+
+ // @Test
+ public void testHorizontalOffset() {
+
+ }
+
+ // @Test
+ public void testJointPoint() {
+
+ }
+
+ @Test
+ public void testLang() {
+ String langVal = "cs";
+ contextMenuAttributes.set(lang, langVal);
+ //clickOnTarget(menuElem);
+ waitModel.until(attributeEquals.locator(contextMenu.getAttribute(Attribute.LANG)).text(langVal));
+ }
+
+ @Test
+ public void testMode() {
+
+ contextMenuAttributes.set(showEvent, "click");
+ Point position = selenium.getElementPosition(menuElem);
+
+ // ajax
+ contextMenuAttributes.set(mode, "ajax");
+ selenium.clickAt(menuElem, position.minus(new Point(0, 70)));
+ guardXhr(selenium).click(ctxMenuItemFormat.format("0"));
+
+ // client
+ contextMenuAttributes.set(mode, "client");
+ guardNoRequest(selenium).clickAt(menuElem, position.minus(new Point(0, 70)));
+
+ // server
+ contextMenuAttributes.set(mode, "server");
+ guardHttp(selenium).clickAt(menuElem, position.minus(new Point(0, 70)));
+
+ }
+
+ @Test
+ public void testOnclick() {
+ testFireContextMenuEvent(Event.CLICK, contextMenu);
+ }
+
+ @Test
+ public void testOndblclick() {
+ testFireContextMenuEvent(Event.DBLCLICK, contextMenu);
+ }
+
+ // @Test
+ public void testOngrouphide() {
+
+ }
+
+ // @Test
+ public void testOngroupshow() {
+
+ }
+
+ @Test
+ public void testOnhide() {
+ contextMenuAttributes.set(hideDelay, "20");
+ // contextMenuAttributes.set(showEvent, "click");
+
+ String value = "metamerEvents += \"hide\"";
+ ElementLocator<?> eventInput = pjq("input[id$=onhideInput]");
+
+ guardHttp(selenium).type(eventInput, value);
+ clickOnTarget(menuElem);
+ clickOnTarget(menuElem);
+ // selenium.clickAt(menuElem, new Point(-10, -100));
+
+ waitGui.failWith("Attribute onhide does not work correctly").until(
+ new EventFiredCondition(new Event("hide")));
+
+ }
+
+ @Test
+ public void testOnitemclick() {
+ testFireContextMenuEvent(Event.CLICK, ctxMenuItemFormat.format("0"), "itemclick");
+ }
+
+ @Test
+ public void testOnkeydown() {
+ testFireContextMenuEvent(Event.KEYDOWN, contextMenu);
+ }
+
+ @Test
+ public void testOnkeypress() {
+ testFireContextMenuEvent(Event.KEYPRESS, contextMenu);
+ }
+
+ @Test
+ public void testOnkeyup() {
+ testFireContextMenuEvent(Event.KEYUP, contextMenu);
+ }
+
+ @Test
+ public void testOnmousedown() {
+ testFireContextMenuEvent(Event.MOUSEDOWN, contextMenu);
+ }
+
+ @Test
+ public void testOnmousemove() {
+ testFireContextMenuEvent(Event.MOUSEMOVE, contextMenu);
+ }
+
+ @Test
+ public void testOnmouseout() {
+ testFireContextMenuEvent(Event.MOUSEOUT, contextMenu);
+ }
+
+ @Test
+ public void testOnmouseover() {
+ testFireContextMenuEvent(Event.MOUSEOVER, contextMenu);
+ }
+
+ @Test
+ public void testOnmouseup() {
+ testFireContextMenuEvent(Event.MOUSEUP, contextMenu);
+ }
+
+ // @Test
+ public void testOnshow() {
+
+ }
+
+ // @Test
+ public void testPopupWidth() {
+
+ }
+
+ // @Test
+ public void testRendered() {
+
+ }
+
+ // @Test
+ public void testShowDelay() {
+
+ }
+
+ // @Test
+ public void testShowEvent() {
+
+ }
+
+ // @Test
+ public void testStyle() {
+
+ }
+
+ // @Test
+ public void testStyleClass() {
+
+ }
+
+ // @Test
+ public void testTitle() {
+
+ }
+
+ // @Test
+ public void testVerticalOffset() {
+
+ }
+
+}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java 2012-01-22 22:30:29 UTC (rev 23169)
@@ -32,8 +32,8 @@
import org.testng.annotations.Test;
/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a> * @author <a href="mailto:ppitonak@redhat.com">Pavol
- * Pitonak</a>
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
*/
public class TestTreeSelection extends AbstractTestTreeSelection {
Added: modules/tests/metamer/trunk/notes
===================================================================
--- modules/tests/metamer/trunk/notes (rev 0)
+++ modules/tests/metamer/trunk/notes 2012-01-22 22:30:29 UTC (rev 23169)
@@ -0,0 +1,22 @@
+
+label: where should this attribute value apears
+
+showEvent: list of attacheable events (format)
+
+onmouseup: it is ok that this event is triggered before menu show? (so, you get this event everytime you click to trigger menu show)
+
+Doesn't work within following containers:
+ - Rich Collapsible Sub Table
+ - Rich Data Table
+ - Rich Data Grid
+ - Rich Exatended Data Table
+ - Rich List
+ - JSF Data Table
+ - UI Repeat
+ - A4j Repeat
+
+
+
+
+
+<h:outputScript library="script" name="picturesUtils.js"/>
Modified: modules/tests/metamer/trunk/pom.xml
===================================================================
--- modules/tests/metamer/trunk/pom.xml 2012-01-20 14:20:39 UTC (rev 23168)
+++ modules/tests/metamer/trunk/pom.xml 2012-01-22 22:30:29 UTC (rev 23169)
@@ -136,7 +136,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<richfaces.checkstyle.version>3</richfaces.checkstyle.version>
- <version.richfaces>4.1.1-SNAPSHOT</version.richfaces>
+ <version.richfaces>4.2.0-SNAPSHOT</version.richfaces>
</properties>
<dependencyManagement>
12 years, 11 months
JBoss Rich Faces SVN: r23168 - modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-20 09:20:39 -0500 (Fri, 20 Jan 2012)
New Revision: 23168
Modified:
modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
Log:
RFPL-10197: add new tests and fix contextMenu locator
Modified: modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
===================================================================
--- modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java 2012-01-20 14:20:26 UTC (rev 23167)
+++ modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java 2012-01-20 14:20:39 UTC (rev 23168)
@@ -22,14 +22,12 @@
package org.richfaces.tests.metamer.ftest.richContextMenu;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
+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.richfaces.tests.metamer.ftest.attributes.AttributeList.contextMenuAttributes;
-import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.attachTo;
-import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.dir;
-import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.disabled;
-import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.hideDelay;
-import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.showEvent;
+import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.*;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
@@ -38,9 +36,12 @@
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.geometry.Point;
import org.jboss.test.selenium.locator.Attribute;
+import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.locator.LocatorFactory;
import org.jboss.test.selenium.waiting.EventFiredCondition;
+import org.jboss.test.selenium.waiting.selenium.SeleniumCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -60,7 +61,7 @@
private String menuElemId = "panelClick";
private JQueryLocator menuElem = menuElemFormat.format(menuElemId);
// contextMenu elem is always present (and selenium consider it as displayed and visible as well)
- private JQueryLocator contextMenu = jq("div[id$=:ctxmenu]");
+ private JQueryLocator contextMenu = jq("div[id$=:ctxMenu]");
private JQueryLocator ctxMenuItemFormat = jq("div.rf-ctx-itm:eq({0})");
// content display is triggered by action
@@ -160,14 +161,33 @@
}
- // @Test
- public void testLang() {
-
+ @Test
+ public void testLang() {
+ String langVal = "cs";
+ contextMenuAttributes.set(lang, langVal);
+ //clickOnTarget(menuElem);
+ waitModel.until(attributeEquals.locator(contextMenu.getAttribute(Attribute.LANG)).text(langVal));
}
- // @Test
+ @Test
public void testMode() {
-
+
+ contextMenuAttributes.set(showEvent, "click");
+ Point position = selenium.getElementPosition(menuElem);
+
+ // ajax
+ contextMenuAttributes.set(mode, "ajax");
+ selenium.clickAt(menuElem, position.minus(new Point(0, 70)));
+ guardXhr(selenium).click(ctxMenuItemFormat.format("0"));
+
+ // client
+ contextMenuAttributes.set(mode, "client");
+ guardNoRequest(selenium).clickAt(menuElem, position.minus(new Point(0, 70)));
+
+ // server
+ contextMenuAttributes.set(mode, "server");
+ guardHttp(selenium).clickAt(menuElem, position.minus(new Point(0, 70)));
+
}
@Test
@@ -190,9 +210,22 @@
}
- // @Test
+ @Test
public void testOnhide() {
+ contextMenuAttributes.set(hideDelay, "20");
+ // contextMenuAttributes.set(showEvent, "click");
+ String value = "metamerEvents += \"hide\"";
+ ElementLocator<?> eventInput = pjq("input[id$=onhideInput]");
+
+ guardHttp(selenium).type(eventInput, value);
+ clickOnTarget(menuElem);
+ clickOnTarget(menuElem);
+ // selenium.clickAt(menuElem, new Point(-10, -100));
+
+ waitGui.failWith("Attribute onhide does not work correctly").until(
+ new EventFiredCondition(new Event("hide")));
+
}
@Test
12 years, 11 months
JBoss Rich Faces SVN: r23167 - modules/tests/metamer/branches/contextMenu.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-20 09:20:26 -0500 (Fri, 20 Jan 2012)
New Revision: 23167
Modified:
modules/tests/metamer/branches/contextMenu/pom.xml
Log:
RFPL-10197: contextMenu merged into develop
Since RF version with contextMenu stuff merged is 4.2.0-SNAPSHOT, have to update dependency as well. This is done on Svn HEAD, but since this is on branch, have to update dep.manually.
Modified: modules/tests/metamer/branches/contextMenu/pom.xml
===================================================================
--- modules/tests/metamer/branches/contextMenu/pom.xml 2012-01-20 14:20:20 UTC (rev 23166)
+++ modules/tests/metamer/branches/contextMenu/pom.xml 2012-01-20 14:20:26 UTC (rev 23167)
@@ -124,7 +124,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<richfaces.checkstyle.version>3</richfaces.checkstyle.version>
- <version.richfaces>4.1.1-SNAPSHOT</version.richfaces>
+ <version.richfaces>4.2.0-SNAPSHOT</version.richfaces>
</properties>
<dependencyManagement>
12 years, 11 months
JBoss Rich Faces SVN: r23166 - modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-20 09:20:20 -0500 (Fri, 20 Jan 2012)
New Revision: 23166
Modified:
modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
Log:
Remove unused import
Modified: modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
===================================================================
--- modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java 2012-01-20 14:20:05 UTC (rev 23165)
+++ modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java 2012-01-20 14:20:20 UTC (rev 23166)
@@ -32,7 +32,6 @@
import java.net.URL;
-import org.atmosphere.client.JavascriptClientFilter;
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.locator.Attribute;
12 years, 11 months
JBoss Rich Faces SVN: r23165 - modules/tests/metamer/branches/contextMenu/application.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-20 09:20:05 -0500 (Fri, 20 Jan 2012)
New Revision: 23165
Modified:
modules/tests/metamer/branches/contextMenu/application/pom.xml
Log:
Remove servlet-api dependency
Modified: modules/tests/metamer/branches/contextMenu/application/pom.xml
===================================================================
--- modules/tests/metamer/branches/contextMenu/application/pom.xml 2012-01-18 15:21:52 UTC (rev 23164)
+++ modules/tests/metamer/branches/contextMenu/application/pom.xml 2012-01-20 14:20:05 UTC (rev 23165)
@@ -68,11 +68,6 @@
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<scope>provided</scope>
12 years, 11 months
JBoss Rich Faces SVN: r23164 - modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-18 10:21:52 -0500 (Wed, 18 Jan 2012)
New Revision: 23164
Added:
modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
Log:
RF-10197: Add basic event handlers tests
Basic event handlers such as click|dblclick, mouseover|out, keyup|keydown on rich:contextMenu.
Removed (commented) tests not yet implemented
Added: modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java
===================================================================
--- modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java (rev 0)
+++ modules/tests/metamer/branches/contextMenu/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richContextMenu/TestRichContextMenu.java 2012-01-18 15:21:52 UTC (rev 23164)
@@ -0,0 +1,288 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.richContextMenu;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
+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.attributes.AttributeList.contextMenuAttributes;
+import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.attachTo;
+import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.dir;
+import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.disabled;
+import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.hideDelay;
+import static org.richfaces.tests.metamer.ftest.richContextMenu.ContextMenuAttributes.showEvent;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import java.net.URL;
+
+import org.jboss.test.selenium.dom.Event;
+import org.jboss.test.selenium.geometry.Point;
+import org.jboss.test.selenium.locator.Attribute;
+import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.waiting.EventFiredCondition;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.Test;
+
+/**
+ * Test for rich:contextMenu component at faces/components/richContextMenu/simple.xhtml
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+public class TestRichContextMenu extends AbstractMetamerTest {
+
+ private static final Logger log = LoggerFactory.getLogger(TestRichContextMenu.class);
+
+ private JQueryLocator menuElemFormat = pjq("div[id$=:{0}]");
+ private String menuElemId = "panelClick";
+ private JQueryLocator menuElem = menuElemFormat.format(menuElemId);
+ // contextMenu elem is always present (and selenium consider it as displayed and visible as well)
+ private JQueryLocator contextMenu = jq("div[id$=:ctxmenu]");
+ private JQueryLocator ctxMenuItemFormat = jq("div.rf-ctx-itm:eq({0})");
+
+ // content display is triggered by action
+ private JQueryLocator contextMenuContent = jq("div.rf-ctx-lst");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richContextMenu/simple.xhtml");
+ }
+
+ private void clickOnTarget(JQueryLocator target) {
+ // mouseDownRight doesn't work, so have to use left click for common cases
+ contextMenuAttributes.set(showEvent, "click");
+
+ Point position = selenium.getElementPosition(target);
+ selenium.clickAt(target, position.minus(new Point(0, 70)));
+ }
+
+ private void testFireContextMenuEvent(Event event, ElementLocator<?> element) {
+ testFireContextMenuEvent(event, element, event.getEventName());
+ }
+
+ private void testFireContextMenuEvent(Event event, ElementLocator<?> element, String attributeName) {
+ ElementLocator<?> eventInput = pjq("input[id$=on" + attributeName + "Input]");
+ String value = "metamerEvents += \"" + event.getEventName() + " \"";
+
+ guardHttp(selenium).type(eventInput, value);
+
+ clickOnTarget(menuElem);
+
+ waitModel.until(isDisplayed.locator(contextMenuContent));
+
+ selenium.fireEvent(element, event);
+
+ waitGui.failWith("Attribute on" + attributeName + " does not work correctly").until(
+ new EventFiredCondition(event));
+ }
+
+ @Test
+ public void testAttachTo() {
+ contextMenuAttributes.set(attachTo, "form:" + menuElemId);
+
+ // contextMenu element is present always. Check if is displayed
+ assertFalse(selenium.isVisible(contextMenuContent));
+ assertTrue(selenium.isDisplayed(contextMenuContent));
+ clickOnTarget(menuElem);
+ assertTrue(selenium.isVisible(contextMenuContent));
+ assertTrue(selenium.isDisplayed(contextMenuContent));
+ }
+
+ @Test
+ public void testDir() {
+ contextMenuAttributes.set(dir, "rtl");
+ log.debug(selenium.getAttribute(contextMenu.getAttribute(new Attribute("dir"))));
+ }
+
+ // @Test
+ public void testDirection() {
+
+ }
+
+ @Test
+ public void testDisabled() {
+ assertTrue(selenium.isElementPresent(contextMenu));
+ assertTrue(selenium.isElementPresent(contextMenuContent));
+
+ contextMenuAttributes.set(disabled, true);
+
+ // contextMenu is present
+ assertTrue(selenium.isElementPresent(contextMenu));
+ // but content not, when disabled
+ assertFalse(selenium.isElementPresent(contextMenuContent));
+ }
+
+ @Test
+ public void testHideDelay() {
+ contextMenuAttributes.set(hideDelay, "500");
+ clickOnTarget(menuElem);
+ assertTrue(selenium.isVisible(contextMenuContent));
+ assertTrue(selenium.isDisplayed(contextMenuContent));
+
+ selenium.fireEvent(menuElem, Event.MOUSEUP);
+ waitModel.until(isNotDisplayed.locator(contextMenuContent));
+
+ assertFalse(selenium.isVisible(contextMenuContent));
+ assertFalse(selenium.isDisplayed(contextMenuContent));
+
+ }
+
+ // @Test
+ public void testHorizontalOffset() {
+
+ }
+
+ // @Test
+ public void testJointPoint() {
+
+ }
+
+ // @Test
+ public void testLang() {
+
+ }
+
+ // @Test
+ public void testMode() {
+
+ }
+
+ @Test
+ public void testOnclick() {
+ testFireContextMenuEvent(Event.CLICK, contextMenu);
+ }
+
+ @Test
+ public void testOndblclick() {
+ testFireContextMenuEvent(Event.DBLCLICK, contextMenu);
+ }
+
+ // @Test
+ public void testOngrouphide() {
+
+ }
+
+ // @Test
+ public void testOngroupshow() {
+
+ }
+
+ // @Test
+ public void testOnhide() {
+
+ }
+
+ @Test
+ public void testOnitemclick() {
+ testFireContextMenuEvent(Event.CLICK, ctxMenuItemFormat.format("0"), "itemclick");
+ }
+
+ @Test
+ public void testOnkeydown() {
+ testFireContextMenuEvent(Event.KEYDOWN, contextMenu);
+ }
+
+ @Test
+ public void testOnkeypress() {
+ testFireContextMenuEvent(Event.KEYPRESS, contextMenu);
+ }
+
+ @Test
+ public void testOnkeyup() {
+ testFireContextMenuEvent(Event.KEYUP, contextMenu);
+ }
+
+ @Test
+ public void testOnmousedown() {
+ testFireContextMenuEvent(Event.MOUSEDOWN, contextMenu);
+ }
+
+ @Test
+ public void testOnmousemove() {
+ testFireContextMenuEvent(Event.MOUSEMOVE, contextMenu);
+ }
+
+ @Test
+ public void testOnmouseout() {
+ testFireContextMenuEvent(Event.MOUSEOUT, contextMenu);
+ }
+
+ @Test
+ public void testOnmouseover() {
+ testFireContextMenuEvent(Event.MOUSEOVER, contextMenu);
+ }
+
+ @Test
+ public void testOnmouseup() {
+ testFireContextMenuEvent(Event.MOUSEUP, contextMenu);
+ }
+
+ // @Test
+ public void testOnshow() {
+
+ }
+
+ // @Test
+ public void testPopupWidth() {
+
+ }
+
+ // @Test
+ public void testRendered() {
+
+ }
+
+ // @Test
+ public void testShowDelay() {
+
+ }
+
+ // @Test
+ public void testShowEvent() {
+
+ }
+
+ // @Test
+ public void testStyle() {
+
+ }
+
+ // @Test
+ public void testStyleClass() {
+
+ }
+
+ // @Test
+ public void testTitle() {
+
+ }
+
+ // @Test
+ public void testVerticalOffset() {
+
+ }
+
+}
12 years, 11 months