Wicket
  1. Wicket
  2. WICKET-4810

CLONE - BaseWicketTester.clickLink() does not work with a ResourceLink with ResourceReference

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.4
    • Fix Version/s: 6.2.0, 1.5.9
    • Component/s: wicket
    • Labels:
      None

      Description

      When using BaseWicketTester.clickLink() with a ResourceLink with a ResourceReference, it does not work.
      Clicking link in server (Jetty) it works and opens the resource. See attached quickstart.

      When the ResourceLink is created with the Resource directly, BaseWicketTester.clickLink() works.

      @Test
      public void clickingLink()

      { // doesn't work tester.clickLink("shared"); Assert.assertEquals(tester.getContentTypeFromResponseHeader(), "text/plain"); }

      @Test
      public void usingListener()

      { // doesn't work either tester.executeListener(tester.getComponentFromLastRenderedPage("shared"), IResourceListener.INTERFACE); Assert.assertEquals(tester.getContentTypeFromResponseHeader(), "text/plain"); }

        Issue Links

          Activity

          Eric Le Lay created issue -
          Eric Le Lay made changes -
          Field Original Value New Value
          Link This issue is a clone of WICKET-4437 [ WICKET-4437 ]
          Eric Le Lay made changes -
          Description When using BaseWicketTester.clickLink() with ResourceLink, it does not work. Clicking link in server (Jetty) it works and opens the resource. See attached quickstart.

          @Test
          public void clickingLink() {
                        // doesn't work
          tester.clickLink("download");
          Assert.assertEquals(tester.getContentTypeFromResponseHeader(), "text/plain");
          }

          @Test
          public void usingListener() {
                          // works
          tester.executeListener(tester.getComponentFromLastRenderedPage("download"), IResourceListener.INTERFACE);
          Assert.assertEquals(tester.getContentTypeFromResponseHeader(), "text/plain");
          }
          When using BaseWicketTester.clickLink() with a ResourceLink with a ResourceReference, it does not work. Clicking link in server (Jetty) it works and opens the resource. See attached quickstart.

          @Test
          public void clickingLink() {
                        // doesn't work
          tester.clickLink("download");
          Assert.assertEquals(tester.getContentTypeFromResponseHeader(), "text/plain");
          }

          @Test
          public void usingListener() {
                          // works
          tester.executeListener(tester.getComponentFromLastRenderedPage("download"), IResourceListener.INTERFACE);
          Assert.assertEquals(tester.getContentTypeFromResponseHeader(), "text/plain");
          }
          Eric Le Lay made changes -
          Description When using BaseWicketTester.clickLink() with a ResourceLink with a ResourceReference, it does not work. Clicking link in server (Jetty) it works and opens the resource. See attached quickstart.

          @Test
          public void clickingLink() {
                        // doesn't work
          tester.clickLink("download");
          Assert.assertEquals(tester.getContentTypeFromResponseHeader(), "text/plain");
          }

          @Test
          public void usingListener() {
                          // works
          tester.executeListener(tester.getComponentFromLastRenderedPage("download"), IResourceListener.INTERFACE);
          Assert.assertEquals(tester.getContentTypeFromResponseHeader(), "text/plain");
          }
          When using BaseWicketTester.clickLink() with a ResourceLink with a ResourceReference, it does not work.
          Clicking link in server (Jetty) it works and opens the resource. See attached quickstart.

          When the ResourceLink is created with the Resource directly, BaseWicketTester.clickLink() works.


          @Test
          public void clickingLink() {
                        // doesn't work
          tester.clickLink("shared");
          Assert.assertEquals(tester.getContentTypeFromResponseHeader(), "text/plain");
          }

          @Test
          public void usingListener() {
                          // doesn't work either
          tester.executeListener(tester.getComponentFromLastRenderedPage("shared"), IResourceListener.INTERFACE);
          Assert.assertEquals(tester.getContentTypeFromResponseHeader(), "text/plain");
          }
          Eric Le Lay made changes -
          Attachment sharedresourcelink.zip [ 12548415 ]
          Martin Grigorov made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 6.2.0 [ 12323295 ]
          Fix Version/s 1.5.9 [ 12322962 ]
          Fix Version/s 6.0.0-beta1 [ 12315431 ]
          Fix Version/s 1.5.6 [ 12319053 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Martin Grigorov
              Reporter:
              Eric Le Lay
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development