7 use SGN::Test::WWW::WebDriver;
8 use SGN::Test::Fixture;
9 use SGN::Test::solGSData;
12 my $d = SGN::Test::WWW::WebDriver->new();
13 my $f = SGN::Test::Fixture->new();
15 my $solgs_data = SGN::Test::solGSData->new({'fixture' => $f, 'accessions_list_subset' => 60, 'plots_list_subset' => 60});
16 my $cache_dir = $solgs_data->site_cluster_shared_dir();
21 $d->while_logged_in_as("submitter", sub {
23 $d->get('/solgs', 'solgs home page');
25 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('Kasese solgs trial');
27 $d->find_element_ok('search_trial', 'id', 'search for training pop')->click();
29 $d->find_element_ok('Kasese', 'partial_link_text', 'create training pop')->click();
31 $d->find_element_ok('queue_job', 'id', 'submit job tr pop')->click();
33 $d->find_element_ok('analysis_name', 'id', 'job queueing')->send_keys('Test Kasese Tr pop');
35 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
37 $d->find_element_ok('submit_job', 'id', 'submit')->click();
39 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
41 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('Kasese solgs trial');
43 $d->find_element_ok('search_trial', 'id', 'search for training pop')->click();
45 $d->find_element_ok('Kasese', 'partial_link_text', 'create training pop')->click();
49 # # #trial type training population: single trait modeling
51 $d->find_element_ok('dry matter', 'partial_link_text', 'build model')->click();
53 $d->find_element_ok('queue_job', 'id', 'no job queueing')->click();
55 $d->find_element_ok('analysis_name', 'id', 'fill in modeling job name')->send_keys('Test DMCP model Kasese');
57 $d->find_element_ok('user_email', 'id', 'fill user email')->send_keys('email@email.com');
59 $d->find_element_ok('submit_job', 'id', 'submit')->click();
61 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
64 $d->find_element_ok('dry matter', 'partial_link_text', 'build model')->click();
67 my $sel_pred = $d->find_element('Predict', 'partial_link_text', 'scroll to selection pred');
68 my $elem = $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-70);", $sel_pred);
70 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('trial2 NaCRRI');
72 $d->find_element_ok('search_selection_pop', 'id', 'search for selection pop')->click();
74 $d->find_element_ok('//table[@id="selection_pops_table"]//*[contains(text(), "Predict")]', 'xpath', 'click training pop')->click();
76 $d->find_element_ok('queue_job', 'id', 'job queueing')->click();
78 $d->find_element_ok('analysis_name', 'id', 'fill in selection prediction job name')->send_keys('Test DMCP selection pred nacrri');
80 $d->find_element_ok('user_email', 'id', 'fill user email')->send_keys('email@email.com');
82 $d->find_element_ok('submit_job', 'id', 'submit')->click();
84 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
87 my $sel_pred = $d->find_element('Predict', 'partial_link_text', 'scroll to selection pred');
88 my $elem = $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-70);", $sel_pred);
90 $d->find_element_ok('DMCP', 'partial_link_text', 'go back')->click();
93 my $sel_pred = $d->find_element('Expected genetic gain', 'partial_link_text', 'scroll to GEBvs');
94 my $elem = $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $sel_pred);
96 $d->find_element_ok('check_genetic_gain', 'id', 'run plot genetic gain')->click();
98 $d->find_element_ok('boxplot', 'partial_link_text', 'checkout boxplot download link');
101 $d->find_element_ok('Kasese solgs trial', 'partial_link_text', 'back to model page')->click();
103 $d->find_element_ok('Kasese solgs trial', 'partial_link_text', 'back to training pop page')->click();
106 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[1]/td/input', 'xpath', 'select 1st trait')->click();
107 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[2]/td/input', 'xpath', 'select 2nd trait')->click();
108 $d->find_element_ok('runGS', 'id', 'build multi models')->click();
110 $d->find_element_ok('queue_job', 'id', 'job queueing')->click();
112 $d->find_element_ok('analysis_name', 'id', 'job queueing')->send_keys('Test DMCP-FRW modeling Kasese');
114 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
116 $d->find_element_ok('submit_job', 'id', 'submit')->click();
118 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
121 #####################
122 # $d->get('/solgs/population/139/gp/1');
124 #####################
126 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[1]/td/input', 'xpath', 'select 1st trait')->click();
128 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[2]/td/input', 'xpath', 'select 2nd trait')->click();
130 $d->find_element_ok('runGS', 'id', 'build multi models')->click();
133 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('trial2 NaCRRI');
135 $d->find_element_ok('search_selection_pop', 'id', 'search for selection pop')->click();
137 $d->find_element_ok('//table[@id="selection_pops_table"]//*[contains(text(), "Predict")]', 'xpath', 'click training pop')->click();
139 $d->find_element_ok('queue_job', 'id', 'job queueing')->click();
141 $d->find_element_ok('analysis_name', 'id', 'fill in job name')->send_keys('Test DMCP-FRW selection pred naccri');
143 $d->find_element_ok('user_email', 'id', 'fill in user email')->send_keys('email@email.com');
145 $d->find_element_ok('submit_job', 'id', 'submit')->click();
148 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
151 my $sel_pred = $d->find_element('Expected genetic gain', 'partial_link_text', 'scroll to GEBvs');
152 my $elem = $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $sel_pred);
154 $d->find_element_ok('gg_pops_select', 'id', 'select list sl pop')->click();
156 $d->find_element_ok('//select[@id="gg_pops_select"]/option[text()="trial2 NaCRRI"]', 'xpath', 'select selection pop')->click();
158 $d->find_element_ok('check_genetic_gain', 'id', 'run plot genetic gain')->click();
160 $d->find_element_ok('boxplot', 'partial_link_text', 'check multi traits boxplot download link');