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

Kamil commented on WICKET-6435:
-------------------------------

Another use case of notExist is when I have a ListView which, depending on 
conditions, will have on or two buttons.
Having notExist I could do:
{code}
                wicketTester.assertComponent("test:linkContainer:0:button", 
AjaxLink.class);
                wicketTester.assertVisible("test:linkContainer:0:button");

                wicketTester.assertNotExist("test:linkContainer:1:button");
{code}

> WicketTester should provide assertExists and assertNotExists methods
> --------------------------------------------------------------------
>
>                 Key: WICKET-6435
>                 URL: https://issues.apache.org/jira/browse/WICKET-6435
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Kamil
>
> BaseWicketTester has:
> {code}
> private Component assertExists(final String path)
> {code}
> which is unfortunately private and doesn't provide contrary method.
> These methods are very important if you want to properly test code which is 
> using Fragments: one Fragment is being added at time (exist) while another is 
> not added (notExist)
> Could you please make assertExists public and add assertNotExists method?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to