5 use SGN::Test::WWW::WebDriver;
6 use SGN::Test::Fixture;
8 my $f = SGN::Test::Fixture->new();
9 my $t = SGN::Test::WWW::WebDriver->new();
11 $t->while_logged_in_as("submitter", sub {
13 $t->get_ok('/breeders/crosses');
15 $t->find_element_ok("upload_crosses_link", "name", "click on upload_crosses_link ")->click();
19 my $program_select = $t->find_element_ok("cross_upload_breeding_program", "id", "find breeding program select");
21 $program_select->send_keys('test');
23 my $location_select = $t->find_element_ok("cross_upload_location", "id", "find location select");
25 $location_select->send_keys('test_location');
27 my $upload_input = $t->find_element_ok("crosses_upload_file", "id", "find file input");
29 my $filename = $f->config->{basepath}."/t/data/cross/upload_cross.xls";
31 my $remote_filename = $t->driver()->upload_file($filename);
33 $upload_input->send_keys($filename);
37 $t->find_element_ok("upload_crosses_submit", "id", "submit upload cross file ")->click();
41 $t->find_element_ok("cross_upload_success_dismiss", "id", "dismiss success modal ")->click();
45 $t->get_ok('/breeders/crosses');
49 $t->find_element_ok("test_upload_cross1", "partial_link_text", "find link for test_cross")->click();