Tree view buttons now work. Changed progress bar helpers to use fork. Added forkId option to AssetHelpers. Added updateAsset service to Admin.

This commit is contained in:
Doug Bell 2011-03-03 19:25:20 -06:00
parent 399aa5368b
commit b27bc19e4d
14 changed files with 757 additions and 277 deletions

View file

@ -30,12 +30,13 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests
plan tests => 3; # Increment this number for each test you create
plan tests => 2; # Increment this number for each test you create
#----------------------------------------------------------------------------
# put your tests here
my $output;
$session->setting->set( "versionTagMode" => "autoCommit" );
my $helper = WebGUI::AssetHelper::Copy->new( id => 'copy', session => $session );
my $home = WebGUI::Asset->getDefault($session);
my $root = WebGUI::Asset->getRoot($session);
@ -46,19 +47,14 @@ my $root = WebGUI::Asset->getRoot($session);
cmp_deeply(
$output,
{
openDialog => all(
re('helperId=copy'),
re('method=copy'),
re('assetId=' . $home->getId ),
),
forkId => re('[a-zA-Z0-9_-]{22}'),
},
'AssetHelper/Copy opens a dialog for the copy method'
'AssetHelper/Copy forks a process'
);
}
my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file );
$mech->get_ok( '/?op=assetHelper;helperId=copy;method=copy;assetId=' . $home->getId );
WebGUI::Test->waitForAllForks;
$session->cache->clear;
my $clippies = $root->getLineage(["descendants"], {statesToInclude => [qw{clipboard clipboard-limbo}], returnObjects => 1,});
is @{ $clippies }, 1, '... only copied 1 asset to the clipboard, no children';
addToCleanup(@{ $clippies });