[
https://issues.apache.org/jira/browse/WICKET-5120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13625853#comment-13625853
]
Martin Grigorov commented on WICKET-5120:
-----------------------------------------
I am not sure there is an universal solution here.
You want to assert that a Component (a Panel in your case) has to be used with
a <div>. Someone else may want to use a <span>, <p> or <section>.
The solution is to override
org.apache.wicket.util.tester.BaseWicketTester#createPageMarkup() method and
return whatever markup is needed for the specific case.
> DummyPanelPage sets span element as root
> ----------------------------------------
>
> Key: WICKET-5120
> URL: https://issues.apache.org/jira/browse/WICKET-5120
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.6.0
> Reporter: Arne Baganz
> Attachments: test.tar.gz
>
>
> I have found a problem with WicketTester when I use startComponentInPage with
> a panel that checks its onComponentTag to be a div.
> Please look at the failing test TestHomePage#renderComponentInPage in the
> attached quickstart.
> Quoted from DummyPanelPage.html
> {code}
> <span wicket:id="panel">
> ... replace by testing panel...
> </span>
> {code}
> There is no tag replacement going on, MyPanel starts with:
> {code}
> <span wicket:id="panel">
> {code}
> when run in the test and thus fails when its onComponentTag method is
> executed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira