Wicket
  1. Wicket
  2. WICKET-3913

WicketTester doesn't changes from panel to page

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5-RC5.1
    • Fix Version/s: 1.5-RC6
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      Maven, Eclipse Helios

      Description

      I have a small panel with a form. The form sends a response to another page (not panel), when submitted.

      I want to test the panel using WicketTester.startPanel():

      @Test
      public void testCreateStandardMessage()

      { tester.startPanel(NavigationHeaderPanel.class); tester.clickLink("navigationHeader:createNewStandardMessage"); tester.assertRenderedPage(ComposeMailPage.class); tester.assertLabel("createForm:stampLabel", "Standard"); }

      I got an error on the last line:

      junit.framework.AssertionFailedError: path: 'testObject:createForm:stampLabel' does not exist for page: ComposeMailPage

      As you see, WicketTester still prefixes the path with "testObject:", which shouldn't be for the response page. The path to the label ("createForm:stampLabel") itself is right for the page.

      The same was working in Wicket 1.4.x

        Activity

        Ruslan Shyposha created issue -
        Ruslan Shyposha made changes -
        Field Original Value New Value
        Description I have a small panel with a form. The form sends a response to another page (not panel), when submitted.

        I want to test the panel using WicketTester.startPanel():

            @Test
            public void testCreateStandardMessage() {

                tester.startPanel(NavigationHeaderPanel.class);

                tester.clickLink("navigationHeader:createNewStandardMessage");
                tester.assertRenderedPage(ComposeMailPage.class);

                tester.assertLabel("createForm:stampLabel", "Standard");
            }

        I got an error on the last line:

        junit.framework.AssertionFailedError: path: 'testObject:createForm:stampLabel' does not exist for page: ComposeMailPage

        As you see, WicketTester still prefixes the path with "testObject:", which shouldn't be for the response page. The path to the label itself is right.
        I have a small panel with a form. The form sends a response to another page (not panel), when submitted.

        I want to test the panel using WicketTester.startPanel():

            @Test
            public void testCreateStandardMessage() {

                tester.startPanel(NavigationHeaderPanel.class);

                tester.clickLink("navigationHeader:createNewStandardMessage");
                tester.assertRenderedPage(ComposeMailPage.class);

                tester.assertLabel("createForm:stampLabel", "Standard");
            }

        I got an error on the last line:

        junit.framework.AssertionFailedError: path: 'testObject:createForm:stampLabel' does not exist for page: ComposeMailPage

        As you see, WicketTester still prefixes the path with "testObject:", which shouldn't be for the response page. The path to the label ("createForm:stampLabel") itself is right for the page.

        The same was working in Wicket 1.4.x
        Ruslan Shyposha made changes -
        Affects Version/s 1.5-RC5.1 [ 12316651 ]
        Martin Grigorov made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Martin Grigorov [ mgrigorov ]
        Fix Version/s 1.5-RC6 [ 12316657 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Ruslan Shyposha
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development