Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

JSF Tools Functional Tests

Web Page Editor

  • Source Page
    • Insert various JSF Core and JSF HTML tags and verify correct corresponding insertion into Design view
    • Content Assist
  • Design Page
    • Verify visual feedback
      • Higlighting (border) and tooltip for current element on mouse hover
      • Resizable marquee on element selection
      • Insertion-point caret
    • Verify selection in Design view correctly synchronizes selection in Source, Properties, and Outline views
    • Drag and drop various JSF Core and JSF HTML tags and verify correct rendering, properties, etc.
    • Verify correct functionality of context menus on elements
  • Preview Page
    • Verify that preview is as expected (close to runtime experience)
    • Verify that simple EL expressions referencing resource bundles loaded via <f:loadBundle> are evaluated and replaced
  • Validation
  • Toolbar
    • Verify correct functionality of toolbar buttons, especially selection of Design, Source, or both views and horizontal and vertical split modes
  • Property Viewer
    • Verify QuickEdit and Attribute property pages for by selecting various JSF Core and HTML tags in the page, and updating attribute values using the property pages.

Faces Config Editor

  • Verify "Wait for Load" page appears only briefly
  • Verify pages:
    • Introduction (unless disabled in Preferences)
    • Overview
      • Verify correct information listed
      • Verify double-clicking list item navigates to correct page (and item, where applicable)
    • Navigation Rule
      • Verify pages and links can be added
      • Verify link properties can be edited correctly
      • Verify Palette is visible and populated correctly
      • Verify context menu is available and populated correctly
    • ManagedBean
      • Verify Managed Beans can be added and removed successfully
      • Verify Managed Bean Wizard operates correctly
    • Component
      • Verify Components, Converters, Render Kits, and Validators can be added and removed successfully
      • Verify all items can be configured correctly
    • Others
      • Verify all items can be added/removed/configured successfully
    • Source
      • Verify source is correct and synchronized with settings made on other pages
      • Verify source editing affects settings on relevant pages

JSF Library

  • Create a new project and define one new RI and one new component library from the wizard page. Ensure both are marked to deploy.
    • Assert that you aren't allowed to create a JSF lib without at least one library
    • Assert that the two libraries appear in the classpath (navigator classpath bundles)
    • Assert that the two libraries are marked in J2EE Module Dependencies as deployed.
  • Create a new JSF library from the Windows->Preferences dialog
    • Assert that JSF library appears in Add Library list in Build Path on a project
  • Add new JSF library to project
    • Assert that library jars added to classpath
    • Assert J2EE Module Dependency exists but is not deployed by default
  • Remove JSF library from project
    • Assert that library jars removed from classpath
    • Assert that J2EE module dependency is removed
  • Change JSF library while configured on project by adding and removing jars
    • Assert that the project classpath contents change to reflect jars
  • Remove JSF library that is installed on a project
    • Assert library is still installed on existing projects
    • Assert library is no longer available on projects where not installed
  • Create a second JSF implementation library
    • Assert that only one JSF implementation can be configured on a project at once.
  • Create a project using the server-supplied library
    • Assert that the project can be created
  • Open WPE. Add a JSF library for a component not in the WPE palette. Close and re-open WPE
    • Assert that the new library's components are in the palette.
    • Assert that adding a component from this library adds the correct tag lib statement.
    • Assert that the tab lib statement is hyperlinkable to a TLD.

JSF Facet

  • Create new project using the JSF 1.1 Configuration on the first page (don't hit Next)
    • Assert faces-config.xml is a faces 1.1 file (dtd)
    • Assert the web.xml is a pre-2.5 file
  • Create new project using the JSF 1.2 Configuration on the first page (don't hit Next)
    • Assert faces-config.xml is a faces 1.2 file (xsd)
    • Assert the web.xml is a 2.5 file
  • Open new dynamic project wizard and select JSF 1.2 by default
    • Assert cannot proceed because web project version must be set to 2.5
    • Change the JSF version to 1.1 and assert that can now proceed
    • Change to web project 2.5 with JSF 1.2 facet and assert can also proceed
  • Open new dynamic project wizard, select a JSF 1.x project with WebContent changed from default
    • Assert the the faces-config file is correctly located in the new web content root
  • Open new dynamic project wizard and create a JSF 1.x project with faces-config file, servlet name and filter changed from default
    • Assert that values changed from default match in generated web.xml file.
  • In all cases where JSF libraries are added in the new project wizard, ensure that the jars are added
  • Starting with a JSF 1.x project, remove the facet
    • Assert that the web.xml is updated to remove JSF servlet info.
    • Assert the faces-config.xml is not changed.
  • Starting with a JSF 1.x project with a different web content root, remove facet
    • Assert that the web.xml is updated to remove the JSF servlet info.
    • Assert that faces-config.xml is not changed.
  • Starting with a JSF 1.x project a different faces-config.xml file name
    • Assert that the web.xml is updated to remove the JSF servlet info
    • Assert that faces-config.xml is not changed.
  • Start with a dynamic web project that does not have a JSF facet and add the JSF 1.x facet
    • Assert that the faces-config.xml is created and the web.xml file is updated
  • Start with a dynamic web project using a non-default web content root and add the JSF 1.x facet
    • Assert the project is created correctly.

JSF Preferences

EL Validation Preferences

  • Test validation with default preferences
    • Correct expression
    • Warning expression (i.e. member not found)
    • Error expression (i.e. Missing closing bracket)
  • Turn off all EL validation and re-validate
    • Assert all validation is gone
  • Turn on as-you-type validation and re-validate
    • Assert markers are gone outside the editor
    • Check as-you-type validation in the SSE editor
  • Turn on both validation and as-you-type and re-validate
    • Assert that markers and as-you-type is working.
  • Use Restore Defaults and re-validated
    • Assert validate markers but no as-you-type
  • Set severity on a problem with warning severity to error and revalidate
    • Assert severity changes to error
  • Set severity on a problem with error severity to ignore and revalidate
    • Assert problem goes away

Faces Config Editor

  • Show Introduction Tab...
    • Verify that enabling/disabling shows/removes Introduction page in editor
  • Use System colors
    • Verify setting has desired effect in editor
    • Verify following preference items are enabled/disabled appropriately:
      • Canvas: Background color
      • Icons: Label font
      • Connection Lines: Label font, Label color, Line color
  • Canvas
    • Verify all settings have desired effect in editor
  • Icons
    • Verify all settings have desired effect in editor
  • Connection Lines
    • Verify all settings have desired effect in editor

Libraries

Apache MyFaces Trinidad Support

Test AbstractLabelAndHelpOperation

  • Create tr:inputFile (not as child of tr:panelFormLayout, "simple" attribute initially not present or set to false)
    • Assert setting "styleClass" attribute results in use of specified style class on entire component
    • Assert setting "inlineStyle" attribute results in use of specified style on entire component
    • Assert setting "contentStyle" attribute results in use of specified style only on text field
    • Assert setting "required" and/or "showRequired" attribute to true results in "*" being prepended
    • Assert setting "label" attribute results in label attribute's value being prepended (after "*", if present)
    • Assert setting "columns" attribute results in corresponding change of width of text field
    • Assert setting "value" attribute results in value appearing in text field
    • Create f:facet as child of tr:inputFile with "name" attribute with value "help"
      • Create tr:outputText as child of f:facet
        • Assert setting "value" attribute (on tr:outputText) results in text appearing below text field
    • Assert setting "simple" attribute to true results in removal of all visual objects except text field and browse button

Test InputTextOperation

  • Create tr:inputText
    • Assert setting "rows" attribute < 2 (or attribute not present) results in a text field
    • Assert setting "rows" attribute > 1 results in a textarea
    • Assert setting "secret" attribute to true (and "rows" attribute not present or < 2) results in a password field

Test InputTextWithIconOperation

  • Create tr:inputColor, tr:inputDate, tr:inputListOfValues, and tr:inputNumberSpinbox
    • Assert rendering is similar to tr:inputText (when attributes are set appropriately) followed by tag-specific icon

Test OutputFormattedOperation

  • Create tr:outputFormatted with simple HTML as "value" attribute (e.g. "A <b>bold</b> word")
    • Assert HTML formatting matches expectations
    • Assert setting "styleUsage" attribute with values "instruction", "pageStamp", and "inContextBranding" results in style differences (differences are slight - colour changes only)

Test PanelFormLayoutOperation

  • Create tr:panelFormLayout
    • Add significant number of child form tags (e.g. tr:input*, h:inputText, tr:select*) to test rows and maxColumns
    • Assert setting "rows" and "maxColumns" attributes lays out child tags appropriately (maxColumns overrides rows)
    • Assert setting "labelWidth" and "fieldWidth" attributes adjusts column widths appropriately (note: Design pane doesn't currently handle correctly, but Preview pane should)
    • Assert setting "label", "required", and "showRequired" attributes on child Trinidad form tags results in expected behaviour

Test PanelGroupLayoutOperation

  • Create tr:panelGroupLayout
    • Add significant number of child tags to test functionality (e.g. 3 or 4 children)
    • Create f:facet as child of trPanelGroupLayout with "name" attribute with value "separator"
      • Create f:verbatim as child of f:facet with text content "-[SEP]-" (arbitrary, set content to desired separator)
    • Assert setting "layout" attribute on tr:panelGroupLayout to "horizontal" or "vertical" renders expected layout
    • Assert separator appears between each child tag

Test PanelLabelAndMessageOperation

  • Create tr:panelLabelAndMessage
    • Create h:inputText (NOT tr:inputText) as child of tr:panelLabelAndMessage
    • Assert setting "showRequired" attribute (on tr:panelLabelAndMessage) to true results in "*" being prepended
    • Assert setting "label" attribute (on tr:panelLabelAndMessage) results in label attribute's value being prepended (after "*", if present)
    • Create f:facet as child of tr:panelLabelAndMessage with "name" attribute with value "help"
      • Create tr:outputText as child of f:facet
        • Assert setting "value" attribute (on tr:outputText) results in text appearing below text field

Test PanelTabbedOperation

  • Create tr:panelTabbed
    • Create several child tr:showDetailItem tags
    • Assert each child tr:showDetailItem gets a corresponding tab
    • Assert setting "text" attribute of tr:showDetailItem changes tab text accordingly
    • Assert setting "disabled" attribute of tr:showDetailItem changes tab style accordingly
    • Assert clicking tab text changes "current" tab

Frameworks

Design-time MetaData Framework

Tag Conversion Framework

Built-in Support for JSF Core/HTML Libraries

Since we ship with built-in support for JSF core and JSF HTML libraries, testing tag conversion of these tags can be performed simply by building JSP pages that make use of them.

  • Create one or more JSP pages
    • Use as many JSF core and JSF HTML tags in these JSP pages as possible
    • Verify correct rendering in Design and Preview pages of the Web Page Editor

Providing Additional Tag Conversion Capabilities via Metadata

  • Create one or more tag conversion metadata plugin(s) by following instructions in Help > JavaServer Faces Tooling Developer Guide > Tutorials > Providing Design-Time Tag Metadata
  • Install tag conversion metadata plugin(s)
    • Use tags (for which metadata has been provided by plugin(s)) in JSP page(s)
    • Verify correct rendering in Design and Preview pages of the Web Page Editor

EL Symbol Framework

Designtime Application Framework

With the dtresolver.test plugin in the base instance and DTResolverExampleApp in a spawned runtime workspace:

  • Validate test.jsp
    • Assert each of the four expected expressions are flagged with validation warnings.
  • Set each of the custom actions on the right-click menu for the project (External Context, Variable Resolver, Property Resolver, Method Resolver), revalidate in each case.
    • Assert in each case that expected expression no longer causes a validation problem.
  • Remove each of the custom action and revalidate
    • Assert that the expected problems return.

View Handler Framework

Tag Registry

  • Basic tag registry
    • Create a new JSF Project
    • Open the Tag Registry View
    • Select the project in the project combo.
    • Verify the JSP tag registry is present and expand it.
    • Verify that http://java.sun.com/jsf/core and http://java.sun.com/html namespaces are present.
    • Expand the trees for each of the tag libraries. Verify that all tags present
  • Check detail form
    • With JSP tag registry selected in the tree, verify that the detail form is updated with 'Description', 'Id' and Content-Types. Content-Types must include "JSP".
    • With http://java.sun.com/jsf/core selected, verify that Name and Uri appear correctly in the detail form.
    • With http://java.sun.com/jsf/html expanded, select commandButton. Verify that Component Type Information and Interface Information are updated and correct.
  • Switch projects
    • Create a second project.
    • Add a second tag library (i.e. trinidad) to the new project.
    • Switch between the two projects using the project combo and verify that the tag registries have the right namespaces and tags.
  • Refresh
    • Select the JSP tag registry for one of the projects.
    • Expand all namespaces.
    • Click the refresh button.
    • Verify that a Yes/No dialog opens and asks if you want to flush caches.
    • Click "No" and verify that the tree is collapsed down to the namespace level.** Click refresh again with the namespaces expanded.
    • Verify that the namespaces collapse and note that there is a pause when expanded one of the namespaces.

Component Tree View

  • Basic
    • Open the JSF Component Tree.
    • Verify that the title line that starts View: contains the valid view id for the page with the project in brackets (i.e. View: /login.jspx (Project: JSFProject)).
    • Verify that the UIViewRoot appears in the left-hand master form tree.
    • Expand the UIViewRoot and verify all the components are present.
  • Details form
    • Starting with the login.jspx page.
    • Add a converter to one of the h:inputText's and save the source file.
    • Click on a component in the tree for the page and verify that the details form is updated.
    • Verify that the Decorators list for the modified h:inputText (HtmlInputText in the tree) has the converter in its Decorators list.
  • Update on save
    • With the component tree for a JSP expanded in the view, change the source file in a way that will change the component tree (i.e. remove a component tag like an h:inputText or h:outputText).
    • Save the file.
    • Verify that the tree collapses. Expand the tree and verify the component tree has been updated for the change.
  • Update with refresh
    • Open the view in an external editor.
    • Make a component tree-affecting change (i.e. add an inputText).
    • Save the file. Note, that the component tree won't since the change was outside the workspace.
    • Click on the refresh button in the view for the file.
    • Verify that the tree is updated.
  • Update on clean build.
    • Open the view in an external editor.
    • Make a component tree-affecting change (i.e. add an inputText).
    • Save the file. Note, that the component tree won't since the change was outside the workspace.
    • Do a clean build on the owning project.
    • Verify that the tree is updated.

Documentation

User Documentation

  • Help System
    • Verify "JavaServer Faces Tooling User Guide" topic is available
      • Verify all page contents for accuracy
      • Verify all links are functional and correct

Developer Documentation

  • Help System
    • Verify "JavaServer Faces Tooling Developer Guide" topic is available
      • Verify all page contents for accuracy
      • Verify all links are functional and correct


Back to Test Plans

Back to the top