Update this test for the new API. Note that Captcha, Asset, User, Color
and some other form fields are now profile enabled.
This commit is contained in:
parent
bcdafdc84b
commit
3abd3988c7
1 changed files with 5 additions and 5 deletions
|
|
@ -18,7 +18,7 @@ use WebGUI::Form::DynamicField;
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
use WebGUI::Utility;
|
use WebGUI::Utility;
|
||||||
|
|
||||||
#The goal of this test is to verify that the profileEnabled setting
|
#The goal of this test is to verify that the isDynamicCompatible setting
|
||||||
#works on all form elements and that only the correct forms are profile
|
#works on all form elements and that only the correct forms are profile
|
||||||
#enabled.
|
#enabled.
|
||||||
|
|
||||||
|
|
@ -40,16 +40,16 @@ $numTests = scalar @formTypes + 1;
|
||||||
plan tests => $numTests;
|
plan tests => $numTests;
|
||||||
|
|
||||||
|
|
||||||
my @notEnabled = qw/Asset Button Captcha Checkbox Color Control List MimeType SubscriptionGroup Slider Submit User Attachments/;
|
my @notEnabled = qw/Button Control List MimeType SubscriptionGroup Slider Submit Attachments/;
|
||||||
|
|
||||||
foreach my $formType (@formTypes) {
|
foreach my $formType (@formTypes) {
|
||||||
my $form = WebGUI::Form::DynamicField->new($session, fieldType => $formType);
|
my $form = WebGUI::Form::DynamicField->new($session, fieldType => $formType);
|
||||||
my $ref = (split /::/, ref $form)[-1];
|
my $ref = (split /::/, ref $form)[-1];
|
||||||
if (isIn($ref, @notEnabled)) {
|
if (isIn($ref, @notEnabled)) {
|
||||||
ok(!$form->get('profileEnabled'), " $ref should not be profile enabled");
|
ok(!$form->isDynamicCompatible, " $ref should not be profile enabled");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ok($form->get('profileEnabled'), "$ref should be profile enabled");
|
ok($form->isDynamicCompatible, "$ref should be profile enabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -57,4 +57,4 @@ foreach my $formType (@formTypes) {
|
||||||
##an object of type Text!
|
##an object of type Text!
|
||||||
my $form = WebGUI::Form::DynamicField->new($session);
|
my $form = WebGUI::Form::DynamicField->new($session);
|
||||||
|
|
||||||
ok($form->get('profileEnabled'), 'DynamicField lies about being profile enable');
|
ok($form->isDynamicCompatible, 'DynamicField lies about being profile enable');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue