Account for additional form fields added at run-time in the tests.
This commit is contained in:
parent
c54868e21e
commit
9287b818bf
1 changed files with 6 additions and 1 deletions
|
|
@ -21,14 +21,19 @@ sub list_of_tables {
|
||||||
return [qw/assetData FileAsset ImageAsset/];
|
return [qw/assetData FileAsset ImageAsset/];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub dynamic_form_labels { return 'New file to upload', 'Approved'; }
|
||||||
|
|
||||||
sub t_11_getEditForm : Tests( 2 ) {
|
sub t_11_getEditForm : Tests( 2 ) {
|
||||||
my $test = shift;
|
my $test = shift;
|
||||||
$test->SUPER::getEditForm( @_ );
|
$test->SUPER::t_11_getEditForm( @_ );
|
||||||
my $session = $test->session;
|
my $session = $test->session;
|
||||||
my ( $tag, $asset, @parents ) = $test->getAnchoredAsset();
|
my ( $tag, $asset, @parents ) = $test->getAnchoredAsset();
|
||||||
|
|
||||||
|
$asset->filename('abc.jpg'); # the thumbnail and imageSize read-only form elements only get added if there is a filename
|
||||||
|
|
||||||
# Test extra fields
|
# Test extra fields
|
||||||
my $f = $asset->getEditForm;
|
my $f = $asset->getEditForm;
|
||||||
|
# do { local $Data::Dumper::Maxdepth = 7; use Data::Dumper; warn Dumper $f; };
|
||||||
isa_ok( $f->getTab("properties")->getField("thumbnail"), "WebGUI::Form::ReadOnly" );
|
isa_ok( $f->getTab("properties")->getField("thumbnail"), "WebGUI::Form::ReadOnly" );
|
||||||
isa_ok( $f->getTab("properties")->getField("imageSize"), "WebGUI::Form::ReadOnly" );
|
isa_ok( $f->getTab("properties")->getField("imageSize"), "WebGUI::Form::ReadOnly" );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue