3 t/integration/feature_gene.t - integration tests for gene feature URLs
7 Tests for gene feature URLs
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 Data');
30 $mech->content_contains('Gene: ' . $gene_feature->name);
31 $mech->content_contains('Genomic Sequence');
32 $mech->content_contains('Related Features');
34 my ($name, $residues) = ($gene_feature->name, $gene_feature->residues);
36 like( $mech->findvalue( '/html/body//span[@class="sequence"]'), qr/>$name\s*$residues/, "Found >$name\\n$residues");
39 sprintf '/html/body//div[@class="info_table_fieldval"]/a[@href="/chado/cvterm.pl?cvterm_id=%s"]',
40 $gene_cvterm->cvterm_id
41 ),'the proper cvterm id link exists');