Bugzilla – Attachment 80605 Details for
Bug 21479
Removing from cart removes 2 items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21479: Zebra index can return different result
Bug-21479-Zebra-index-can-return-different-result.patch (text/plain), 2.52 KB, created by
Jonathan Druart
on 2018-10-15 14:44:01 UTC
(
hide
)
Description:
Bug 21479: Zebra index can return different result
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-10-15 14:44:01 UTC
Size:
2.52 KB
patch
obsolete
>From 2e7b5a1983152a464980deace60644813130bf79 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 15 Oct 2018 11:42:34 -0300 >Subject: [PATCH] Bug 21479: Zebra index can return different result > >If the zebra index has been rebuilt by previous tests, the order/results >will be different, and we will not have biblionumber 1, 3, 5 > >Let make this more flexible > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/selenium/regressions.t | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/selenium/regressions.t b/t/db_dependent/selenium/regressions.t >index 5d62842a69..de4e2a231a 100644 >--- a/t/db_dependent/selenium/regressions.t >+++ b/t/db_dependent/selenium/regressions.t >@@ -65,18 +65,24 @@ subtest 'OPAC - Remove from cart' => sub { > my @basket_count_elts = $driver->find_elements('//span[@id="basketcount"]/span'); > is( scalar(@basket_count_elts), 0, 'Basket should be empty'); > >- $driver->find_element('//a[@class="addtocart cart1"]')->click; >+ # This will fail if nothing is indexed, but at this point we should have everything setup correctly >+ my @checkboxes = $driver->find_elements('//input[@type="checkbox"][@name="biblionumber"]'); >+ my $biblionumber1 = $checkboxes[0]->get_value(); >+ my $biblionumber3 = $checkboxes[2]->get_value(); >+ my $biblionumber5 = $checkboxes[4]->get_value(); >+ >+ $driver->find_element('//a[@class="addtocart cart'.$biblionumber1.'"]')->click; > my $basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span'); > is( $basket_count_elt->get_text(), > 1, 'One element should have been added to the cart' ); > >- $driver->find_element('//a[@class="addtocart cart3"]')->click; >- $driver->find_element('//a[@class="addtocart cart5"]')->click; >+ $driver->find_element('//a[@class="addtocart cart'.$biblionumber3.'"]')->click; >+ $driver->find_element('//a[@class="addtocart cart'.$biblionumber5.'"]')->click; > $basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span'); > is( $basket_count_elt->get_text(), > 3, '3 elements should have been added to the cart' ); > >- $driver->find_element('//a[@class="cartRemove cartR3"]')->click; >+ $driver->find_element('//a[@class="cartRemove cartR'.$biblionumber3.'"]')->click; > $basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span'); > is( $basket_count_elt->get_text(), > 2, '1 element should have been removed from the cart' ); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21479
:
79852
|
79857
|
79893
|
79903
|
79950
|
80219
|
80291
|
80292
|
80304
|
80305
|
80557
| 80605 |
80625
|
80643