3 use Test::More 'tests' => 17;
5 use SGN::Test::WWW::WebDriver;
7 my $t = SGN::Test::WWW::WebDriver->new();
9 $t->while_logged_in_as("submitter", sub {
12 $t->get_ok('/breeders/accessions');
16 $t->find_element_ok("lists_link", "name", "find lists_link")->click();
18 $t->find_element_ok("add_list_input", "id", "find add list input");
20 $t->find_element_ok("add_list_input", "id", "find add list input test")->send_keys("find_trials_in_common");
22 $t->find_element_ok("add_list_button", "id", "find add list button test")->click();
24 $t->find_element_ok("view_list_find_trials_in_common", "id", "view list test")->click();
28 $t->find_element_ok("dialog_add_list_item", "id", "add test list")->send_keys("UG120001\nUG120002\nUG120003\n");
32 $t->find_element_ok("type_select", "id", "set type accessions test")->click();
33 $t->find_element_ok('option[name="accessions"]', "css", "select type 'accessions' from a list")->click();
35 $t->find_element_ok("dialog_add_list_item_button", "id", "find dialog_add_list_item_button test")->click();
38 $t->find_element_ok("close_list_item_dialog", "id", "find close_list_item_dialog button test")->click();
41 $t->find_element_ok("close_list_dialog_button", "id", "find close dialog button")->click();
43 #use test list to test find trials in common tool
44 $t->get_ok('/breeders/accessions');
47 $t->find_element_ok("accession_list_list_select", "id", "select accession list test")->click();
49 "//select[\@id='accession_list_list_select']/option[contains(text(),'find_trials_in_common')]",
51 "Select find_trials_in_common on list select")->click();
54 $t->find_element_ok("find_trials", "id", "find trials test")->click();
57 $t->find_element_ok("trial_summary_data", "id", "trial summary data test");