* <p>Verify the content of a pristine page returned when executing this
* view for the first time.</p>
*/
public void testPristine() throws Exception {
HtmlSpan span = null;
HtmlElement html = (HtmlElement) page;
assertEquals("html", html.getTagName());
assertEquals("http://www.w3.org/1999/xhtml", html.getAttributeValue("xmlns"));
assertEquals("logon", title());
HtmlForm form = (HtmlForm) element("form");
assertNotNull(form);
assertEquals("", form.getAcceptAttribute());
assertEquals("", form.getAcceptCharsetAttribute());
String url = this.url.toString();
url = url.substring(0, url.length() - 1);
url = url.substring(url.lastIndexOf('/'));
String action = form.getActionAttribute();
int semicolon = action.indexOf(';');
if (semicolon >= 0) {
action = action.substring(0, semicolon);
}
assertEquals(url + "/logon.faces", action);
assertEquals("", form.getEnctypeAttribute());
assertEquals("post", form.getMethodAttribute());
assertEquals("logonForm", form.getNameAttribute());
assertEquals("", form.getOnResetAttribute());
assertEquals("", form.getOnSubmitAttribute());
assertEquals("", form.getTargetAttribute());
span = (HtmlSpan) element("form:usernamePrompt");
assertNotNull(span);
assertEquals("Username:", span.asText());
HtmlTextInput username = (HtmlTextInput) element("form:username");
assertNotNull(username);
assertEquals("", username.getLangAttribute());
assertEquals("form:username", username.getNameAttribute());
assertEquals("", username.getOnClickAttribute());
assertEquals("", username.getOnDblClickAttribute());
assertEquals("", username.getOnKeyDownAttribute());
assertEquals("", username.getOnKeyPressAttribute());
assertEquals("", username.getOnKeyUpAttribute());
assertEquals("", username.getOnMouseDownAttribute());
assertEquals("", username.getOnMouseMoveAttribute());
assertEquals("", username.getOnMouseOutAttribute());
assertEquals("", username.getOnMouseOverAttribute());
assertEquals("", username.getOnMouseUpAttribute());
assertEquals("text", username.getTypeAttribute());
assertEquals("", username.getValueAttribute());
span = (HtmlSpan) element("form:passwordPrompt");
assertNotNull(span);
assertEquals("Password:", span.asText());
HtmlPasswordInput password = (HtmlPasswordInput)
element("form:password");
assertNotNull(password);
assertEquals("", password.getLangAttribute());