Compare commits

...

3 Commits

Author SHA1 Message Date
Jonathan Druart 26dd400283 Bug 29485: Trying to prevent administration_tasks.t to fail randomly 2 years ago
Jonathan Druart f5c49d1dd7 Bug 21105: Fix test if sample data missing 2 years ago
Jonathan Druart ab4b46a848 Bug 29273: Fix failing tests 2 years ago
  1. 7
      t/db_dependent/ImportBatch.t
  2. 2
      t/db_dependent/Koha/Plugins/authority_hooks.t
  3. 2
      t/db_dependent/Koha/REST/Plugin/PluginRoutes.t
  4. 2
      t/db_dependent/Koha/Template/Plugin/KohaPlugins.t
  5. 6
      t/db_dependent/OAI/Server.t
  6. 5
      t/db_dependent/selenium/administration_tasks.t

7
t/db_dependent/ImportBatch.t

@ -1,7 +1,7 @@
#!/usr/bin/perl
use Modern::Perl;
use Test::More tests => 16;
use Test::More tests => 17;
use utf8;
use File::Basename;
use File::Temp qw/tempfile/;
@ -10,12 +10,13 @@ use t::lib::Mocks;
use t::lib::TestBuilder;
use Koha::Database;
use Koha::Plugins;
BEGIN {
# Mock pluginsdir before loading Plugins module
my $path = dirname(__FILE__) . '/../lib';
my $path = dirname(__FILE__) . '/../lib/plugins';
t::lib::Mocks::mock_config( 'pluginsdir', $path );
use_ok('Koha::Plugins');
use_ok('C4::ImportBatch', qw( AddImportBatch GetImportBatch AddBiblioToBatch AddItemsToImportBiblio GetRecordFromImportBiblio SetMatchedBiblionumber GetImportBiblios GetItemNumbersFromImportBatch CleanBatch DeleteBatch RecordsFromMarcPlugin ));
}

2
t/db_dependent/Koha/Plugins/authority_hooks.t

@ -30,7 +30,7 @@ use t::lib::TestBuilder;
BEGIN {
# Mock pluginsdir before loading Plugins module
my $path = dirname(__FILE__) . '/../../../lib';
my $path = dirname(__FILE__) . '/../../../lib/plugins';
t::lib::Mocks::mock_config( 'pluginsdir', $path );
use_ok('Koha::Plugins');

2
t/db_dependent/Koha/REST/Plugin/PluginRoutes.t

@ -32,7 +32,7 @@ use Mojolicious::Lite;
BEGIN {
# Mock pluginsdir before loading Plugins module
my $path = dirname(__FILE__) . '/../../../../lib';
my $path = dirname(__FILE__) . '/../../../../lib/plugins';
t::lib::Mocks::mock_config( 'pluginsdir', $path );
}

2
t/db_dependent/Koha/Template/Plugin/KohaPlugins.t

@ -16,7 +16,7 @@ use C4::Context;
use t::lib::Mocks;
BEGIN {
push( @INC, dirname(__FILE__) . '/../../../../lib' );
push( @INC, dirname(__FILE__) . '/../../../../lib/plugins' );
use_ok('Koha::Plugins');
use_ok('Koha::Plugins::Handler');

6
t/db_dependent/OAI/Server.t

@ -536,7 +536,9 @@ subtest 'Tests for timestamp handling' => sub {
my $timestamp = dt_from_string(undef, 'sql');
# Test a bib with one item
my $biblio1 = $builder->build_sample_biblio();
my $biblio1 = $builder->build_sample_biblio;
Koha::Biblios->find($biblio1->biblionumber)->timestamp('1970-05-07 13:36:23')->store;
$sth_metadata->execute($timestamp, $biblio1->biblionumber);
my $item1 = $builder->build_sample_item(
{
@ -623,7 +625,7 @@ subtest 'Tests for timestamp handling' => sub {
baseURL => 'http://localhost',
compression => 'gzip',
deletedRecord => 'persistent',
earliestDatestamp => '2014-05-07T13:36:23Z',
earliestDatestamp => '1970-05-07T13:36:23Z',
granularity => 'YYYY-MM-DDThh:mm:ssZ',
protocolVersion => '2.0',
repositoryName => 'My Library',

5
t/db_dependent/selenium/administration_tasks.t

@ -184,6 +184,11 @@ SKIP: {
};
{ # Patron categories
# For an unknown reason the click on the admin-home link does not work
# At this point we were still on the authorised value list view.
# A workaround (and dirty fix) is to logout/login and see if it fixes the problem
$driver->get( $mainpage . q|?logout.x=1| );
$s->auth;
$driver->get($mainpage);
$s->click( { href => '/admin/admin-home.pl', main => 'container-main' } ); # Koha administration
$s->click( { href => '/admin/categories.pl', main_class => 'main container-fluid' } ); # Patron categories

Loading…
Cancel
Save