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

wicktTester.getLastResponseAsString() returns wrong result after starting a Component

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.5
    • 1.5.6, 6.0.0-beta2
    • wicket
    • None

    Description

      > This following test :

      @Test
      public void test() throws Exception {
      WicketTester tester=new WicketTester();
      tester.startComponentInPage(new Label("lableId", "content") {
      @Override
      protected void onComponentTag(ComponentTag tag)

      { super.onComponentTag(tag); tag.put("test","123"); }

      });
      tester.assertResultPage("icket:id=\"lableId\" test=\"123\">content");
      assertEquals("icket:id=\"lableId\" test=\"123
      \">content",tester.getLastResponseAsString());
      assertEquals("",tester.getResponse().getDocument());
      }

      exposes the wrong behaviour of test.getLastResponseAsString() after starting a component.

      It should return something such as "<span> .... </span>", bit it returns a string "cut in the middle" : cket:id=\"lableId\" test=\"123\">content

      see attached quickstart

      Attachments

        1. quickstart.tgz
          6 kB
          Carsten Behring
        2. WICKET-4507.patch
          5 kB
          Christoph Leiter

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            carstenbehring Carsten Behring
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: