5 use SGN::Test::WWW::Mechanize;
8 my $base = '/sequencing/itag/status.pl';
9 my $mech = SGN::Test::WWW::Mechanize->new;
11 #also, just make sure the status_html.pl page doesn't crash
12 $mech->get('/sequencing/itag/status_html.pl');
13 $mech->content_like(qr/ITAG feature not enabled|Pipeline Status/, 'status_html.pl does not crash' );
16 skip 'ITAG web feature not enabled, skipping tests', 6 if $mech->content =~ /ITAG feature not enabled/;
18 $mech->get('/sequencing/itag/status.pl?op=lp');
19 $mech->content_like( qr/^(\d+\n)*$/, 'lp looks OK');
20 chomp(my $lp = $mech->content);
21 my @pipelines = map $_+0, split /\n/,$lp;
23 skip 'no ITAG pipelines found, skipping rest of tests', 5 unless @pipelines;
25 my $testpipe = $pipelines[0];
26 $mech->get("$base?op=lb&pipe=$testpipe");
27 $mech->content_like( qr/^(\d+\n)*$/, 'lb looks OK');
29 my ($testbatch) = map $_+0, split /\n/, $mech->content;
31 skip 'no batches found, skipping rest of tests', 4 unless $testbatch;
33 $mech->get("$base?op=la&pipe=$testpipe");
34 $mech->content_like( qr/seq\n/, 'la contains the seq analysis');
35 $mech->content_like( qr/(\w+\n)+/, 'la looks ok');
37 $mech->get("$base?op=astat&pipe=$testpipe&batch=$testbatch&atag=seq");
38 $mech->content_is( "done\n", 'test astat op');
40 $mech->get("$base?op=lbs&pipe=$testpipe&batch=$testbatch");
41 $mech->content_like( qr/([\w\.]+\n){3,}/, 'lbs looks OK');