You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2014/02/11 14:07:35 UTC
Is EnclosureTest#testRender10 correct ?
Hi,
While debugging https://issues.apache.org/jira/browse/WICKET-5499 I
stumbled upon
org.apache.wicket.markup.html.internal.EnclosureTest#testRender10
Maybe I miss something but this confuses me with its behavior.
There is a page with the following markup:
<html xmlns:wicket>
<body>
<wicket:enclosure child="input">
<input wicket:id="input" type="checkbox" value="salami"/>
<span wicket:id="label">label</span>
</wicket:enclosure>
</body>
</html>
and Java code:
public EnclosurePage_10()
{
add(new CheckBox("input"));
add(new Label("label"));
}
The test changes the visibility of the CheckBox and/or the Label and
verifies the response markup.
No matter what combination of visibility these components have the final
result is always the same - the enclosure and its children are always
rendered.
Am I missing something or the test got broken at some point after running
with -Dwicket.replace.expected.results=true ?
Martin Grigorov
Wicket Training and Consulting
Re: Is EnclosureTest#testRender10 correct ?
Posted by Martin Grigorov <mg...@apache.org>.
For completeness this issue has been fixed with
https://issues.apache.org/jira/browse/WICKET-5499
Martin Grigorov
Wicket Training and Consulting
On Tue, Feb 11, 2014 at 2:42 PM, Sven Meier <sv...@meiers.net> wrote:
> Hi Martin,
>
> EnclosurePage_10 is stateless, so a redirect is issued to a new page
> instance. Therefore #setVisible() on the checkbox has no effect.
>
>
> or the test got broken at some point after running
>> with -Dwicket.replace.expected.results=true ?
>>
>
> Probably.
>
> Sven
>
>
> On 02/11/2014 02:07 PM, Martin Grigorov wrote:
>
>> Hi,
>>
>> While debugging https://issues.apache.org/jira/browse/WICKET-5499 I
>> stumbled upon
>> org.apache.wicket.markup.html.internal.EnclosureTest#testRender10
>>
>> Maybe I miss something but this confuses me with its behavior.
>> There is a page with the following markup:
>>
>> <html xmlns:wicket>
>> <body>
>> <wicket:enclosure child="input">
>> <input wicket:id="input" type="checkbox" value="salami"/>
>> <span wicket:id="label">label</span>
>> </wicket:enclosure>
>> </body>
>> </html>
>>
>>
>> and Java code:
>>
>> public EnclosurePage_10()
>> {
>> add(new CheckBox("input"));
>> add(new Label("label"));
>> }
>>
>> The test changes the visibility of the CheckBox and/or the Label and
>> verifies the response markup.
>> No matter what combination of visibility these components have the final
>> result is always the same - the enclosure and its children are always
>> rendered.
>>
>> Am I missing something or the test got broken at some point after running
>> with -Dwicket.replace.expected.results=true ?
>>
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>>
>>
>
Re: Is EnclosureTest#testRender10 correct ?
Posted by Sven Meier <sv...@meiers.net>.
Hi Martin,
EnclosurePage_10 is stateless, so a redirect is issued to a new page
instance. Therefore #setVisible() on the checkbox has no effect.
> or the test got broken at some point after running
> with -Dwicket.replace.expected.results=true ?
Probably.
Sven
On 02/11/2014 02:07 PM, Martin Grigorov wrote:
> Hi,
>
> While debugging https://issues.apache.org/jira/browse/WICKET-5499 I
> stumbled upon
> org.apache.wicket.markup.html.internal.EnclosureTest#testRender10
>
> Maybe I miss something but this confuses me with its behavior.
> There is a page with the following markup:
>
> <html xmlns:wicket>
> <body>
> <wicket:enclosure child="input">
> <input wicket:id="input" type="checkbox" value="salami"/>
> <span wicket:id="label">label</span>
> </wicket:enclosure>
> </body>
> </html>
>
>
> and Java code:
>
> public EnclosurePage_10()
> {
> add(new CheckBox("input"));
> add(new Label("label"));
> }
>
> The test changes the visibility of the CheckBox and/or the Label and
> verifies the response markup.
> No matter what combination of visibility these components have the final
> result is always the same - the enclosure and its children are always
> rendered.
>
> Am I missing something or the test got broken at some point after running
> with -Dwicket.replace.expected.results=true ?
>
>
> Martin Grigorov
> Wicket Training and Consulting
>