Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Facelet Functional Test"

(EL Content Assist)
(Variable Assist, Blank EL)
Line 83: Line 83:
 
# Activate content assist inside the braces.
 
# Activate content assist inside the braces.
 
# Verify that ''loginBean'' and all the implicit variables are present
 
# Verify that ''loginBean'' and all the implicit variables are present
 +
# Scroll in the list to ''loginBean''
 +
# Verify that additionalInfo appears with ''name'', ''type'' and ''scope'' correctly set.
 +
# Select the loginBean action and verify it is correctly inserted.
  
 
====Variable Assist, Variable Present====
 
====Variable Assist, Variable Present====

Revision as of 13:20, 22 May 2008

Feature Test

Content Assist

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.

Namespace Assist

Basic insertion

  1. Place the cursor inside the html tag.
  2. Add the text xmlns:f=. Verify that content assist activates after the equals sign.
  3. With the cursor after the = sign, and Ctrl-Space.
  4. Verify again the content assist is activated with the following options:
  5. Select on of the options and verify that it is correctly inserted.

FaceletNamespaceContentAssist.png

No duplicate insertion

  1. With one of the namespace options inserted into the HTML from the test above.
  2. Create a new attribute for xmlns:h=
  3. 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.
  4. Select an option and verify that it inserts correctly.

Tag Assist

Basic insertion

  1. Create an XHTML document and add the core and html namespaces to the page.
  2. Save the page.
  3. Create an opening less-than (<) and hit Ctrl-Space.
  4. Verify that all the core and html tags are present.
  5. Select h:form and verify it is correctly inserted.

Prefix selection

  1. Add the text <f: to a document with core declared with the f prefix.
  2. Hit Ctrl-Space after the : and verify that only the core tags are listed in the content assist.
  3. Add the text <h:in to a document with html declared with the h prefix.
  4. Hit Ctrl-Space after the text and verify that only inputHidden, inputSecret, inputText, inputTextarea are present.

Attribute Name Assist

Basic insert

  1. In a no-attribute h:outputText tag, activate content assist.
  2. Verify that the attribute options are listed.
  3. Select value and verify it inserts correctly.
  4. In an h:message tag, activate content assist for attributes.
  5. Verify that the attribute for is marked to indicate it is required.\
  6. Select for and verify it inserts correctly.

Attribute Name Prefix

  1. In a no-attribute h:outputText tag, add the a v at the beginning of an attribute.
  2. Activate content assist after the v.
  3. Verify that only assists for validator, validatorMessage, value, valueChangeListener.
  4. Select the validator and verify it inserts correctly.

Static Attribute Value Assist

  1. Starting with the tag, <h:outputText dir=""> activate content assist inside the double-quotes.
  2. Verify that assists for ltr and rtl are present.
  3. Select ltr and verify that it inserts correctly.

Dynamic Attribute Value, Non-EL Assist

  1. 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.
  2. In login.xhtml, add an h:commandButton.
  3. Add an action attribute to the commandButton tag.
  4. In the value for the action attribute, activate content assist.
  5. Verify that an assist is included: login: goto /welcome.xhtml.
  6. 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.

Variable Assist, Blank EL

  1. Create an h:inputText tag and add a value attribute to it.
  2. Set the value of the value attribute to "#{}".
  3. Activate content assist inside the braces.
  4. Verify that loginBean and all the implicit variables are present
  5. Scroll in the list to loginBean
  6. Verify that additionalInfo appears with name, type and scope correctly set.
  7. Select the loginBean action and verify it is correctly inserted.

Variable Assist, Variable Present

  1. Start with <h:inputText value="#{loginBean}"/> in an XHTML document.


Property Assist

Validation

Hover Help

Hyperlink

Copyright © Eclipse Foundation, Inc. All Rights Reserved.