[
https://issues.apache.org/jira/browse/WICKET-6423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16084220#comment-16084220
]
Kamil edited comment on WICKET-6423 at 7/12/17 4:03 PM:
--------------------------------------------------------
moreover - If I want to access component inside "MyPanel", I can do
{code}
MyPanel panel = wicketTester.startComponentInPage(new MyPanel("test"));
pagel.get("button") //returns button
{code}
but in wicketTester I must do:
{code}
wicketTester.assertComponent("test:button", MyButton.class);
{code}
I understand logic behind it, but I'd expect, that if I "startComponentInPage"
then my component becomes the "root" of wicketTester - just like with
"startPage".
I just leave it for consideration. If you think that my point is invalid - just
delete this issue.
was (Author: eximius):
moreover - If I want to access component inside "MyPanel", I can do
{code}
MyPanel panel = wicketTester.startComponentInPage(new MyPanel("test"));
pagel.get("button") //returns button
{code}
but in wicketTester I must do:
{code}
wicketTester.assertComponent("test:button", MyButton.class);
{code}
I understand logic behind it, but I'd expect, that if I "startComponentInPage"
then my component becomes the "root" of wicketTester.
I just leave it for consideration. If you think that my point is invalid - just
delete this issue.
> WicketTester should provide assertRenderedComponent method
> ----------------------------------------------------------
>
> Key: WICKET-6423
> URL: https://issues.apache.org/jira/browse/WICKET-6423
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Reporter: Kamil
> Priority: Trivial
>
> When I'm testing Page, I have convenient method to test if it has rendered
> successfuly:
> {code}
> //when
> wicketTester.startPage(MyPage.class);
>
> //then
> wicketTester.assertRenderedPage(MyPage.class);
> {code}
> but when I'm testing particular component:
> {code}
> //given
> final MyPanel panel = new MyPanel("test");
> //when
> wicketTester.startComponentInPage(panel);
> //then
> ??
> {code}
> then I need "assertRenderedComponent(MyPanel.class) in order to test if it
> rendered successfuly
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)