Merge branch 'master' into topic/dt_feature_search
[sgn.git] / t / legacy / validate / cview.t
blob4be5d26b9513cbad2b440608f48d3efdd21bd313
1 use strict;
2 use warnings;
4 use FindBin;
5 use lib 't/lib';
6 use SGN::Test qw/validate_urls/;
7 use Test::More;
9 my %urls = (
10         "cview index page"                         => "/cview/index.pl",
11         "map overview F2-2000"                     => "/cview/map.pl?map_id=9",
12         "comparative mapviewer"                    => "/cview/view_chromosome.pl?map_version_id=39",
13         "map overview FISH map"                    => "/cview/map.pl?map_id=13",
14         "physical map overview"                    => "/cview/map.pl?map_id=p9",
15         "agp map overview"                         => "/cview/map.pl?map_id=agp",
18 skip_contig_map_or_not( \%urls );
20 validate_urls(\%urls, $ENV{ITERATIONS} || 1);
22 done_testing;
24 ##########
26 sub skip_contig_map_or_not {
27     my $urls = shift;
28     my $url  = "/cview/map.pl?map_id=c9";
29     my $mech = SGN::Test::WWW::Mechanize->new;
30     $mech->get($url);
31     return if $mech->content =~ m/No database found/;
33     $urls->{'Contig map'} = $url;