Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-3554

Selenium test failure in h:inputHidden "converter" attribute use-case

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: showcase-3.0.4
    • Fix Version/s: showcase-3.1.0
    • Component/s: JSF Showcase
    • Labels:
      None

      Description

      The Selenium tests are logging a test failure for the h:inputHidden "converter" attribute use-case.

      The test involves the following XHTML code:

      inputHidden.xhtml
      <showcase:field>
      	<h:inputHidden id="hidden1" binding="#{inputHidden1}" converter="javax.faces.DateTime"
      		converterMessage="#{i18n['converter-message']}" value="#{inputHiddenModelBean.date}" />
      
      ...
      
      <button onclick="document.getElementById('#{inputHidden1.clientId}').value='apr 5, 33'; return false;">
      	#{i18n['copy-a-date-to-the-value-of-the-hidden-input']}
      </button>
      

      The Selenium test clicks the button and then asserts that the model value is "Apr 5, 33". However, the test is failing because the date is incorrectly converted to Apr 5, 2033.

      After researching the cause, it is unclear as to why the test was passing and suddenly (and consistently) started failing. It may be that the code was setup incorrectly to begin with, meaning that the button should be submitting "apr 5, 0033" instead of "apr 5, 33". The documentation for the "javax.faces.DateTime" converter attribute value does not make clear how 2-digit year conversion is supposed to take place.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                neil.griffin Neil Griffin
                Reporter:
                neil.griffin Neil Griffin
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  showcase-3.1.0