Merge branch 'master' into topic/dt_feature_search
[sgn.git] / t / legacy / integration / feature_gene.t
blob8b4afd985ce61931797c0bf79c035b85f357ca4c
1 =head1 NAME
3 t/integration/feature_gene.t - integration tests for gene feature URLs
5 =head1 DESCRIPTION
7 Tests for gene feature URLs
9 =head1 AUTHORS
11 Jonathan "Duke" Leto
13 =cut
15 use strict;
16 use warnings;
17 use Test::More;
18 use lib 't/lib';
19 use SGN::Test::Data qw/ create_test /;
20 use SGN::Test::WWW::Mechanize;
22 my $mech = SGN::Test::WWW::Mechanize->new;
24 my $gene_cvterm     = create_test('Cv::Cvterm', { name  => 'gene' });
25 my $gene_feature    = create_test('Sequence::Feature', { type => $gene_cvterm });
26 my $gene_featureloc = create_test('Sequence::Featureloc', { feature => $gene_feature });
28 $mech->get_ok("/feature/view/name/" . $gene_feature->name);
29 $mech->content_contains($gene_feature->name);
30 $mech->content_contains('Genomic sequence');
31 $mech->content_contains('Related features');
33 my $name = $gene_feature->name;
35 like( $mech->findvalue( '/html/body//span[@class="sequence"]'), qr/>$name\s*/, "Found >$name seq header");
37 ok($mech->exists(
38         sprintf '/html/body//div[@class="info_table_fieldval"]/a[@href="/chado/cvterm?cvterm_id=%s"]',
39             $gene_cvterm->cvterm_id
40     ),'the proper cvterm id link exists');
42 done_testing;