You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Gerolf Seitz (JIRA)" <ji...@apache.org> on 2007/12/02 23:00:46 UTC

[jira] Created: (WICKET-1199) false positive or wrong unit tests unit tests when ajax is involved

false positive or wrong unit tests unit tests when ajax is involved
-------------------------------------------------------------------

                 Key: WICKET-1199
                 URL: https://issues.apache.org/jira/browse/WICKET-1199
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-rc1
            Reporter: Gerolf Seitz
            Assignee: Gerolf Seitz
            Priority: Critical
             Fix For: 1.3.0-rc2


MockWebApplication#setupRequestAndResponse always sets up a non ajax requestcycle.
this method is also used to setup the requestcycle for ajax related functionality (eg. BaseWicketTester#clickLink).

the consequence are:
a) the markup for expected ajax responses contains wicket tags and wicket attributes, although these are never rendered in ajax responses.
b) some unit tests (eg. AjaxTimerBehaviorTest#testAddToAjaxUpdate, ComponentBorderTest#testHideableBorder) succeed, when the same code in non-unit-test environment doesn't work, because there is no ajax request during testing, while there is one during normal execution.

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


[jira] Resolved: (WICKET-1199) false positive or wrong unit tests unit tests when ajax is involved

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerolf Seitz resolved WICKET-1199.
----------------------------------

    Resolution: Fixed

fixed.

added the method MockWebApplication#setupRequestAndResponse(boolean isAjax), which adds the "Wicket-Ajax" header if isAjax is true.
this method is used, instead of the overloaded method with no parameters, if a requestcycle should be built for ajax related unit tests.

> false positive or wrong unit tests unit tests when ajax is involved
> -------------------------------------------------------------------
>
>                 Key: WICKET-1199
>                 URL: https://issues.apache.org/jira/browse/WICKET-1199
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Gerolf Seitz
>            Assignee: Gerolf Seitz
>            Priority: Critical
>             Fix For: 1.3.0-rc2
>
>
> MockWebApplication#setupRequestAndResponse always sets up a non ajax requestcycle.
> this method is also used to setup the requestcycle for ajax related functionality (eg. BaseWicketTester#clickLink).
> the consequence are:
> a) the markup for expected ajax responses contains wicket tags and wicket attributes, although these are never rendered in ajax responses.
> b) some unit tests (eg. AjaxTimerBehaviorTest#testAddToAjaxUpdate, ComponentBorderTest#testHideableBorder) succeed, when the same code in non-unit-test environment doesn't work, because there is no ajax request during testing, while there is one during normal execution.

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