Lines 297-313
subtest 'Search patrons' => sub {
Link Here
|
297 |
$s->fill_form( { search_patron_filter => 'test_patron' } ); |
297 |
$s->fill_form( { search_patron_filter => 'test_patron' } ); |
298 |
$s->submit_form; |
298 |
$s->submit_form; |
299 |
$s->wait_for_ajax; |
299 |
$s->wait_for_ajax; |
300 |
my $patron_selected_text = $driver->find_element('//div[@id="patron_search_selected"]/span')->get_text; |
300 |
my $patron_selected_text = $driver->find_element('//div[@id="table_search_selections"]/span')->get_text; |
301 |
is( $patron_selected_text, "", "Patrons selected is not displayed" ); |
301 |
is( $patron_selected_text, "", "Patrons selected is not displayed" ); |
302 |
|
302 |
|
303 |
my @checkboxes = $driver->find_elements( |
303 |
my @checkboxes = $driver->find_elements( |
304 |
'//input[@type="checkbox"][@name="borrowernumber"]'); |
304 |
'//input[@type="checkbox"][@name="borrowernumber"]'); |
305 |
$checkboxes[2]->click; |
305 |
$checkboxes[2]->click; |
306 |
$patron_selected_text = $driver->find_element('//div[@id="patron_search_selected"]/span')->get_text; |
306 |
$patron_selected_text = $driver->find_element('//div[@id="table_search_selections"]/span')->get_text; |
307 |
is( $patron_selected_text, "Patrons selected: 1", "One patron selected" ); |
307 |
is( $patron_selected_text, "Patrons selected: 1", "One patron selected" ); |
308 |
|
308 |
|
309 |
$checkboxes[4]->click; |
309 |
$checkboxes[4]->click; |
310 |
$patron_selected_text = $driver->find_element('//div[@id="patron_search_selected"]/span')->get_text; |
310 |
$patron_selected_text = $driver->find_element('//div[@id="table_search_selections"]/span')->get_text; |
311 |
is( $patron_selected_text, "Patrons selected: 2", "Two patrons are selected" ); |
311 |
is( $patron_selected_text, "Patrons selected: 2", "Two patrons are selected" ); |
312 |
|
312 |
|
313 |
$driver->find_element('//*[@id="memberresultst_next"]')->click; |
313 |
$driver->find_element('//*[@id="memberresultst_next"]')->click; |
Lines 315-321
subtest 'Search patrons' => sub {
Link Here
|
315 |
@checkboxes = $driver->find_elements( |
315 |
@checkboxes = $driver->find_elements( |
316 |
'//input[@type="checkbox"][@name="borrowernumber"]'); |
316 |
'//input[@type="checkbox"][@name="borrowernumber"]'); |
317 |
$checkboxes[0]->click; |
317 |
$checkboxes[0]->click; |
318 |
$patron_selected_text = $driver->find_element('//div[@id="patron_search_selected"]/span')->get_text; |
318 |
$patron_selected_text = $driver->find_element('//div[@id="table_search_selections"]/span')->get_text; |
319 |
is( $patron_selected_text, "Patrons selected: 3", "Three patrons are selected" ); |
319 |
is( $patron_selected_text, "Patrons selected: 3", "Three patrons are selected" ); |
320 |
|
320 |
|
321 |
# Perform another search |
321 |
# Perform another search |
Lines 323-329
subtest 'Search patrons' => sub {
Link Here
|
323 |
$s->fill_form( { search_patron_filter => 'test_patron' } ); |
323 |
$s->fill_form( { search_patron_filter => 'test_patron' } ); |
324 |
$s->submit_form; |
324 |
$s->submit_form; |
325 |
$s->wait_for_ajax; |
325 |
$s->wait_for_ajax; |
326 |
$patron_selected_text = $driver->find_element('//div[@id="patron_search_selected"]/span')->get_text; |
326 |
$patron_selected_text = $driver->find_element('//div[@id="table_search_selections"]/span')->get_text; |
327 |
is( $patron_selected_text, "Patrons selected: 3", "Three patrons still selected" ); |
327 |
is( $patron_selected_text, "Patrons selected: 3", "Three patrons still selected" ); |
328 |
|
328 |
|
329 |
$driver->find_element('//*[@id="patronlist-menu"]')->click; |
329 |
$driver->find_element('//*[@id="patronlist-menu"]')->click; |
330 |
- |
|
|