[ 
https://issues.apache.org/jira/browse/WICKET-6423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16100709#comment-16100709
 ] 

Martin Grigorov edited comment on WICKET-6423 at 7/25/17 8:22 PM:
------------------------------------------------------------------

If you start the component by providing an instance then you set its id and you 
can use #assertComponent("yourId", SomeComponent.class).

If you start the component by providing a Class then you can use 
#assertComponent("", SomeComponent.class).

This behavior is explained in the javadoc of #startComponentInPage() methods.

I don't like the idea of having #assertRenderedComponent() method that will be 
useful only when you use #startComponentInPage(Class). I don't see a good 
behavior for it when #startPage() is used. It will be very confusing in my 
opinion.


was (Author: mgrigorov):
If you start the component by providing an instance the you set its id and you 
can use #assertComponent("yourId", SomeComponent.class).

If you start the component by providing a Class then you can use 
#assertComponent("", SomeComponent.class).

This behavior is explained in the javadoc of #startComponentInPage() methods.

I don't like the idea of having #assertRenderedComponent() method that will be 
useful only when you use #startComponentInPage(Class). I don't see a good 
behavior for it when #startPage() is used. It will be very confusing in my 
opinion.

> 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)

Reply via email to