start fixing test for multi cat phenotype upload.
[sgn.git] / t / selenium2 / breeders / upload_pedigree_file.t
blobceebc7e22451a1e1f69046da29a9077c6bb9879e
1 use lib 't/lib';
3 use Test::More 'tests' => 6;
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 { 
12     sleep(1);
14     $t->get_ok('/breeders/accessions');
15     sleep(2);
17     $t->find_element_ok("upload_pedigrees_link", "id", "click on upload_pedigrees_link ")->click();
18     sleep(1);
20     my $upload_input = $t->find_element_ok("pedigrees_uploaded_file", "id", "find file input");
22     my $filename = $f->config->{basepath}."/t/data/pedigree_upload/upload_accession_selenium_test.txt";
24     $t->driver()->upload_file($filename);
26     $upload_input->send_keys($filename);
27     sleep(1);
29     $t->find_element_ok("upload_pedigrees_dialog_submit", "id", "validate upload pedigrees file")->click();
30     sleep(3);
32     $t->find_element_ok("upload_pedigrees_store", "id", "store upload pedigrees file to database")->click();
33     sleep(3);
35     $t->find_element_ok("pedigrees_upload_success_dismiss", "id", "dismiss success modal ")->click();
36     sleep(1);
38     }
40 $t->driver()->close();
41 done_testing();