Skip to content

Instantly share code, notes, and snippets.

class MyTabPanel extends TabPanel {
@Item(1)
private UserDetails details;
@Item(2)
private WebElement;
@Item(3)
private Calendar;
@Test
@RunWith(Arquillian.class)
public void TestSequenceOfCalls() {
@WarpTest
class Test {
@FindBy("xyz") Calendar calendar;
@Transfer String foo;
<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<!--Uncomment to have test archives exported to the file system for inspection -->
<!--
<engine>
<property name="deploymentExportPath">target/</property>
</engine>
-->
Daemon Thread [http--0.0.0.0-8080-1] (Suspended (breakpoint at line 69 in ActionEvent))
ActionEvent.<init>(UIComponent) line: 69
CommandButtonRenderer(AjaxCommandRendererBase).doDecode(FacesContext, UIComponent) line: 56
CommandButtonRenderer(RendererBase).decode(FacesContext, UIComponent) line: 80
UICommandButton(UIComponentBase).decode(FacesContext) line: 787
UICommandButton(UIComponentBase).processDecodes(FacesContext) line: 1181
UITab(UIComponentBase).processDecodes(FacesContext) line: 1176
AbstractTogglePanel$3.visit(VisitContext, UIComponent) line: 290
FullVisitContext.invokeVisitCallback(UIComponent, VisitCallback) line: 64
UITab(UIComponent).visitTree(VisitContext, VisitCallback) line: 1612
12:31:09,641 INFO [stdout] (http--0.0.0.0-8080-1) ###### adding new tabBean...
12:31:09,642 ERROR [stderr] (http--0.0.0.0-8080-1) java.lang.IllegalStateException
12:31:09,643 ERROR [stderr] (http--0.0.0.0-8080-1) at org.richfaces.tests.metamer.bean.rich.RichTabPanelBean.generateNewTab(RichTabPanelBean.java:95)
12:31:09,643 ERROR [stderr] (http--0.0.0.0-8080-1) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:31:09,644 ERROR [stderr] (http--0.0.0.0-8080-1) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
12:31:09,644 ERROR [stderr] (http--0.0.0.0-8080-1) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:31:09,644 ERROR [stderr] (http--0.0.0.0-8080-1) at java.lang.reflect.Method.invoke(Method.java:597)
12:31:09,645 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.el.parser.AstValue.invoke(AstValue.java:262)
12:31:09,645 ERROR [stderr] (http--0.0.0.0-8080-1) at org.apache.el.MethodExpressionImpl.invoke(MethodE
public class TestExecutionAPI {
/**
* Single client action paired with single server assertion for most simplest
* cases
*/
@Test
public void testSimpleExecution() {
Warp.execute(clientAction)
.verify(serverAssertion);
package org.richfaces;
import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import org.richfaces.event.ItemChangeEvent;
import org.richfaces.log.LogFactory;
import org.richfaces.log.Logger;
@Location("view/conference/create.jsf")
public class ConferencePage {
@FindBy(id = "create")
private ConferenceForm form;
public ConferenceForm getForm() {
return form;
}
}
@RunWith(Arquillian.class)
@QUnit("tests.js")
public class Tests {
}
@lfryc
lfryc / WarpAnonymousServerAssertion.java
Created September 4, 2012 13:41 — forked from aslakknutsen/WarpAnonymousServerAssertion.java
Warp rewrite Anonymous ServerAssertions to 'real' classes and transfer to Container. Rewrite 'external' references to client callback
@Travelling
SomeObject obj;
@Test
public void should() {
Warp.execute(new ClientAction() {
public void action() {
page.doAction();
}
}).verify(new ServerAssertion() {