[arquillian-issues] [JBoss JIRA] (ARQ-930) Warp JSF: Support for describing tested JSF/XHTML pages in JavaDoc and using ShrinkWrap Descriptor
SBS JIRA Integration (JIRA)
jira-events at lists.jboss.org
Thu Feb 28 06:08:57 EST 2013
[ https://issues.jboss.org/browse/ARQ-930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
SBS JIRA Integration updated ARQ-930:
-------------------------------------
Forum Reference: https://community.jboss.org/message/800038#800038
> Warp JSF: Support for describing tested JSF/XHTML pages in JavaDoc and using ShrinkWrap Descriptor
> --------------------------------------------------------------------------------------------------
>
> Key: ARQ-930
> URL: https://issues.jboss.org/browse/ARQ-930
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Extension - Warp
> Reporter: Lukáš Fryč
> Fix For: warp_1.next
>
>
> Ultimately, we should be able to use following methods to describe resources as JSF/XHTML pages:
> * in javadoc
> * using ShrinkWrap asset
> * using ShrinkWrap Descriptor for given format
> * referencing external/classpath file
> ----
> *JavaDoc*:
> {code}
> /**
> * @resource index.xhtml
> *
> * <h:commandLink action="list" />
> *
> * @resource list.xhtml
> *
> * <rich:list value="#{...}">
> */
> @Test
> public void myTest() {
> ...
> }
> {code}
> The conflicts of same files between tests needs to be solved.
> In JSF, we can leverage own Facelet factory to register XHTMLs for each test specifically.
> The comments (JavaDoc) can be pre-processed by APT compiler (integrated to JDK >6).
> ----
> *ShrinkWrap asset*:
> [TestAutocompleteBehaviors.java|https://github.com/richfaces/richfaces5/blob/3fbadc7783eea3470cf7703819a85c9a9e525d24/framework/src/test/integration/org/richfaces/component/autocomplete/TestAutocompleteBehaviors.java#L105]:
> {code}
> FaceletAsset p = new FaceletAsset();
> p.body("<h:form id='form'>");
> p.body(" <r:autocomplete id='autocomplete' autocompleteList='#{autocompleteBean.suggestions}'>");
> p.body(" <r:ajax event='blur' listener='#{autocompleteBean.actionListener}' />");
> p.body(" </r:autocomplete>");
> p.body("</h:form>");
> archive.addAsWebResource(p, "index.xhtml");
> {code}
> ----
> *ShrinkWrap Descriptor*:
> {code:java}
> Descriptors.create(RichFacesDescriptor.class)
> .autocomplete()
> .id("autocomplete")
> .autocompleteList("#{autocompleteBean.suggestions}")
> .behavior()
> .ajax()
> .event("blur")
> .listener("#{autocompleteBean.actionListener}");
> {code}
> ----
> *referencing external file*:
> {code:java}
> ShrinkWrap.create(WebArchive.class).addWebAppResource("index.xhtml")
> {code}
> note that the API is simplified from the version using addWebResource(File file, String path)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the arquillian-issues
mailing list