Wicket
  1. Wicket
  2. WICKET-4507

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.5
    • Fix Version/s: 1.5.6, 6.0.0-beta2
    • Component/s: wicket
    • Labels:
      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

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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Carsten Behring
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development