use of com.gargoylesoftware.htmlunit.WebClient in project core by weld.
the class ProbeInvocationsTest method testInvocationsEndpoint.
@Test
public void testInvocationsEndpoint() throws IOException {
WebClient client = invokeSimpleAction(url);
JsonObject invocations = getPageAsJSONObject(INVOCATIONS_PATH, url, client);
ReadContext ctx = JsonPath.parse(invocations.toString());
List<String> methodNames = ctx.read("$." + DATA + "[*]." + METHOD_NAME, List.class);
assertTrue("No invocations in invocation tree!", methodNames.size() > 0);
assertTrue(methodNames.contains(ModelBean.SIMPLE_CALL_METHOD_NAME));
}
use of com.gargoylesoftware.htmlunit.WebClient in project core by weld.
the class TxEventTest method testRequestContextLifecycle.
/*
* description = "WBRI-401"
*/
@Test
public void testRequestContextLifecycle() throws Exception {
WebClient webClient = new WebClient();
HtmlPage home = webClient.getPage(getPath("home.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(home, HtmlSubmitInput.class, "SaveButton");
beginConversationButton.click();
}
use of com.gargoylesoftware.htmlunit.WebClient in project core by weld.
the class FlowMultipleWarTest method testFlows.
@Test
@RunAsClient
public void testFlows(@ArquillianResource @OperateOnDeployment(WAR1) URL war1Context, @ArquillianResource @OperateOnDeployment(WAR2) URL war2Context) throws FailingHttpStatusCodeException, MalformedURLException, IOException {
WebClient client = new WebClient();
testFlow(client, war1Context);
testFlow(client, war2Context);
}
use of com.gargoylesoftware.htmlunit.WebClient in project core by weld.
the class ManagedBeansWithCDITest method testManagedBeansWithCDI.
@Test
@RunAsClient
public void testManagedBeansWithCDI(@ArquillianResource URL url) throws Exception {
WebClient client = new WebClient();
client.getPage(url + "/index.faces");
}
use of com.gargoylesoftware.htmlunit.WebClient in project core by weld.
the class Weld1037Test method testRedirectInPreRenderViewAction.
@Test
@RunAsClient
public void testRedirectInPreRenderViewAction(@ArquillianResource URL url) throws Exception {
WebClient client = new WebClient();
client.setRedirectEnabled(false);
client.setThrowExceptionOnFailingStatusCode(false);
Page page = client.getPage(url + "/doRedirect.faces");
assertEquals("Expected redirect:", HttpServletResponse.SC_MOVED_TEMPORARILY, page.getWebResponse().getStatusCode());
}
Aggregations