replace smiley face with [Loading...]
[sgn.git] / t / selenium2 / search / trial.t
blob9c33fbe2156179d02ce23a0bce6216d39eb2f2af
2 use strict;
4 use lib 't/lib';
6 use Test::More;
7 use SGN::Test::WWW::WebDriver;
9 my $d = SGN::Test::WWW::WebDriver->new();
11 $d->get_ok('/search/trials');
13 sleep(2);
15 ok($d->driver->get_page_source()=~/Kasese/, "find trial search result content");
17 ok($d->driver->get_page_source()=~/2014/, "find trial year in trial search results");
19 my $trial_search_input = $d->find_element("//div[\@id=\"trial_search_results_filter\"]/descendant::label/descendant::input", "xpath");
21 $trial_search_input->send_keys("Kasese");
23 sleep(5);
25 my $page_source = $d->driver->get_page_source();
27 ok($page_source=~m/loaded into the fixture to test solgs/, "find trial description");
29 sleep(2);
31 ok($page_source!~m/test_trial/, "Do not find the test trial now");
33 ok($d->find_element_ok("Kasese solgs trial", "link_text", "verify search")->click());
36 sleep(2);
38 done_testing();