7 use SGN::Test::WWW::Mechanize;
9 use CXGN::TomatoGenome::BACPublish qw/ publisher aggregate_filename /;
11 my $mech = SGN::Test::WWW::Mechanize->new;
13 # test clone annotation download
14 $mech->get_ok('/maps/physical/clone_info.pl?id=11803');
16 $mech->with_test_level( local => sub {
17 my $c = $mech->context;
20 { skip 'bac annotation files not available', 4
21 unless -e File::Spec->catfile( $c->config->{ftpsite_root}, 'tomato_genome', 'bacs' );
24 my $form = $mech->form_name('clone_annot_download');
25 skip 'clone_annot_download form is not present', 4 unless $form;
27 $mech->submit_form_ok({
28 form_name => 'clone_annot_download',
30 set => 'AUGUSTUS_ab_initio',
35 is( $mech->content_type, 'text/plain', 'text/plain content type' );
36 cmp_ok( length( $mech->content ), '>=', 1000, 'got some content' );
37 like( $mech->content, qr/^##gff-version 3/, 'content looks like gff3' );
41 # keep the code from thinking the error is our fault
42 $mech->add_header( Referer => undef );
44 $mech->get( '/genomic/clone/0/annotation/download?set=AUGUSTUS_ab_initio&format=gff3' );
45 is( $mech->status, 404, 'got a 404 for a nonexistent set' );