Add all, remove some

Create a JSF 1.2 and Facelet faceted project and select all available Facelet configuration options.

Verify that all Facelet configuration options were applied to the faces-config.xml and web.xml files

Remove the Facelet facet, selecting removal of only the configure listener and Facelet view handler to remove.

Verify that only the selected configuration options were removed.

Remove JSF and Facelet

Create a JSF 1.2 and Facelet faceted project using the default configurations.

Verify that the faces-config.xml and web.xml configurations are set up properly.

In the Project Facets menu, select remove both the JSF and Facelet facets.

In the facelet removal dialog, select to remove the DEFAULT_SUFFIX and Facelet view handler options.

Accept the changes and verify that everything was correctly removed.

XHTML Editor

For all these tests, start with a Dynamic Web Project with the JSF 1.2/Facelet facets. Ensure that JSF runtime, JSTL 1.2 and the facelet jars in the classpath. Create an XHTML 1.0 Transitional file in the WebContent root directory.

Content Assist

Namespace Assist

Basic insertion

Place the cursor inside the html tag.

Add the text xmlns:f=. Verify that content assist activates after the equals sign.

With the cursor after the = sign, and Ctrl-Space.

Verify again the content assist is activated with the following options:

Select on of the options and verify that it is correctly inserted.

No duplicate insertion

With one of the namespace options inserted into the HTML from the test above.

Create a new attribute for xmlns:h=

Verify that the options list for content assist (which should again appear after entering hitting the = sign) includes all valid namespace options 'except' the one already inserted.

Select an option and verify that it inserts correctly.

Tag Assist

Basic insertion

Create an XHTML document and add the core and html namespaces to the page.

Save the page.

Create an opening less-than (<) and hit Ctrl-Space.

Verify that all the core and html tags are present.

Select h:form and verify it is correctly inserted.

Prefix selection

Add the text <f: to a document with core declared with the f prefix.

Hit Ctrl-Space after the : and verify that only the core tags are listed in the content assist.

Add the text <h:in to a document with html declared with the h prefix.

Hit Ctrl-Space after the text and verify that only inputHidden, inputSecret, inputText, inputTextarea are present.

Attribute Name Assist

Basic insert

In a no-attribute h:outputText tag, activate content assist.

Verify that the attribute options are listed.

Select value and verify it inserts correctly.

In an h:message tag, activate content assist for attributes.

Verify that the attribute for is marked to indicate it is required.\

Select for and verify it inserts correctly.

Attribute Name Prefix

In a no-attribute h:outputText tag, add the a v at the beginning of an attribute.

Activate content assist after the v.

Verify that only assists for validator, validatorMessage, value, valueChangeListener.

Dynamic Attribute Value, Non-EL Assist

Create a page navigation from login.xhtml to welcome.xhtml in the faces-config (pages must exist). Call the outcome login in the faces-config file.

In login.xhtml, add an h:commandButton.

Add an action attribute to the commandButton tag.

In the value for the action attribute, activate content assist.

Verify that an assist is included: login: goto /welcome.xhtml.

Use the assist and verify that it inserts login into the attribute value.

EL Content Assist

For these tests, add a beans.LoginBean class to the src folder and create a session bean of that type called loginBean to the faces-config. Also, create a login.xhtml Transitional XHTML file in a Facelet faceted project. Add name and password bean properties to the LoginBean type.

Property Assist, Property of Property

Starting from the result of the above, Property Assist, Existing Property.

Activate content assist after renderKit by entering a . character.

Verify that the assist window opens with class and responseStateManager present.

Verify additionalInfo on the responseStateManager property as javax.faces.render.ResponseStateManager, read-only.

Verify that the responseStateManager property inserts correctly.

EL Hover Help

For all hover help tests, start with a <h:inputText value="#{loginBean.name}"/> in an xhtml file.

Simple variable hover

Place mouse over the loginBean. Verify that a hover help window appears with correct name, type and scope.

Simple property hover

Place mouse over name.

Verify that type and accessibility are correct.

Simple property hover with Javadoc

Add Javadoc with a @return statement to the getter for the name property.

Save and rebuild.

Place mouse over the name property in the xhtml document.

Verify that the return text appears in the hover help in addition to the basic type and accessibility information.

Hyperlink

Start with <h:inputText value="#{loginBean.name}"/>.

Variable

Position mouse cursor over loginBean.

Hold down ctrl and verify that a hyperlink appears under the text.

Left mouse click and verify that the LoginBean class is opened in a Java editor with the class name selected.

Property

Position mouse cursor over name.

Hold down ctrl and verify that a hyperlink appears under the text.

Left mouse click and verify that the LoginBean class is opened in a Java editor with the getName() method is selected.

Validation

For all these tests, start with a Dynamic Web Project with the JSF 1.2/Facelet facets. Ensure that JSF runtime, JSTL 1.2 and the facelet jars in the classpath. Create an XHTML 1.0 Transitional file in the WebContent root directory.

For all EL validation tests, start additionally with a loginBean EL variable declared in the usually way and tied to a class beans.LoginBean with name and password bean properties.

Non-EL validation, Static

Add <h:panelGrid columns=""/> to the an XHTML document.

Validate the page and verify that the empty value for columns is flagged with a warning for invalid integer value.

Change the value for columns to 2.

Revalidate and verify that the warning goes away.

Change the value for columns to d.

Revalidate and verify that the warning reappears flagging the value as not a valid integer.

Non-EL validation, Dynamic

Add a h:commandButton action="login"/> and validate.

Verify that the login value is flagged as not a valid navigation outcome value.

Create a page navigation from login.xhtml to welcome.xhtml in the normal smoke test way and create the login outcome.

Revalidate and verify that the validation message goes away.

Change the value of the action attribute to login2.

Revalidate and verify that the validation message reappears on the action value.

Change back the action value to login again, revalidate and verify no problems.

EL validation, no EL

Add an <h:inputText value="#{}" />.

Validate and verify that the {} is flagged as a warning for empty EL expression.

EL validation, invalid variable

Add a <h:inputText value="#{notAVariable}" /> tag.

Validate and verify that notAVariable is flagged as not a known variable.

EL validation, no property

Add a <h:inputText value="#{loginBean.notAProperty}" /> tag.

Validate and verify that notAProperty is flagged as not a known property.

EL validation, valid variable.property

Add a <h:inputText value="#{loginBean.name}" /> tag.

Validate and verify that EL expression passes validation.

Change loginBean to loginBean2, revalidate and verify that loginBean2 is flagged with a warning.

Change loginBean2 back to loginBean.

Change name to name2, revalidate and verify that name2 is flagged with a warning.