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

Improve check for components added to AJAX response in WicketTester

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.6, 1.3.0-beta1
    • 1.3.0-final
    • wicket
    • None

    Description

      The javadoc for wicket.util.tester.WicketTester.assertComponentOnAjaxResponse makes this statement:

      "This method doesn't actually insert the component in the client DOM tree, using javascript. But it shouldn't be needed because you have to trust that the Wicket Ajax Javascript just works."

      Turns out that there is another way to have the component replacement fail, which is to forget to setOutputMarkupId(true) or to setVisible(false).

      I propose to improve this method to at least check that the component's markup id made it into the page, or at least that the component isOutputMarkupId and isVisible.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jsalvata@apache.org Jordi Salvat i Alabart
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: