Revert "Bug 21479: Zebra index can return different result"
authorFridolin Somers <fridolin.somers@biblibre.com>
Wed, 28 Nov 2018 15:25:10 +0000 (16:25 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 28 Nov 2018 15:25:10 +0000 (16:25 +0100)
This reverts commit 150414707053282ed731f022e12e93174d2ad52f.

t/db_dependent/selenium/regressions.t

index 26bfb3e..8b08503 100644 (file)
@@ -41,24 +41,18 @@ 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');
 
-    # 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;
+    $driver->find_element('//a[@class="addtocart cart1"]')->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 cart'.$biblionumber3.'"]')->click;
-    $driver->find_element('//a[@class="addtocart cart'.$biblionumber5.'"]')->click;
+    $driver->find_element('//a[@class="addtocart cart3"]')->click;
+    $driver->find_element('//a[@class="addtocart cart5"]')->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 cartR'.$biblionumber3.'"]')->click;
+    $driver->find_element('//a[@class="cartRemove cartR3"]')->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' );