From 42f56d918aeecbc4bf830205f4ff91aa53ff53ae Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 28 Nov 2018 16:25:13 +0100 Subject: [PATCH] Revert "Bug 21479: Add regression tests" This reverts commit 37c5a829532e81892098072fbff976c0c946861f. --- t/db_dependent/selenium/regressions.t | 63 --------------------------- 1 file changed, 63 deletions(-) delete mode 100644 t/db_dependent/selenium/regressions.t diff --git a/t/db_dependent/selenium/regressions.t b/t/db_dependent/selenium/regressions.t deleted file mode 100644 index bffddc3713..0000000000 --- a/t/db_dependent/selenium/regressions.t +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/perl - -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# Koha is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Koha; if not, see . - -use Modern::Perl; - -use C4::Context; - -use Test::More tests => 1; - -use t::lib::Selenium; - -eval { require Selenium::Remote::Driver; }; -skip "Selenium::Remote::Driver is needed for selenium tests.", 1 if $@; - -my $s = t::lib::Selenium->new; - -my $driver = $s->driver; -my $opac_base_url = $s->opac_base_url; - -subtest 'OPAC - Remove from cart' => sub { - plan tests => 4; - - $driver->get( $opac_base_url . "opac-search.pl?q=d" ); - - my $basket_count_elt; - eval { - # FIXME This will produce a STRACE - # A better way to do that would be to modify the way we display the basket count - # We should show/hide the count instead or recreate the node - $basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span') - }; - like($@, qr{An element could not be located on the page}, 'Basket should be empty'); - - $driver->find_element('//a[@class="addtocart cart1"]')->click; - $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; - $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; - $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.39.5