Menu ▾ ▴

#226 Multicheckboxes unconsistancy

v1.0 (example)
open
nobody
None
5
2014-08-01
2014-08-01
Faure Rémi
No

There is a problem with web tester and multi checkboxes.

Simpletest does not behave the same way when you have only one checkbox and more than one.

Example:
You want to test a dynamic page where ckeboxes are created dynamically. There should be one or more checkboxes with the same name.

Case 1: the form got only one checkbox
<input type="checkbox" name="id[]" value="42" />

Case 2: the form got more than one checkbox
<input type="checkbox" name="id[]" value="42" />
<input type="checkbox" name="id[]" value="43" />

You can't do the same test in case one and in case 2:
$this->setField('id[]', 42); //will work in case 1 but not in case 2
$this->setField('id[]', array(42)); //will work in case 2 but not in case 1

Enclosed, a path proposition.

1 Attachments

Related

Bugs: #226

Discussion

  • Perrick Penet

    Perrick Penet - 2014-08-19

    With such a name, I guess I can try answering in French :

    Merci beaucoup de la proposition de patch, est-ce que tu aurais
    l'occasion de mettre ton patch dans une Pull-Request et ta demande dans
    une Issue (le tout sur GitHub).

    https://github.com/simpletest/simpletest/issues

    Ce serait l'occasion d'avance sur cette migration désormais très lente ;-)

    But if I'm mistaken, here's the version in english ;

    Thank you for the proposed patch, could you transform it into a
    Pull-Request / Issue on GitHub where we are moving so very slowly :
    https://github.com/simpletest/simpletest

    Thanks again !

    Yours,
    Perrick

    On 01/08/2014 09:47, Faure Rémi wrote:


    [bugs:#226] http://sourceforge.net/p/simpletest/bugs/226
    Multicheckboxes unconsistancy

    Status: open
    Group: v1.0 (example)
    Created: Fri Aug 01, 2014 07:47 AM UTC by Faure Rémi
    Last Updated: Fri Aug 01, 2014 07:47 AM UTC
    Owner: nobody

    There is a problem with web tester and multi checkboxes.

    Simpletest does not behave the same way when you have only one checkbox
    and more than one.

    Example:
    You want to test a dynamic page where ckeboxes are created dynamically.
    There should be one or more checkboxes with the same name.

    Case 1: the form got only one checkbox

    Case 2: the form got more than one checkbox

    You can't do the same test in case one and in case 2:
    $this->setField('id[]', 42); //will work in case 1 but not in case 2
    $this->setField('id[]', array(42)); //will work in case 2 but not in case 1

    Enclosed, a path proposition.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/simpletest/bugs/226/
    https://sourceforge.net/p/simpletest/bugs/226

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/
    https://sourceforge.net/auth/subscriptions

    --

    Opentime.fr : logiciel web de gestion du temps et suivi d'activité
    http://opentime.fr/

     

    Related

    Bugs: #226


Log in to post a comment.