@@ -, +, @@ missing --- t/db_dependent/selenium/administration_tasks.t | 2 +- t/db_dependent/selenium/basic_workflow.t | 4 ++-- t/db_dependent/selenium/patrons_search.t | 9 +++++++-- t/db_dependent/selenium/regressions.t | 8 ++++++-- t/db_dependent/selenium/remove_from_cart.t | 10 +++++++--- t/db_dependent/selenium/self_registration.t | 8 ++++++-- t/db_dependent/selenium/update_child_to_adult.t | 8 ++++++-- 7 files changed, 35 insertions(+), 14 deletions(-) --- a/t/db_dependent/selenium/administration_tasks.t +++ a/t/db_dependent/selenium/administration_tasks.t @@ -41,7 +41,7 @@ our ($cleanup_needed); SKIP: { eval { require Selenium::Remote::Driver; }; - skip "Selenium::Remote::Driver is needed for selenium tests.", 1 if $@; + skip "Selenium::Remote::Driver is needed for selenium tests.", 3 if $@; $cleanup_needed = 1; --- a/t/db_dependent/selenium/basic_workflow.t +++ a/t/db_dependent/selenium/basic_workflow.t @@ -85,14 +85,14 @@ our $sample_data = { }; our ( $borrowernumber, $start, $prev_time, $cleanup_needed ); -$dbh->do(q|INSERT INTO itemtypes(itemtype) VALUES (?)|, undef, $sample_data->{itemtype}{itemtype}); - SKIP: { eval { require Selenium::Remote::Driver; }; skip "Selenium::Remote::Driver is needed for selenium tests.", 22 if $@; $cleanup_needed = 1; + $dbh->do(q|INSERT INTO itemtypes(itemtype) VALUES (?)|, undef, $sample_data->{itemtype}{itemtype}); + open my $fh, '>>', '/tmp/output.txt'; my $s = t::lib::Selenium->new; --- a/t/db_dependent/selenium/patrons_search.t +++ a/t/db_dependent/selenium/patrons_search.t @@ -20,7 +20,7 @@ use Modern::Perl; use C4::Context; use utf8; -use Test::More tests => 1; +use Test::More; use Test::MockModule; use C4::Context; @@ -30,7 +30,12 @@ use t::lib::Selenium; use t::lib::TestBuilder; eval { require Selenium::Remote::Driver; }; -skip "Selenium::Remote::Driver is needed for selenium tests.", 1 if $@; +if ( $@ ) { + plan skip_all => "Selenium::Remote::Driver is needed for selenium tests."; +} else { + plan tests => 1; +} + my $s = t::lib::Selenium->new; my $driver = $s->driver; --- a/t/db_dependent/selenium/regressions.t +++ a/t/db_dependent/selenium/regressions.t @@ -20,7 +20,7 @@ use utf8; use C4::Context; -use Test::More tests => 7; +use Test::More; use Test::MockModule; use C4::Context; @@ -33,7 +33,11 @@ use t::lib::TestBuilder; use t::lib::Mocks; eval { require Selenium::Remote::Driver; }; -skip "Selenium::Remote::Driver is needed for selenium tests.", 7 if $@; +if ( $@ ) { + plan skip_all => "Selenium::Remote::Driver is needed for selenium tests."; +} else { + plan tests => 7; +} my $s = t::lib::Selenium->new; --- a/t/db_dependent/selenium/remove_from_cart.t +++ a/t/db_dependent/selenium/remove_from_cart.t @@ -19,7 +19,7 @@ use Modern::Perl; use File::Basename qw(dirname ); use Test::WWW::Mechanize; -use Test::More tests => 1; +use Test::More; use Test::MockModule; use C4::Context; @@ -30,7 +30,11 @@ use t::lib::Mocks; use t::lib::Mocks::Zebra; eval { require Selenium::Remote::Driver; }; -skip "Selenium::Remote::Driver is needed for selenium tests.", 1 if $@; +if ( $@ ) { + plan skip_all => "Selenium::Remote::Driver is needed for selenium tests."; +} else { + plan tests => 1; +} my $s = t::lib::Selenium->new; @@ -101,5 +105,5 @@ subtest 'OPAC - Remove from cart' => sub { END { C4::Context->set_preference('SearchEngine', $SearchEngine_value); - $mock_zebra->cleanup; + $mock_zebra->cleanup if $mock_zebra; }; --- a/t/db_dependent/selenium/self_registration.t +++ a/t/db_dependent/selenium/self_registration.t @@ -20,7 +20,7 @@ use utf8; use C4::Context; -use Test::More tests => 1; +use Test::More; use Test::MockModule; use C4::Context; @@ -30,7 +30,11 @@ use t::lib::TestBuilder; use t::lib::Mocks; eval { require Selenium::Remote::Driver; }; -skip "Selenium::Remote::Driver is needed for selenium tests.", 1 if $@; +if ( $@ ) { + plan skip_all => "Selenium::Remote::Driver is needed for selenium tests."; +} else { + plan tests => 1; +} my $s = t::lib::Selenium->new; --- a/t/db_dependent/selenium/update_child_to_adult.t +++ a/t/db_dependent/selenium/update_child_to_adult.t @@ -19,7 +19,7 @@ use Modern::Perl; use C4::Context; -use Test::More tests => 1; +use Test::More; use Test::MockModule; use C4::Context; @@ -29,7 +29,11 @@ use t::lib::Selenium; use t::lib::TestBuilder; eval { require Selenium::Remote::Driver; }; -skip "Selenium::Remote::Driver is needed for selenium tests.", 1 if $@; +if ( $@ ) { + plan skip_all => "Selenium::Remote::Driver is needed for selenium tests."; +} else { + plan tests => 1; +} my $s = t::lib::Selenium->new; my $driver = $s->driver; --