Lines 88-105
subtest 'OPAC - Remove from cart' => sub {
Link Here
|
88 |
my $biblionumber3 = $checkboxes[2]->get_value(); |
88 |
my $biblionumber3 = $checkboxes[2]->get_value(); |
89 |
my $biblionumber5 = $checkboxes[4]->get_value(); |
89 |
my $biblionumber5 = $checkboxes[4]->get_value(); |
90 |
|
90 |
|
91 |
$driver->find_element('//a[@class="addtocart cart'.$biblionumber1.'"]')->click; |
91 |
$driver->find_element('//a[@class="btn btn-link addtocart cart cart'.$biblionumber1.'"]')->click; |
92 |
my $basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span'); |
92 |
my $basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span'); |
93 |
is( $basket_count_elt->get_text(), |
93 |
is( $basket_count_elt->get_text(), |
94 |
1, 'One element should have been added to the cart' ); |
94 |
1, 'One element should have been added to the cart' ); |
95 |
|
95 |
|
96 |
$driver->find_element('//a[@class="addtocart cart'.$biblionumber3.'"]')->click; |
96 |
$driver->find_element('//a[@class="btn btn-link addtocart cart cart'.$biblionumber3.'"]')->click; |
97 |
$driver->find_element('//a[@class="addtocart cart'.$biblionumber5.'"]')->click; |
97 |
$driver->find_element('//a[@class="btn btn-link addtocart cart cart'.$biblionumber5.'"]')->click; |
98 |
$basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span'); |
98 |
$basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span'); |
99 |
is( $basket_count_elt->get_text(), |
99 |
is( $basket_count_elt->get_text(), |
100 |
3, '3 elements should have been added to the cart' ); |
100 |
3, '3 elements should have been added to the cart' ); |
101 |
|
101 |
|
102 |
$driver->find_element('//a[@class="cartRemove cartR'.$biblionumber3.'"]')->click; |
102 |
$driver->find_element('//a[@class="btn btn-link remove cartRemove cartR'.$biblionumber3.'"]')->click; |
103 |
$basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span'); |
103 |
$basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span'); |
104 |
is( $basket_count_elt->get_text(), |
104 |
is( $basket_count_elt->get_text(), |
105 |
2, '1 element should have been removed from the cart' ); |
105 |
2, '1 element should have been removed from the cart' ); |
106 |
- |
|
|