<commit_before>=head1 NAME

t/integration/feature.t - integration tests for generic feature URLs

=head1 DESCRIPTION

Tests for generic feature URLs

=head1 SYNOPSIS

These tests assume that a polypeptide does not have a specialized feature mason
component and gets rendered as a generic feature with mason/feature/dhandler
from SGN::Controller::Feature.

=head1 AUTHORS

<NAME>" Leto

=cut

use strict;
use warnings;
use Test::More;
use lib 't/lib';
use SGN::Test::Data qw/ create_test /;
use SGN::Test::WWW::Mechanize;

my $mech = SGN::Test::WWW::Mechanize->new;

my $poly_cvterm     = create_test('Cv::Cvterm', { name  => 'polypeptide' });
my $poly_feature    = create_test('Sequence::Feature', { type => $poly_cvterm });
my $poly_featureloc = create_test('Sequence::Featureloc', { feature => $poly_feature });

$mech->get_ok("/feature/view/name/" . $poly_feature->name);
$mech->content_contains('Feature Data');
$mech->content_contains($poly_feature->name);
$mech->content_contains('Nucleotide Sequence');

done_testing;<commit_msg>Add some more integration tests for the feature page<commit_after>=head1 NAME

t/integration/feature.t - integration tests for generic feature URLs

=head1 DESCRIPTION

Tests for generic feature URLs

=head1 SYNOPSIS

These tests assume that a polypeptide does not have a specialized feature mason
component and gets rendered as a generic feature with mason/feature/dhandler
from SGN::Controller::Feature.

=head1 AUTHORS

Jonathan "Duke" Leto

=cut

use strict;
use warnings;
use Test::More;
use lib 't/lib';
use SGN::Test::Data qw/ create_test /;
use SGN::Test::WWW::Mechanize;

my $mech = SGN::Test::WWW::Mechanize->new;

my $poly_cvterm     = create_test('Cv::Cvterm', { name  => 'polypeptide' });
my $poly_feature    = create_test('Sequence::Feature', { type => $poly_cvterm });
my $poly_featureloc = create_test('Sequence::Featureloc', { feature => $poly_feature });

$mech->get_ok("/feature/view/name/" . $poly_feature->name);
$mech->content_contains('Feature Data');
$mech->content_contains($poly_feature->name);
$mech->content_contains('Nucleotide Sequence');
$mech->content_contains('Related Features');
$mech->content_contains('Reference Feature');

done_testing;
{'fraction_non_alphanumeric': 0.13710407239819006, 'fraction_numerical': 0.0036199095022624436, 'mean_word_length': 6.132258064516129, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '736835', 'n_tokens_mistral': 736, 'n_tokens_neox': 703, 'n_words': 190}