You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Paul Spencer (JIRA)" <de...@myfaces.apache.org> on 2007/06/12 13:51:26 UTC

[jira] Created: (TOMAHAWK-1023) HtmlInputHidden fails unit test when using RI

HtmlInputHidden fails unit test when using RI
---------------------------------------------

                 Key: TOMAHAWK-1023
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1023
             Project: MyFaces Tomahawk
          Issue Type: Bug
            Reporter: Paul Spencer
             Fix For: 1.1.6


-------------------------------------------------------------------------------
Test set: org.apache.myfaces.component.html.ext.HtmlInputHiddenTest
Below are output from the test failures. The test are run using the following command:

   cd tomahawk/core
   mvn test -Djsf=ri 

-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE!
testDefaultRenderer(org.apache.myfaces.component.html.ext.HtmlInputHiddenTest)  Time elapsed: 0.016 sec  <<< FAILURE!
junit.framework.AssertionFailedError: ID is not null
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at junit.framework.Assert.assertNotNull(Assert.java:220)
	at org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase.assertIdExists(AbstractTomahawkViewControllerTestCase.java:88)
	at org.apache.myfaces.component.html.ext.HtmlInputHiddenTest.testDefaultRenderer(HtmlInputHiddenTest.java:64)



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1023) HtmlInputHidden fails unit test when using RI

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602407#action_12602407 ] 

Leonardo Uribe commented on TOMAHAWK-1023:
------------------------------------------

I see. Checking TestUtils.addDefaultRenderers() This line is here:

        addRenderer(facesContext, "javax.faces.Input", "javax.faces.Hidden",
                "org.apache.myfaces.renderkit.html.HtmlHiddenRenderer");

But if we are using jsf ri this class should be different. Also I have seen on other tests (HtmlInputXXX) that after create the component its id is set. like this:

        UIComponent component = new HtmlInputText();
        component.setId("TestComponent");
        component.setParent(new HtmlForm());

This is missing on this test, so adding this resolve the problem

> HtmlInputHidden fails unit test when using RI
> ---------------------------------------------
>
>                 Key: TOMAHAWK-1023
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1023
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.6, 1.1.7-SNAPSHOT
>            Reporter: Paul Spencer
>             Fix For: 1.1.7-SNAPSHOT
>
>
> -------------------------------------------------------------------------------
> Test set: org.apache.myfaces.component.html.ext.HtmlInputHiddenTest
> Below are output from the test failures. The test are run using the following command:
>    cd tomahawk/core
>    mvn test -Djsf=ri 
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE!
> testDefaultRenderer(org.apache.myfaces.component.html.ext.HtmlInputHiddenTest)  Time elapsed: 0.016 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: ID is not null
> 	at junit.framework.Assert.fail(Assert.java:47)
> 	at junit.framework.Assert.assertTrue(Assert.java:20)
> 	at junit.framework.Assert.assertNotNull(Assert.java:220)
> 	at org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase.assertIdExists(AbstractTomahawkViewControllerTestCase.java:88)
> 	at org.apache.myfaces.component.html.ext.HtmlInputHiddenTest.testDefaultRenderer(HtmlInputHiddenTest.java:64)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1023) HtmlInputHidden fails unit test when using RI

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602167#action_12602167 ] 

Leonardo Uribe commented on TOMAHAWK-1023:
------------------------------------------


Checking tomahawk, it does not override javax.faces.Hidden renderer, so this test is against jsf ri renderer.

Tomahawk just add ForceAware feature to HtmlInputHidden, so there is no need to override the renderer.

Anyway, still there is the problem on jsf ri test. One solution is just skip this test, because we can't do anything from myfaces side, or copy it from myfaces impl project and reference the tomahawk inputHidden to myfaces renderer.

The more easy is solution 2, so I'll commit it if no objections.


> HtmlInputHidden fails unit test when using RI
> ---------------------------------------------
>
>                 Key: TOMAHAWK-1023
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1023
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.6, 1.1.7-SNAPSHOT
>            Reporter: Paul Spencer
>             Fix For: 1.1.7-SNAPSHOT
>
>
> -------------------------------------------------------------------------------
> Test set: org.apache.myfaces.component.html.ext.HtmlInputHiddenTest
> Below are output from the test failures. The test are run using the following command:
>    cd tomahawk/core
>    mvn test -Djsf=ri 
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE!
> testDefaultRenderer(org.apache.myfaces.component.html.ext.HtmlInputHiddenTest)  Time elapsed: 0.016 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: ID is not null
> 	at junit.framework.Assert.fail(Assert.java:47)
> 	at junit.framework.Assert.assertTrue(Assert.java:20)
> 	at junit.framework.Assert.assertNotNull(Assert.java:220)
> 	at org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase.assertIdExists(AbstractTomahawkViewControllerTestCase.java:88)
> 	at org.apache.myfaces.component.html.ext.HtmlInputHiddenTest.testDefaultRenderer(HtmlInputHiddenTest.java:64)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1023) HtmlInputHidden fails unit test when using RI

Posted by "Paul Spencer (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602261#action_12602261 ] 

Paul Spencer commented on TOMAHAWK-1023:
----------------------------------------

I have no objections to #2 as long as the test is a valid test.

Please note the test cases use renderers defined in org.apache.myfaces.test.utils.TestUtils.addDefaultRenderers() [1].  This is because Shale-test 1.0.x does not read faces.xml. Shale-262 [2] resolves this issue in version 1.1.
 


[1]http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/test/utils/TestUtils.java?view=markup
[2]http://issues.apache.org/struts/browse/SHALE-262

> HtmlInputHidden fails unit test when using RI
> ---------------------------------------------
>
>                 Key: TOMAHAWK-1023
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1023
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.6, 1.1.7-SNAPSHOT
>            Reporter: Paul Spencer
>             Fix For: 1.1.7-SNAPSHOT
>
>
> -------------------------------------------------------------------------------
> Test set: org.apache.myfaces.component.html.ext.HtmlInputHiddenTest
> Below are output from the test failures. The test are run using the following command:
>    cd tomahawk/core
>    mvn test -Djsf=ri 
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE!
> testDefaultRenderer(org.apache.myfaces.component.html.ext.HtmlInputHiddenTest)  Time elapsed: 0.016 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: ID is not null
> 	at junit.framework.Assert.fail(Assert.java:47)
> 	at junit.framework.Assert.assertTrue(Assert.java:20)
> 	at junit.framework.Assert.assertNotNull(Assert.java:220)
> 	at org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase.assertIdExists(AbstractTomahawkViewControllerTestCase.java:88)
> 	at org.apache.myfaces.component.html.ext.HtmlInputHiddenTest.testDefaultRenderer(HtmlInputHiddenTest.java:64)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.