made SGN::Controller::Marker a proper catalyst controller, migrated rflp image view...
[sgn.git] / selenium / image / index.t
blob50019af2a208f1562d2efcffdd8246407adc3f73
2 use strict;
3 use Test::More tests=>4;
4 use Test::WWW::Selenium;
6 my $server = $ENV{SELENIUM_TEST_SERVER} || die "Need the ENV SELENIUM_TEST_SERVER set";
7 my $host   = $ENV{SELENIUM_HOST} || die "Need the ENV SELENIUM_HOST set";
8 my $browser = $ENV{SELENIUM_BROWSER} || die "Need the ENV SELENIUM_BROWSER set";
10 my $s = Test::WWW::Selenium->new(
11     host        => $host,
12     port        => 4444,
13     browser     => $browser,
14     browser_url => $server."/image/index.pl?image_id=1",
15     );
17 $s->open_ok($server."/image/index.pl?image_id=1");
19 sleep(4); # wait for the page to load completely (AJAX actions)
20 my $source    = $s->get_html_source();
21 my $body_text = $s->get_body_text();
23 like($body_text, qr/SGN Image/, "String match on page");
24 like($source, qr/<img src=/, "Image tag string present");
25 like($body_text, qr/Image Description/, "Input field match");