Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users
Test::WWW::Mechanize::Catalyst and Catalyst::Controller::HTML::FormFu
 

Index | Next | Previous | View Flat


kiffin.gish at planet

Jun 22, 2009, 11:50 AM


Views: 539
Permalink
Test::WWW::Mechanize::Catalyst and Catalyst::Controller::HTML::FormFu

I'm using Test::WWW::Mechanize::Catalyst to test my Catalyst App, more
specifically the process for registering new user accounts.

The application form is generated by Catalyst::Controller::HTML::FormFu
with the expected fields: username, password, confirm_password, email
and the submit => 'Register' button (indicator).

When using the good ol' browser the form is submitted and an email sent
for validation, no problem.

However, making the exact same call with Test::WWW::Mechanize::Catalyst
as follows:

my $fields = {
username => $username,
password => $password,
confirm_password => $password,
password_hint => $password_hint,
email => $email,
submit => 'Register'
};

$mech->submit_form(
form_number => 0,
fields => $fields,
);

will not work because within the sub register : Global FormConfig of my
controller, $form->submitted_and_valid is returning false for some weird
reason.

I tried debugging the HTML::FormFu stuff but this is all very
complicated.

Can anyone help me here?

--
Kiffin Gish <Kiffin.Gish[at]planet.nl>
Gouda, The Netherlands



_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Subject User Time
Test::WWW::Mechanize::Catalyst and Catalyst::Controller::HTML::FormFu kiffin.gish at planet Jun 22, 2009, 11:50 AM
    Re: Test::WWW::Mechanize::Catalyst and Catalyst::Controller::HTML::FormFu ash_cpan at firemirror Jun 22, 2009, 1:50 PM
    Re: Test::WWW::Mechanize::Catalyst and Catalyst::Controller::HTML::FormFu kiffin.gish at planet Jun 23, 2009, 4:05 AM
        Re: Test::WWW::Mechanize::Catalyst and Catalyst::Controller::HTML::FormFu kiffin.gish at planet Jun 23, 2009, 5:28 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.