Merge pull request #5205 from solgenomics/topic/generic_trial_upload
[sgn.git] / selenium / tools / onto / browser.t
blob8a8986c23afd5cb0451f59c6084795447caa5026
2 use strict;
4 use Test::More tests=>8;
6 use Test::WWW::Selenium;
8 my $server = $ENV{SELENIUM_TEST_SERVER} || die "Need the ENV SELENIUM_TEST_SERVER set";
9 my $host   = $ENV{SELENIUM_HOST} || die "Need the ENV SELENIUM_HOST set";
10 my $browser = $ENV{SELENIUM_BROWSER} || die "Need the ENV SELENIUM_BROWSER set";
12 my $s = Test::WWW::Selenium->new(
13     host        => $host,
14     port        => 4444,
15     browser     => $browser,
16     browser_url => $server."/tools/onto/",
17     );
19 $s->open_ok($server."/tools/onto/");
21 sleep(4); # wait for the page to load completely (AJAX actions)
22 my $source    = $s->get_html_source();
23 my $body_text = $s->get_body_text();
25 like($body_text, qr/biological_process/, "GO biological process displayed");
26 like($body_text, qr/cellular_component/, "GO cellular component displayed");
27 like($body_text, qr/molecular_function/, "GO molecular function displayed");
28 like($body_text, qr/plant structure/,    "plant structure test");
29 like($body_text, qr/PATO:0000001/, "PATO present");
30 like($body_text, qr/Solanaceae phenotype ontology/, "SP ontology displayed");
31 like($body_text, qr/plant growth and development stages/, "plant growth devel stages");