Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1199

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.3.0-rc1
    • 1.3.0-rc2
    • wicket
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            seitz Gerolf Seitz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: