]
SBS JIRA Integration updated ARQ-930:
-------------------------------------
Forum Reference:
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/bl...]:
{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: