From c9db7b0d7fa311122cab2aaff80461e86b933fd0 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Wed, 26 Jan 2011 16:17:46 -0600 Subject: [PATCH] add more tests for www_editField --- t/Asset/Wobject/DataForm.t | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/t/Asset/Wobject/DataForm.t b/t/Asset/Wobject/DataForm.t index e6609c511..a5bfa058d 100644 --- a/t/Asset/Wobject/DataForm.t +++ b/t/Asset/Wobject/DataForm.t @@ -44,7 +44,7 @@ $dform->createField('gotCaptcha', { type => 'Captcha', name => 'humanCheck', }); #---------------------------------------------------------------------------- # Tests -plan tests => 8; # Increment this number for each test you create +plan tests => 11; # Increment this number for each test you create #---------------------------------------------------------------------------- # _createForm @@ -117,6 +117,29 @@ cmp_deeply( ); # Edit that field +sleep 1; # stupid addRevision +$mech->get_ok( $df->getUrl( 'func=editField;fieldName=request' ) ); +$mech->submit_form_ok( { + fields => { + label => 'Beg Here', + tabId => 0, + subtext => 'Throw yourself upon the mercy of the manager', + }, +}, "edit the field" ); + +$df = WebGUI::Asset->newPending( $mech->session, $df->getId ); +cmp_deeply( + $df->getFieldConfig( "request" ), + superhashof( { + label => 'Beg Here', + name => 'request', + tabId => undef, + subtext => 'Throw yourself upon the mercy of the manager', + type => 'Textarea', + } ), + "field config updated", +); + #vim:ft=perl