use of com.gargoylesoftware.htmlunit.html.HtmlPage in project core by weld.
the class ProbeConfigurationPropertiesTest method testEmbededInfoSnippetNOTAvailable.
@Test
public void testEmbededInfoSnippetNOTAvailable() throws IOException {
WebClient client = new WebClient();
HtmlPage page = client.getPage(url.toString() + "test");
System.out.println(page.getBody().asXml());
assertFalse(page.getBody().asXml().toString().contains("Probe Development Tool"));
assertFalse(page.getBody().asXml().toString().contains(TEST_ARCHIVE_NAME));
assertFalse(page.getBody().asXml().toString().contains("The following snippet was automatically added by Weld"));
}
use of com.gargoylesoftware.htmlunit.html.HtmlPage in project core by weld.
the class ProbeDefaultConfigurationPropertiesTest method testEmbededInfoSnippetAvailable.
@Test
public void testEmbededInfoSnippetAvailable() throws IOException {
WebClient client = new WebClient();
HtmlPage page = client.getPage(url.toString() + "test");
assertTrue(page.getBody().asXml().toString().contains("Probe Development Tool"));
assertTrue(page.getBody().asXml().toString().contains(TEST_ARCHIVE_NAME));
assertTrue(page.getBody().asXml().toString().contains("The following snippet was automatically added by Weld"));
}
use of com.gargoylesoftware.htmlunit.html.HtmlPage 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.html.HtmlPage in project core by weld.
the class FlowMultipleWarTest method testFlow.
private void testFlow(WebClient client, URL warContext) throws IOException {
HtmlPage page = client.getPage(warContext + "/index.faces");
HtmlSubmitInput startFlowButton = (HtmlSubmitInput) page.getElementById("start-simple-flow");
page = startFlowButton.click();
assertTrue(page.getWebResponse().getContentAsString().contains("Flow 1"));
}
use of com.gargoylesoftware.htmlunit.html.HtmlPage in project core by weld.
the class ClientConversationContextTest method testRedirectToConversation.
@Test
public void testRedirectToConversation() throws Exception {
WebClient client = new WebClient();
HtmlPage page = client.getPage(getPath("/cloud.jsf"));
HtmlPage snowstorm = getFirstMatchingElement(page, HtmlSubmitInput.class, "snow").click();
String name = getFirstMatchingElement(snowstorm, HtmlSpan.class, "snowstormName").getTextContent();
assertEquals(Snowstorm.NAME, name);
snowstorm = getFirstMatchingElement(snowstorm, HtmlSubmitInput.class, "go").click();
name = getFirstMatchingElement(snowstorm, HtmlSpan.class, "snowstormName").getTextContent();
assertEquals(Snowstorm.NAME, name);
}
Aggregations