Author: dmaliarevich
Date: 2009-03-16 10:29:23 -0400 (Mon, 16 Mar 2009)
New Revision: 14218
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/cache.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/conversationId.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/conversationPropagation.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/convertDateTime.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/convertEntity.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/convertEnum.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/defaultAction.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/enumItem.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/fileUpload.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/fragment.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/graphicImage.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/remote.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/selectItems.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/validate.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/seamtest.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamComponentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3697, JUnits for seam components.
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/cache.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/cache.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/conversationId.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/conversationId.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/conversationPropagation.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/conversationPropagation.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/convertDateTime.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/convertDateTime.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/convertEntity.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/convertEntity.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/convertEnum.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/convertEnum.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/defaultAction.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/defaultAction.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/enumItem.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/enumItem.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/fileUpload.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/fileUpload.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/fragment.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/fragment.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/graphicImage.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/graphicImage.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/remote.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/remote.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/seamtest.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/seamtest.xhtml 2009-03-16
14:01:22 UTC (rev 14217)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/seamtest.xhtml 2009-03-16
14:29:23 UTC (rev 14218)
@@ -8,25 +8,164 @@
<body>
<s:button>
</s:button>
-
+
+<h1>s:cache</h1>
+<s:cache key="entry" region="pageFragments"
+ enabled="#{testClass.trueBoolean}">
+ <div class="blogEntry">
+ <h3>blogEntry.title</h3>
+ <div><s:formattedText value="blogEntry.body" /></div>
+ </div>
+</s:cache>
+
+<h1>s:conversationId</h1>
+<h:form>
+ <h:commandLink>
+ <h:outputText value="link" />
+ <s:conversationId>1</s:conversationId>
+ </h:commandLink>
+</h:form>
+<h1>s:conversationPropagation</h1>
+
+<h:commandButton value="Apply" action="personHome.update">
+ <s:conversationPropagation type="join" />
+</h:commandButton>
+
+<h1>s:convertDateTime</h1>
+<h:outputText value="#{testClass.date}">
+ <s:convertDateTime type="both" dateStyle="full" />
+</h:outputText>
+
+<h1>s:convertEntity</h1>
+
+<h:selectOneMenu>
+ <s:selectItems value="#{testClass.list}" var="item"
label="item" />
+ <f:converter converterId="myEntityConverter" />
+</h:selectOneMenu>
+
+<h:selectOneMenu required="true">
+ <s:selectItems value="#{testClass.list}" var="item"
label="item"
+ noSelectionLabel="Please Select..." />
+ <s:convertEntity />
+</h:selectOneMenu>
+
+<h1>s:convertEnum</h1>
+<h:selectOneMenu>
+ <s:selectItems value="#{testClass.list}" var="item "
label="item"
+ noSelectionLabel="Please select" />
+ <s:enumItem enumValue="ONCE" label="Only Once" />
+ <s:enumItem enumValue="EVERY_MINUTE" label="Every Minute" />
+ <s:enumItem enumValue="HOURLY" label="Every Hour" />
+ <s:convertEnum />
+</h:selectOneMenu>
+
+<h1>s:decorate</h1>
<s:decorate template="insert.xhtml">
</s:decorate>
+<h1>s:div</h1>
<s:div>
- </s:div>
-
- <s:formattedText value="#{blog.text}"/>
-
- <s:label styleClass="#{invalid?'error':''}">
+</s:div>
+
+<h1>s:defaultAction</h1>
+<h:commandButton id="foo" value="Foo"
action="#{testClass.someAction}">
+ <s:defaultAction />
+</h:commandButton>
+
+<h1>s:enumItem</h1>
+<h:selectOneRadio id="radioList" layout="lineDirection"
value="ONCE">
+ <s:enumItem enumValue="ONCE" label="Only Once" />
+ <s:enumItem enumValue="EVERY_MINUTE" label="Every Minute" />
+ <s:enumItem enumValue="HOURLY" label="Every Hour" />
+ <s:enumItem enumValue="DAILY" label="Every Day" />
+ <s:enumItem enumValue="WEEKLY" label="Every Week" />
+ <s:enumItem itemValue="WEEKLY" itemLabel="Every Week2" />
+ <s:enumItem itemValue="WEEKLY" itemLabel="iL-Every Week"
+ enumValue="WEEKLY" label="l-Every Week" />
+ <s:enumItem itemValue="WEEKLY" enumValue="WEEKLY"
label="l-Every Week" />
+ <s:enumItem enumValue="WEEKLY" label="l-Every Week" />
+ <s:enumItem enumValue="WEEKLY" />
+
+</h:selectOneRadio>
+
+<h:selectManyListbox id="radioList" layout="lineDirection"
value="ONCE">
+ <s:enumItem itemValue="WEEKLY" itemLabel="iL-Every Week"
+ enumValue="WEEKLY" label="l-Every Week" />
+
+ <s:enumItem enumValue="ONCE" label="Only Once" />
+ <s:enumItem enumValue="EVERY_MINUTE" label="Every Minute" />
+ <s:enumItem enumValue="HOURLY" label="Every Hour" />
+ <s:enumItem enumValue="DAILY" label="Every Day" />
+ <s:enumItem enumValue="WEEKLY" label="Every Week" />
+</h:selectManyListbox>
+
+
+<h:selectManyCheckbox id="radioList" layout="lineDirection"
value="ONCE">
+ <s:enumItem itemValue="WEEKLY" itemLabel="iL-Every Week"
+ enumValue="WEEKLY" label="l-Every Week" />
+
+ <s:enumItem enumValue="ONCE" label="Only Once" />
+ <s:enumItem enumValue="EVERY_MINUTE" label="Every Minute" />
+ <s:enumItem enumValue="HOURLY" label="Every Hour" />
+ <s:enumItem enumValue="DAILY" label="Every Day" />
+ <s:enumItem enumValue="WEEKLY" label="Every Week" />
+</h:selectManyCheckbox>
+
+<h1>s:fileUpload</h1>
+<s:fileUpload>
+</s:fileUpload>
+
+<h1>s:formattedText</h1>
+<s:formattedText value="#{blog.text}" />
+
+<h1>s:fragment</h1>
+<s:fragment rendered="tr">
+ Current bid:
+ </s:fragment>
+
+<h1>s:graphicImage</h1>
+<s:graphicImage rendered="#{testClass.trueBoolean}" value="some
value">
+ <s:transformImageSize width="200" maintainRatio="true" />
+</s:graphicImage>
+
+<h1>s:label</h1>
+<s:label styleClass="#{invalid?'error':''}">
Label
</s:label>
+<h1>s:link</h1>
+<s:link view="/login.xhtml" value="Link" />
-<s:link view="/login.xhtml" value="Link"/>
-
+<h1>s:message</h1>
<s:message styleClass="error" />
+<h1>s:remote</h1>
+<s:remote include="customerAction,accountAction,com.acme.MyBean" />
+
+<h1>s:selectItems</h1>
+<h:selectOneMenu>
+ <s:selectItems value="#{testClass.list}" var="list"
label="list" />
+</h:selectOneMenu>
+
+<h1>s:span</h1>
<s:span styleClass="required"
rendered="#{required}">*</s:span>
-<s:validateAll></s:validateAll>
+<h1>s:selectDate</h1>
+<div class="row"><h:outputLabel for="dob">Date of
birth<em>*</em>
+</h:outputLabel> <h:inputText id="dob" value="user.dob"
required="true">
+ <s:convertDateTime pattern="MM/dd/yyyy" />
+</h:inputText> <s:selectDate for="dob" startYear="1910"
endYear="2007">
+ <img src="img/datepicker.png" />
+</s:selectDate>
+<div class="validationError"><h:message for="dob"
/></div>
+</div>
+
+<h1>s:validate</h1>
+<h:inputText id="userName" required="true"
value="#{testClass.name}">
+ <s:validate />
+</h:inputText>
+
+<h1>s:validateAll</h1>
+<s:validateAll></s:validateAll>
+
</body>
</html>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/selectItems.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/selectItems.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/validate.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/validate.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamComponentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamComponentTest.java 2009-03-16
14:01:22 UTC (rev 14217)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamComponentTest.java 2009-03-16
14:29:23 UTC (rev 14218)
@@ -23,56 +23,132 @@
public class SeamComponentTest extends VpeTest {
// import project name
- public static final String IMPORT_PROJECT_NAME = "SeamTest";
+ public static final String IMPORT_PROJECT_NAME = "SeamTest"; //$NON-NLS-1$
public SeamComponentTest(String name) {
super(name);
setCheckWarning(false);
}
- public void testButton() throws Throwable {
+ public void testCache() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/button.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/cache.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
+
+ public void testConversationId() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/conversationId.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testConversationPropagation() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/conversationPropagation.xhtml", IMPORT_PROJECT_NAME));
//$NON-NLS-1$
+ }
+
+ public void testConvertDateTime() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/convertDateTime.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testConvertEntity() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/convertEntity.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testConvertEnum() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/convertEnum.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
public void testDecorate() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/decorate.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/decorate.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDiv() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/div.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/div.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
+
+ public void testDefaultAction() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/defaultAction.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testEnumItem() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/enumItem.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testFileUpload() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/fileUpload.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
public void testFormattedText() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/formattedText.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/formattedText.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
-
- public void testSpan() throws Throwable {
+
+ public void testFragment() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/span.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/fragment.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
-
+
+ public void testGraphicImage() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/graphicImage.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
public void testLabel() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/label.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/label.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
-
+
public void testLink() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/link.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/link.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
-
+
public void testMessage() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/message.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/message.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
+
+ public void testRemote() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/remote.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testSelectDate() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/message.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testSelectItems() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/message.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testValidate() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/validate.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+ public void testSpan() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/span.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testValidateAll() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/validateAll.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
public void testAllComponentsOnSinglePage() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/seamtest.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/seamtest.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
}