9 use SGN::Test::WWW::WebDriver;
10 use SGN::Test::Fixture;
12 my $f = SGN::Test::Fixture->new();
13 my $t = SGN::Test::WWW::WebDriver->new();
15 $t->while_logged_in_as(
20 $t->get_ok('/breeders/genotyping');
21 my $link = $t->find_element_ok("create_igd_genotyping_trial_link", "id", "find creategenotype trial link");
25 my $input_year = $t->find_element_ok("year_select", "id", "find year select");
27 $input_year->send_keys("2015");
29 my $file_upload = $t->find_element_ok("igd_genotyping_trial_upload_file", "id", "find trial file upload button");
30 my $filename = $f->config->{basepath}."/t/data/genotype_trial_upload/CASSAVA_GS_74Template";
31 my $remote_filename = $t->driver()->upload_file($filename);
32 $file_upload->send_keys($filename);
34 my $accession_input = $t->find_element_ok("igd_accession_select_box_list_select", "id", "find accession list");
35 $accession_input->send_keys("test_list");
37 my $ok = $t->find_element_ok("add_igd_geno_trial_submit", "id", "find ok button on submit genotype trial dialog");
42 $t->driver->accept_alert();
48 $t->find_element_ok("trial_accessions_onswitch", "id", "view trial accessions")->click();
50 $t->find_element_ok("BLANK", "partial_link_text", "verify accessions");
51 $t->find_element_ok("test_accession5", "partial_link_text", "verify accessions");
52 $t->find_element_ok("test_accession1", "partial_link_text", "verify accessions");
53 $t->find_element_ok("test_accession2", "partial_link_text", "verify accessions");
54 $t->find_element_ok("test_accession3", "partial_link_text", "verify accessions");
55 $t->find_element_ok("test_accession4", "partial_link_text", "verify accessions");
56 $t->find_element_ok("trial_controls_onswitch", "id", "view trial controls")->click();
58 $t->find_element_ok("trial_plots_onswitch", "id", "view trial plots")->click();
60 $t->find_element_ok("//div[contains(., 'CASSAVA_GS_74_A01')]", "xpath", "verify plots")->get_text();
61 $t->find_element_ok("//div[contains(., 'CASSAVA_GS_74_A02')]", "xpath", "verify plots")->get_text();
62 $t->find_element_ok("//div[contains(., 'CASSAVA_GS_74_A03')]", "xpath", "verify plots")->get_text();
63 $t->find_element_ok("//div[contains(., 'CASSAVA_GS_74_A04')]", "xpath", "verify plots")->get_text();
64 $t->find_element_ok("//div[contains(., 'CASSAVA_GS_74_A05')]", "xpath", "veify plots")->get_text();
65 $t->find_element_ok("//div[contains(., 'CASSAVA_GS_74_F05_BLANK')]", "xpath", "verify plots")->get_text();
67 $t->find_element_ok("trial_plate_layout_onswitch", "id", "view plate layout")->click();
69 $t->find_element_ok("//div[contains(., 'A01')]", "xpath", "verify plots")->get_text();
70 $t->find_element_ok("//div[contains(., 'A02')]", "xpath", "verify plots")->get_text();
71 $t->find_element_ok("//div[contains(., 'A03')]", "xpath", "verify plots")->get_text();
72 $t->find_element_ok("//div[contains(., 'A04')]", "xpath", "verify plots")->get_text();
73 $t->find_element_ok("//div[contains(., 'A05')]", "xpath", "verify plots")->get_text();
74 $t->find_element_ok("//div[contains(., 'F05')]", "xpath", "verify plots")->get_text();
77 $t->download_linked_file("genotyping_trial_spreadsheet_link");