modified comparison condition
[sgn.git] / t / selenium2 / breeders / create_phenotyping_spreadsheet.t
blobbc8b0478abfca0aa4f49f4b20d500a94281adbb2
1 use strict;
3 use lib 't/lib';
5 use Test::More;
6 use SGN::Test::WWW::WebDriver;
8 my $d = SGN::Test::WWW::WebDriver->new();
10 $d->login_as("submitter");
12 $d->get_ok('/breeders/trial/137');
14 sleep(3);
16 my $out = $d->find_element_ok("lists_link", "name", "find lists_link")->click();
18 $d->find_element_ok("add_list_input", "id", "find add list input");
20 my $add_list_input = $d->find_element_ok("add_list_input", "id", "find add list input test");
21    
22 $add_list_input->send_keys("new_test_list_pheno_spreadsheet");
24 sleep(1);
26 $d->find_element_ok("add_list_button", "id", "find add list button test")->click();
28 sleep(1);
30 $d->find_element_ok("view_list_new_test_list_pheno_spreadsheet", "id", "view list test")->click();
32 sleep(2);
34 my $type_select = $d->find_element_ok("type_select", "id", "find list type");
36 $type_select->send_keys("traits");
38 sleep(1);
40 $d->find_element_ok("dialog_add_list_item", "id", "add test list")->send_keys("dry matter content|CO_334:0000092\nfresh root weight|CO_334:0000012\nfresh shoot weight|CO_334:0000016\nharvest index|CO_334:0000015\n");
43 sleep(1);
45 $d->find_element_ok("dialog_add_list_item_button", "id", "find dialog_add_list_item_button test")->click();
47 my $button = $d->find_element_ok("close_list_item_dialog", "id", "find close_list_item_dialog button test");
49 $button->click();
51 sleep(1);
54 $d->find_element_ok("close_list_dialog_button", "id", "find close dialog button")->click();
57         $d->get_ok('/breeders/trial/137');
58         
59         sleep(3);
61         my $create_spreadsheet_link = $d->find_element_ok('create_spreadsheet_link', 'id', "find create spreadsheet link");
63         $create_spreadsheet_link->click();
65         sleep(5);
67         $d->find_element_ok('trait_list_list_select', 'id', "find list select select box")->send_keys('new_test_list_pheno_spreadsheet');
69         my $button = $d->find_element_ok('create_phenotyping_ok_button', 'id', "create");
71         $button->click();
73         sleep(5);
75         
76     
77 $d->logout_ok();
79 done_testing();
81 $d->driver->close();