Bugzilla – Attachment 182769 Details for
Bug 39980
Vendors pages are broken when using Koha as a Mojolicious application
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39980: Add tests for .../acquisition/vendors* in Mojo context
Bug-39980-Add-tests-for-acquisitionvendors-in-Mojo.patch (text/plain), 2.07 KB, created by
Julian Maurice
on 2025-05-23 12:41:37 UTC
(
hide
)
Description:
Bug 39980: Add tests for .../acquisition/vendors* in Mojo context
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2025-05-23 12:41:37 UTC
Size:
2.07 KB
patch
obsolete
>From e367457793e956fed15282891d918f88104a1290 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 23 May 2025 12:39:25 +0000 >Subject: [PATCH] Bug 39980: Add tests for .../acquisition/vendors* in Mojo > context > >--- > t/db_dependent/mojo/acquisition/vendors.t | 49 +++++++++++++++++++++++ > 1 file changed, 49 insertions(+) > create mode 100755 t/db_dependent/mojo/acquisition/vendors.t > >diff --git a/t/db_dependent/mojo/acquisition/vendors.t b/t/db_dependent/mojo/acquisition/vendors.t >new file mode 100755 >index 0000000000..2afe13573d >--- /dev/null >+++ b/t/db_dependent/mojo/acquisition/vendors.t >@@ -0,0 +1,49 @@ >+#!/usr/bin/perl >+ >+use Modern::Perl; >+ >+use Test::More tests => 1; >+use Test::Mojo; >+use Koha::App::Intranet; >+ >+use Koha::Database; >+use Koha::Patrons; >+ >+use t::lib::TestBuilder; >+ >+my $schema = Koha::Database->schema; >+my $builder = t::lib::TestBuilder->new(); >+ >+subtest '/cgi-bin/koha/acquisitions/vendors' => sub { >+ plan tests => 10; >+ >+ my $t = Test::Mojo->new('Koha::App::Intranet'); >+ >+ my $patron = $builder->build_object( >+ { >+ class => 'Koha::Patrons', >+ value => { >+ flags => 1, >+ }, >+ } >+ ); >+ $patron->set_password({ password => 'P4ssword!', skip_validation => 1 }); >+ >+ # Log in >+ $t->get_ok('/cgi-bin/koha/mainpage.pl'); >+ my $csrf_token = $t->tx->res->dom('input[name="csrf_token"]')->map( attr => 'value' )->first; >+ $t->post_ok( >+ '/cgi-bin/koha/mainpage.pl', >+ form => { >+ csrf_token => $csrf_token, >+ op => 'cud-login', >+ login_userid => $patron->userid, >+ login_password => 'P4ssword!', >+ koha_login_context => 'intranet', >+ branch => '', >+ } >+ )->status_is(200)->content_like( qr/Koha home/, 'Login OK' ); >+ >+ $t->get_ok('/cgi-bin/koha/acquisition/vendors')->status_is(200)->element_exists('#vendors'); >+ $t->get_ok('/cgi-bin/koha/acquisition/vendors/add')->status_is(200)->element_exists('#vendors'); >+}; >-- >2.39.5
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 39980
:
182768
|
182769
|
182874
|
182875