Bugs item #1007147, was opened at 2004-08-11 05:09
Message generated for change (Comment added) made by nneuberger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1007147&group_id=61302

Category: None
Group: Release 1.2
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: Simon Turner (simonturner)
Assigned to: Nobody/Anonymous (nobody)
Summary: WebTester.assertRadioOptionNotPresent() broken in 1.2

Initial Comment:
The 1.2 version of
WebTester.assertRadioOptionNotPresent() is broken,
because the first thing it does is assert that the form
element IS present:

public void assertRadioOptionNotPresent(String name,
String radioOption) {
    assertFormElementPresent(name);
    if (dialog.hasRadioOption(name, radioOption))
        Assert.fail("Found option " + radioOption + "
in radio group " + name);
}

The 1.1 version just did:

public void assertRadioOptionNotPresent(String name,
String radioOption) {
    if (dialog.hasRadioOption(name, radioOption))
        Assert.fail("Found option " + radioOption + "
in radio group " + name);
}

----------------------------------------------------------------------

Comment By: Nicholas Neuberger (nneuberger)
Date: 2004-08-18 08:21

Message:
Logged In: YES 
user_id=175635

Does your page not have a <FORM> start and end tag?

I think, to be W3C standard you need a FORM tag.  If not,
then how will the request ever recieve the options from the
form.

FYI.  Almost all assertions in the webunit api have nested
assertions and I believe it should be that way to be W3C
correct.

Why assert that a button is present when you can't even find
which form it belongs to.

I would highly consider just adding a form tag to the page
and being done.

HTH.....  Nick




----------------------------------------------------------------------

Comment By: Simon Turner (simonturner)
Date: 2004-08-18 04:51

Message:
Logged In: YES 
user_id=933904

I should clarify - Jim, your comments imply I am talking
about assertRadioOptionPresent() - where it would obviously
be legitimate to check that the group is present. I am
talking about the method which checks that the option is NOT
present - in this case, the group may or may not be present.

----------------------------------------------------------------------

Comment By: Simon Turner (simonturner)
Date: 2004-08-18 03:21

Message:
Logged In: YES 
user_id=933904

Sorry, I disagree. The method is called
"assertRadioOPTIONNotPresent", and it should do what it
says. Just because I want to assert that a radio BUTTON is
not present does not imply that the GROUP should be present
(nor that it should not, for that matter). It's plain wrong
to have an assertion that implicitly asserts something
additional, if the explicit assertion is not necessarily
contingent on the implicit one. Well IMHO, anyway.

----------------------------------------------------------------------

Comment By: Jim Weaver (prospero2000us)
Date: 2004-08-11 09:36

Message:
Logged In: YES 
user_id=597548

Not a bug.

The lline added verifies that that the form element is present 
(i.e. the radio group) - not that the option being checked for 
is present.  In other words, if you try to check for the 
presence of an option in a radio group that doesn't exist, 
you'll now get an test failure that says there is no such radio 
group, rather than an failure that says the option isn't 
present.

jim

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1007147&group_id=61302


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Jwebunit-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to